Midterm Documentation – Final Part

Save the Zombie!

Overall Concept

For my midterm, I decided to recreate the google dinosaur game that pops up whenever you try to go on a google web browser without a connection to the internet. In the dinosaur game, there is a dinosaur, cacti, and a simple background containing moving clouds. The game prompts the player to use their keyboard keys to make the dinosaur jump over the cacti as the cacti randomly enter the canvas. If the player does not press the key or presses it at the wrong time, the dinosaur will collide with the cacti and the game ends. To goal of the game is to avoid as many cacti as you can. To keep the player intrigued with the game, the game displays the player’s score and their high score.

I find that it is a very simple but engaging game. The purpose of it is very user-oriented since it allows the player to do something while they wait for their internet to connect again.  I also decided to go with this concept because it looked simple and achievable for me. In the beginning I was exploring other games that I used to play when I was a kid, but I thought dress-up and restaurant games would be too complicated. To make it my own, I decided to go with a Halloween theme since we are in October, I love Halloween, and I am going to miss the Halloween decoration from home. I did change a few things as I was creating the game in terms of the narrative and how the player would win. Instead of having a high score, I made it so that the player has to reach a certain number of jumps in order to save the zombie from a pumpkin attack.

Technical Decisions & Game Design

It is important to note that I took inspiration from Dan from The Coding Train on YouTube. He made a video replicating the dinosaur game with his own twist that included different images and controlling the character using the player’s voice. I decided to omit the voice control portion, but used his code as my base code. I knew I still needed to add other parts to meet the midterm requirements such as on-screen text, sound, the start screen, and a way to restart the game without restarting the program.

The start screen with instructions

My Zombie game includes the start screen, the game scene, and two different end screens depending on whether the player saves the Zombie from a pumpkin attack or lets him die (again). Using Dan’s code as my base code, I also had to change a few things. For example, his game used noLoop() to stop his sketch completely. He also continuously drew the pumpkins because he had no need to restart the game. I used the class sample code by Professor Mang that showed how to restart the game and implemented it into my code. I found out that because I did this, I also had to change how the pumpkins would show up in the game. To do this I created a pumpkin array and an if statement that said if the gameState == “playing” is true and the chance of adding a new pumpkin is random is also true, then a new pumpkin is created. I was proud that I was able to integrate the code into a base code that I changed, it really forced me to go through the code and understand every single part in order to figure out what parts go together. It was almost as if I was solving a puzzle.

I also wanted to end the game in a certain way instead of having the player make the Zombie jump as many times as they can. To do this I decided to create a storyline. In this game, the player is trying to save the Zombie from getting attacked and killed (again) by the pumpkins. In order to do this, the Zombie needs to avoid (jump over) the randomly generated pumpkins 10 times. I chose this number randomly.

Walking zombie with a cheat circle
Problems I Ran Into & Improvements

Even though I used a base code, I ran into so many tedious issues. I appreciate what coding does and admire everyone who is able to think like a coder, however I think I find it almost as scary as some aspects of Halloween. I mentioned in my second part of my documentation that I had trouble with just loading an image, I think that issue was probably the issue I took the longest on. It was not the correct path and I simply replaced the Zombie image with one that was not in a sprite sheet. I also struggled in integrating new code in an already existing code, mainly because I obviously did not make it and I had to take time to really familiarize myself with it in order to put the puzzle pieces together. Once I did familiarize myself with it though, I was able to figure out where everything else is supposed to go.

Another issue I had was that at first I did not include circles on top of the character images. However, that made the user experience difficult because even though the Zombie itself would not touch the pumpkin, I am guessing the background of the image did. This would cause the game to end even though the player didn’t know that the images touched since you visually couldn’t see that. To solve this I decided to add circles over the images to clearly define the borders and help the player better calculate when to press the space bar. I call it the cheat circle since it makes it really useful to jump at the right time and save the Zombie. Overall, I am glad I was able to combine what we have learned so far into a simple version of the dinosaur game that represents one of my favorite holidays.

Leave a Reply