Spikes Runner: Floor Frenzy game I made

This semester, we had a lot of projects per subject and one thing that challenged me the most is the game development. We expected that it will be challenging because who wouldn’t be if your professor only taught the basic codes and how to use the game engine, he recommended us to use which is Unity? Unity is a game engine platform that developers, artists, and designers can use to collaborate to make various types of games. I am excited because this is something that I really wanted to do as a computer science student.

My excitement ended with some frustrations because our professor in game development didn’t teach us much about how to make one. We were so clueless about how a character will afloat, how to insert such sounds, and background music, how to make objects to be collected, and will restart when the game level ended. These are just some of the problems I encountered during making my own individual game. Although this game of mine isn’t a big project, I think it has some value to me because I really worked hard for it to finish.

2.png

My game was inspired by an arcade game I used to play before. That is why the settings, background, and obstacles were pixelated. First, let me talk about the character I used in the game. It was a hero-type character with a sword as his weapon. I didn’t create the character because it would consume a lot of my time, making sprites for every frame so I chose a free character in the Unity asset store which can be used freely and legally.

3.png

4.png

Why do we need sprites? Sprites can be used for the animation of the character. For example, when the character is walking, jumping, running, attacking, dying, and receiving damage from an enemy or objects. Without sprites, you cannot do an animation. It’s not hard to do animation in unity but the problem is the sequencing of the animation from walking to running, walking to jumping, and so on and so forth. The problem I encountered was after clicking the mouse to attack, it was continuously attacking unless I started to control another button such as left or right.

5.png

Secondly, the floor I made was minimalist and the color I chose was blue. In the photo, the floor was not moving of course, but in the actual gameplay, it was moving left and right. It was a challenge the player needs to overcome while playing. The speed of the floor was different from each other. You have to precisely time the jump of the character or else you’ll fall on the ground or pit which you’ll die and replay the game.

Thirdly, the obstacles are falling objects such as spikes. The spike's speed of fall varies depending on what I set to surprise the player. The spikes will not fall unless it was triggered by the player. There is what we called a box collider and this collider; I will set it as a trigger. When the player collides with the box collider, the spikes will fall. The box collider is invisible and always attach to the object. Even though I am the one who made my game, sometimes I forgot that spikes will fall and I died.

The other half of the background of my game.

The background I made was just an all-moon. I couldn’t think of better assets for the background so I stuck with the moon. I resized it in various sizes and arranged them on the background. If you will make a background on this, what background do you think will match? And what color the background will be?

Before you reach the door where the text “level completed” will appear, the most challenging part of the game will appear. I made the floor low and the elevation of the floor upside down. The speed of the elevator was quite fast and precise, and the timing of the jump was highly anticipated. Even myself, I cannot complete it in one try. I always fall and died.

The inspector section in Unity engine.

This is one of the things you can see in the inspector section. This particular inspector section was focused on the player or character. The Rigidbody 2D, Box Collider 2D, player script, and animator. One of the most important in these things is the player script because without the script, you cannot control the character or basically, it will be static and it will fall when you run the game. The animator you are seeing is the part where the animations are being controlled.

The animator section for animation sequencing.

This is the animator section and this is where you can control the sequencing of the animation. A while ago, I talked about the sequence when you walk and what’s after that. In my game, idle animation is almost connected with every animation because the player needs to stop the action. Idle to walk, jump, and attack. Jump to idle and walk. Walk to idle, attack, and jump. Jump to idle and walk.

The script of the player/character in VS code as C#.

The script is one of the most important things in making the game. I used Microsoft Visual Studio code as my code editor and C# as my programming language because that is the only programming language for the Unity engine. Basically, it was similar to C++, but quite different in some ways. Some of the codes have to get on YouTube or ChatGPT. ChatGPT is quite helpful in programming because it provides good codes but not everything it gives is reliable and working. I couldn’t wait to make another game, a big project when I graduated and hopefully, landed a good job in the future.

All images are screenshots from my game in Unity engine.

H2
H3
H4
3 columns
2 columns
1 column
Join the conversation now
Logo
Center