Making My First Game - Part 1


Scream Jam 2024

Earlier this year I encouraged my friend to follow her dreams. As a pastor's wife, a mom of two, and administrator at a large hospital, she still dreamed of becoming a screenwriter. Becoming a screenwriter at our age, already married and with a job, is hard. But I told her that how hard it is shouldn't matter if it's something she really enjoyed. Then she asked me about my own dream. Once upon a time I wanted to make games, but I gave that dream up for a real job and besides, now I'm married with kids. My friend encouraged me, using the same words of encouragement I gave her. 

Great, now if I don't make a game I'm a hypocrite.

I decided to make my game making debut in Scream Jam 2024 (Halloween Themed Jam) despite knowing absolutely nothing about the horror genre in games or movies. Partially because I knew if I waited for another Game Jam I'd just keep procrastinating. And partially because if I failed miserably in this genre I could at least say it was a bad match for me and blame my failures on that. Nothing like disowning accountability to really get you inspired!

Plot

I am a fan of the late, great Akira Toriyama. Most folks know him for creating Dragon Ball Z. I decided to take inspiration from Go! Go! Ackman! This manga is based on a demon child who's dad has decided he's now old enough to work, so the demon child goes out to collect souls to sell to the demon king. I don't know much about horror but I was pretty sure that counts. For the week before the start of Scream Jam 2024 I took to planning out the game so I could hit the ground running once the game jam started. I also started studying GameMaker Studio 2, which seemed like the easier software to get started with.

Issues with scope

Literally 2 days before Scream Jam began I started to panic a little. After planning things I'd realized that I have no idea how to write a compelling story. I don't know how to draw demon children. I don't know how to animate or own any animation software. I've got no education in computer science, and I don't know how to program AI into games. Actually, now that I think about it. I don't know the first thing about designing a game! I bit off waaaaay more than I could chew! How am I supposed to pull this off?

I went to my wife and explained to her this issue. She plays Stardew Valley so she suggested that I make the main character a slime instead of a demon since that would be easier to draw. That's when inspiration struck. Not only are slime basically just circles (which anyone could easily make in paint), but I could change it's shape and size programmatically to animate it rather than draw a new frame every time. Furthermore, slime gameplay would be more interesting. There are plenty of games with humanoid main characters, but how many games put you in control of slime? If I focused on making the gameplay about navigating the world as a slime and keep players engaged that way that would make up for me not knowing how to program an AI to try to attack and defeat the player character. If it wasn't for my wife this game would have looked a lot different (and probably not have been completed on time).

Drawing the Slime

Lets just say drawing slime is harder than I thought. I made it perfectly round at first but my children thought it was a pea (a la VeggieTales). They were right. Slime normally sag a little at the bottom. I tried again but then it came out looking like an egg. I carefully drew a ... non-round shape thing pixel by pixel to make slime kid. I also doubled the resolution because it just didn't look right in 32 x 32 for some reason. It took an embarrassingly long time for such a simple character. I can only imagine what drawing a demon would have been like.

Bringing Slime Kid to Life

The most important part of the game is how Slime Kid moves, so naturally I spent nearly 3 days working just on that.

First, I needed to skew the horizontal and vertical image length periodically to make it look like he was breathing. Easy!

Second, I needed to make his eyes point the direction of the mouse to add a little more life. After a few hilarious looking bugs, easy!

Third, I need to make him drop until he hits the ground then make him stop falling. Hard!

Seriously, why is it so hard to make him land on the ground?! He keeps clipping through, or he'd bounce 1 pixel above the ground, or would vibrate for some strange reason. Why are none of GameMaker's built in functions are working the way they're described in the documentation? I eventually got it to behave how I wanted but only after 10 lines of code and a bunch of while loops and testing the floor's location 10 times per frame. This can't possibly be the most correct or efficient way to do this, right? But whatever, I've only got 7 days to make the game and it works so the spaghetti code stays!

Final step, jumping. I wanted to base the jumping off the bonus mini games at the end of Kirby levels. Specifically the one at the end of the levels in Kirby's Dream Land 3. The distance of the jump was based on the timing and while frustrating at first once you get used to it you can reliably get the 1-up or tomato. It feels oddly satisfying to land on the right spot. Basically, my idea was to make the whole game the mini game in Kirby. Coding that wasn't too difficult, but it was tedious. I basically had to code in a bunch of different "states" (like: ready, jumping, jumped, in air, landing, landed, etc) so that the action the mouse performed and the animation the slime performed was different for each specific scenario. That way you can't jump while in the air, or start another jump before the first jump finishes, and stuff like that. After I finished coding that (and it miraculously worked on the first try) I didn't touch that part of the code again (since I wasn't quite sure how I pulled off getting it to work in the first place).

Creating the first level

I underestimated how much art is needed to create a game. Literally everything is art, which seems obvious but I didn't know I would spend more time drawing (and redrawing) everything than I would spend actually coding. And art is the one thing I had the least amount of confidence with going into this. Let me tell you, drawing things with a mouse isn't exactly my idea of fun. Everything in the first level I drew pixel by pixel. I spent a little time learning how tile sets work. Fortunately, with tile sets I could easily put copies of what I drew everywhere. Still, drawing things like a tile for the top right corner of the ground and the bottom right corner and the top left corner, etc, etc. It was time consuming (I would later learn there was a much better way but just let me from the past be proud of his work). I considered downloading art assets online but I had serious doubts I could find FREE art assets that matched the aesthetics I was looking for so I didn't even try. 

For optimization reasons the walls and ground are all just tiles with no collision logic built in. The "actual" ground are a bunch of invisible blocks placed meticulously around the level to prevent the slime from phasing through the ground. That's at least what people recommended in forums online. Now that I've had more time with GameMaker I'm fairly certain that advice might have been a load of crap (I think GameMaker automatically culls and disables objects that aren't on screen. And even if it didn't, having a thousand invisible cubes all over the place probably still takes up processing power, so I doubt it actually helped much). First lesson in early optimization: Don't do it!

Adding Sound

This was my favorite part, maybe because I actually have some formal music training. Well, I had piano lessons as a kid anyway. I created some fun background music and after creating it I decided that would be the music for the first level. I then went to work on creating music for the menu/home screen. The menu screen evolved into a short tutorial where you learn to jump and select a level by moving the character to the appropriate door. That eventually evolved into a level in and of itself, and so the menu screen became the first level and the "first level" was never created in time for Scream Jam. Meaning, the music everyone hears isn't even the music I intended for everyone to hear...

Sound effects weren't as challenging as I thought they'd be. I was tempted to download some effects but decided I might as well try my hand at making my own. Googling "how to make sound effects" took me to a reddit post that explained it as just taking a random sound and distorting it until you get something you like. It can't be THAT easy, can it?

My favorite sound effects are the sounds that play when you collect a coin or soul. The coin sound effect is a distorted version of the first half of the main motif, and the ghost collect sound effect is a distorted version of the last half of the main motif. Meaning, I recycled the menu song to create sound effects. Other sound effects are distorted sine waves or saw waves, or distorted sounds of musical instruments played backwards. 

I'm glad I am already familiar with music. This part probably would have been a lot harder otherwise. If only I had taken drawing lessons too...

Playtesting

I'm lucky to have a wife who isn't really a gamer and two children. So I figured they'd be the best people to play test it. Someone with a lot of platformer experience might make me think the game was too easy, but after having them play I learned that the game was actually too hard. Way too hard. My kids couldn't finish it and I had to help my wife at the end.

Feedback

I learned that accurate physics and complex projectile equations doesn't equal fun gameplay. At first my slime would stick to walls if it bumped into them, but it would actually get too stuck sometimes and slow gameplay down. So I made it bounce off walls instead, but that caused my play testers to constantly bang their head against the wall in frustration (literally) when trying to make it up a ledge.

Moving platforms were impossible to reach. The timing had to be perfect or else they'd miss. And if they bumped into a moving platform the momentum would send them way off course. Furthermore, I had originally programmed the jump speed on a continuous scale. Meaning: if your mouse was close to Slime Kid you'd jump slightly to the right. But if it was far from him you'd jump far to the right. And that meant that you not only had to release the jump at the exact right moment, but the position of the mouse on the screen had to be at the exact right spot. I also realized that none of my play testers realized this. They would just place the mouse where ever they wanted to jump and launch themselves at the wrong speed. I noticed that whenever my wife missed a jump she'd try pressing on the platform while in mid-air (even though jumping in mid-air doesn't do anything). That gave me an idea.

Finally, I noticed my wife was so focused on where she wanted to land she didn't pay attention to the timing of the jump and would release at the wrong moment.

Implementing Feedback

I changed the mechanics so that jumping took less precision. Instead of a continuous scale there was a half-speed jump and a full speed jump. I added a variable to moving platforms so that I could strategically allow players to jump through certain challenging platforms instead of all of them knocking the player back. I added a mid-air boost so that if you tried correcting course in mid-air you'd do a little hop in the direction you clicked. I added a sound effect to the getting ready to jump action so players would be able to know when to release without having to look at Slime Kid (it's totally just a programmatically pitched recording of a flute). I also programmed friction into the ground. But you wouldn't be able to tell because I never utilized the concept of friction in the first level (which is the only level to release in time for Scream Jam 2024). But trust me. It's there. And it was really hard to program. Just believe me.

This did involve completely remaking the physics system from scratch. Honestly it was a miracle that the first one held up. And after remaking it I ran into some bugs where the player could fall through floors in certain corners of the room (because the invisible blocks were placed based on the first system which used lines for collisions but the new system is based on single pixel collision points). So I had to place more invisible blocks. As far as I know there aren't any places where you can fall into the abyss anymore, but I can't say that with absolute certainty.

Playtesting ... Again

The changes were a success. My wife said it was still hard, but at least now it felt like a skill issue and not a game cheating you issue. And my 6 year old was able to complete it, so if anyone complained that they couldn't beat it they'd be admitting to being a worse gamer than a 6 year old girl. That was good enough for me. By this time there wasn't much time left (about 2 days). But I know from hearing others talking about game development that if I tried to make any major changes that'd break the game and I'd be scrambling to complete it before launch. So I submitted as is. I could only get one level in. I seriously underestimated how much time it would take to draw everything. But I'll be adding levels after Scream Jam is over. Here's hoping 1 level is good enough.

Last Minute Update

After submitting, I spent about a day working on some code that would resize the screen based on the size of the browser window and updated the game with those changes before the deadline. This has no visible affect for most people, but for people playing on a smaller screen (like a phone or low resolution monitor) the view would shrink to accommodate. It's spaghetti code, a fragile thing held together with tape, prayer, and left-over unicorn magic. I have no idea if it will hold up after I add more levels. I sort of wish GameMaker handled this automatically  but as far as I know that isn't a built in feature.  The challenging part was getting UI elements, like chat boxes and text to also shrink so they could be read. Notice I said the "view" would shrink. The objects stay the same size because stretching or shrinking the pixel art makes it blurry in an unpredictable fashion (on some screens it's just annoying but on others it's downright unplayable). My art is ugly enough without resolution mismatches making it look like you have Vaseline smeared over your cataracts. But that means the experience on mobile is slightly different (and by that I mean slightly worse, but usable). I somehow feel like this would have been easier to do in Unity but no time for regrets now. It's submission time!

As of this writing I'm still working on the complete version of the game. I'm hoping it gets completed before December.

Look out for part 2 for the part after game jam.

Leave a comment

Log in with itch.io to leave a comment.