Part 1: Original Thinkings and Development Tinkerings


"How about a game where you play as a robot that crashes in a forest and you lose the modules that control you? Monsters in the forest steal them away and when they do they take on that control modules feature, whether it be movement or attacking."

This was originally the idea that I had planned to go with nearly 4 hours after the theme was announced and I was talking to my friend Jack trying to think up a solid theme that would be my focus for the weekend. As this would be my first game made in Unity I knew I had to think simple. Like, really simple. As someone in the GMTK discord put it "You need to scope small and then halve it." which would be my mantra for the next 48 hours. So I did what any dedicted, enthusiastic game jammer would do after being thrilled by coming up with their idea: I went to sleep.

I began the next morning at 8am (slept in)  with the main player interaction which was simply top down movement. At this point I have already got it in my head that I need to scale back the game in order to get something submitted by Sunday. Tis the knowledge you get when you've done a couple of game jams before, that submission is key (who knew?). Originally I had planned to have 4 directional blocks along with an attack block of some kind (although whether this was going to be shooting or some other form of attacking, I hadn't decided yet) but I thought I would focus at this point, on having movement sorted.

Here I began to formulate a different idea of the game altogether, something more puzzle based and less about combat. I steered heavily in this direction because I knew I probably wouldn't be able to make some sort of AI for the enemy or balance the gameplay and combat  in time for the deadline. This is why all references to the "little monster blob" are down as enemy and would be until the game was submitted.

So I pushed hard in this direction. As mentioned earlier this was my first time making a game in Unity. Prior to this I had been using Construct 2 which utlises something called 'events' exclusively and does no kind of coding. Having learnt C# recently through a course on Unity I felt this was a great opportunity to test what I had picked up along the way. I set up a tilemap, collision sets and characters with very simple 2 directional animation (1 if you're looking at just the monster buddy). Then my next focus was the core gameplay.

Picking Up Blocks (The Easy Part)

I needed to start here because nothing else I had planned in the games design would work otherwise. Now looking back and being so new to C# relatively speaking, I couldn't tell you what I had written in my code off the top of my head and I'm too lazy to open up Unity right now to check but I know it involved a heck of a lot of booleans being set depending on certain factors the game would go through. Has the player collided with the block? Ok, then set the block position to the player at all times wherever they move to. Has the block now collided with a block placement tile? Yes, now place the block on the tile in the centre and if the player is still touching it don't allow them to pick it up straight away and so on.

Eventually I had a block that the player could carry around the level and when touching a placement tile the block would be put on that tile space. I had thought of allowing the player to trigger this but I was thinking of making it as automated as possible at this stage in the game so that the player only really had to move and walk over the corresponding tile to place the block. It is something that I would reconsider doing where the player could be over the correct tile but it is up to them to trigger the placement via input.

Multiple Blocks in the Scene (The Not So Easy Part)

I got stuck here. Like, for a while. I had four blocks and four block tiles in my scene. For some reason all the blocks except the left arrow direction would let me pick it up and place it in the relevant tile however with the left block it would always want to tag along with whichever block I was moving at the time. Aside from it clearly feeling left out from all the fun I figured it must be something in the code. I thought I had tried everything: I moved the left block in the hierarchy, deleted it and then duplicated one of the other blocks with the same script, I prayed to the gods of C# to fix the problem but nothing worked. I went back in my method to find a solution.

I think by this point I had also implemented the ability to allow the player to put the block back down by pressing the Spacebar and the way I did this was through the player script but triggered by something in the block script. Essentially I think the fact that the block script had to call something in the player script to then trigger something back on the block script was causing issues and somehow made the left block the leader of the bunch meaning it would react to any action on the other blocks. So I moved the player trigger to drop a block with Spacebar from the player script to the block script and voila, problem solved. It was so simple, that I still don't fully understand how I fixed it. 

(Thanks to everyone in the discord who tried to help me with this. I could sense the complete bemusement from you all at the problem I had created.)

More in Part 2

I'm going to continue this log in multiple parts because it's Friday and time to wind down.

Files

Which Way GMTK Jam 2020 Original Version 5.5 MB
Jul 12, 2020

Leave a comment

Log in with itch.io to leave a comment.