MY FIRST PROTOTYPE EVER!


Hello I am SolemnSkai and this is my submission to the “Learn You a Game Jam” game jam.

To start, a little background.

I initially learned to code in c# on code academy because I wanted to learn game design and thus needed to get into coding, I chose c# since it was the language that unity used, and unity seemed to be the most popular engine so it has to be good…

Well, now turned off of using unity, I decided I’d give Godot a try since it has c# support, however, the c# support wasn’t great, and I initially couldn’t find an in depth video tutorial so I dropped game making for a while.

One day, however I was curious about game jams to see what they were like and if they would give me the kick in the pants I needed to start working on games, I read the game jam rules, what it was about and thought, PERFECT, I don’t necessarily have to make an amazing game, I just have to learn how to make games. “Wonderful” I thought, I could just try my hardest to make a game, and it would be enough, so I awaited the day of the game jam, and began.

The first few days consisted of following a Clearcode tutorial to try and learn as much as I could about game design in as short an amount of time in order to make something pertaining to the theme, “1 inventory slot”. I got about 7 hours into that over a few days and decided it was time to try making the prototype for my game, this would be my first ever prototype, so I drew up some quick and dirty assets just so I can have something to work with without having to spend way too long drawing, when I'm trying to learn how to code in Godot. I started to screw around with the nodes and create scenes for my items, I put all my stuff down and tried to set up movement code based off of what was written with the game clearcode had me make, I had modified the code from that to try and have movement work more like a 2d platformer (the tutorial game was an overhead shooter), and I had an issue with getting jumping to work. It turns out it was because I had the motion mode set to “floating” instead of “grounded” which was causing gravity to not work.

I had tried troubleshooting that myself for about an hour, but after said hour I went to chat gpt, and inquired about my issue and chat gpt had given me an in depth list to troubleshoot the problem, which inevitably led to me finding that solution. Chat gpt can be a very useful tool so long as you don’t just let it do the coding for you and understand what is going on. The main reason i started to use gpt was because google just wasn’t cutting it for me, what would take probably an hour of googling gpt could answer for me within seconds and it would *usually* be correct, ai does get things wrong from time to time, so you need to be especially careful when using gpt for coding, but it can be a huge time saver as well as a huge help when it explains in thorough detail what is going on.

(SIDE NOTE ON CHAT GPT)

(I’m asking when metal gear solid 2 was released, and it gave me metal gear solid one release date, you can see the date I was asking for in the picture, below the answer google gave me. If I used “released” instead of “made” I would have gotten the correct answer, however when I ask chat gpt the exact same question…)

It gives me the answer I am looking for.

With movement now working how I wanted, I then attempted to get a system for picking up a table to work so I could have my  “one inventory slot” after struggling for a while with no meaningful progression I had learned probably one of the most important lessons during this whole game jam, I was going to have to lower my expectations, Rome wasn’t built in a day, and since I’m such an inexperienced builder, it definitely wasn’t gonna happen in a week. I was initially frustrated with my lack of progress despite sitting down and trying my hardest each day so much so that when I was taking breaks I felt guilty thinking I could be working on the game trying to make it better, which is a really toxic line of thinking and a good way to burn yourself out really quick. So dear reader, I implore you, if you are ever in a situation where you have a difficult project like this and find you are having a hard time making progress, take a break and forgive yourself if you fail, but be ready to pick yourself back up ASAP, and don’t brute force your way through learning something, these things take time to learn and apply.

The next day whilst trying to get this code to work again, I tried to replicate signals from the Clearcode tutorial to help get the pickup mechanic to work, but I just couldn’t figure it out, I then asked chat gpt for help , and it gave me code to change a buttons color on press, said code worked, but I still didn’t understand signals. Yet I had an epiphany from chat gpt’s code. I should have all of the code for picking stuff up be in the level so I can directly access the nodes for the table and player, which actually ended up working!

After it started working I set up a mechanic to drop the table, as well as a hit detection system on the enemy node, and by the time I did that I needed to write up my devlog. 

It may not be flashy, or particularly polished, but it's a game prototype, and it is MINE!

Key takeaways, and things I learned while playing around with Godot:

1. Sometimes you just gotta try for a while, even when I couldn’t figure something out in a day, I came back to it the next day.

2. Node order matters a lot, if you have a child node, said child node will follow the parent node wherever the parent node goes, if the player node moves left, any children will move left with it.

3. After instantiating a scene you can right click on the node and enable editable children, and that allows you to easily reference a nodes children by dragging the child in question into the code

4. You can type if statements in gdscript like in c# so instead of 

If actionallowed is true and collisiondetected is true: 

run_code()

You can type it as

If actionallowed == true && collisiondetected == true:

run_code()

I ended up writing a lot of my code like that because it made more sense to me

5. Variables work a bit different, when setting up a variable you don’t have to specify a data type, for example:

var iamavariable = 7

You can still specify a data type if needed by typing your code like this

var iamavariable : int  = 7

6. Using print() to debug and figure out what is and isn’t working is a huge help, sometimes I had it print out a random message to see if my code was even executing, and other times I had it print out a variable to see if a variable was changing, both ways it was quite useful in diagnosing my problems

7. If you hold CTRL whilst in a script you can then click on some terms in your code and it will open up godot documentation on what you clicked on where applicable (meaning it has to be something built into godot, like is_action_just_pressed())

8. The Y axis is reversed so if you want something to move DOWN you need to ADD, going down is positive going up is negative, which was a little weird to me (I’m no expert and this is just speculation, If I remember correctly led screens have their pixels light up and load from top left to bottom right, so maybe that’s the reason?)

9. And of course I learned I had it in me to actually code and make something.

Things I would do different:

1. I would definitely spend more time trying to learn signals, because I feel like those could’ve made my code a lot better than a bunch of nested if statements.

2. I would also see about making my table a rigid body instead of an area2d because my current solution for dropping the table is to just subtract 400 from GroundPosition.y and then set that as $table.position.y, when I could probably just have my table be affected by gravity and pulled down to the ground instead when released from my hand.

3. There was also an issue where after the enemy node gets deleted from being killed on 3 hits, picking up and dropping the table causes errors because it's looking for an enemy node but it no longer exists. I’m not sure how I would’ve fixed that, but with a bit more time I most certainly could’ve.

Past that, I’m not sure there was anything I could’ve done differently at my skill level, it still probably would’ve taken me the same amount of time and I would’ve gotten about as far, which to me means I did try my hardest, and that’s good enough for me.

TUTORIAL USED:

The ultimate introduction to Godot 4


https://www.youtube.com/watch?v=nAh_Kx5Zh5Q

ADDITIONAL HELP FROM:

https://chatgpt.com/

Files

One-handed Bandit.exe 65 MB
Jul 02, 2024

Get ONE-HANDED BANDIT PROTOTYPE

Leave a comment

Log in with itch.io to leave a comment.