I made a game with zombies in it
I made a game with zombies in it
I Made a Game With Zombies in it!
Last weekend I created my first standalone project that I felt was worth showing off. It’s a multiple choice game with random elements that takes place in JavaScript alerts. It’s pretty simple, but it’s also pretty cool. Go ahead and play it, then come back for the breakdown.
The Cool Bits
This game came after I finished a Pluralsight tutorial and wanted to add more complexity to it. The version at the end of the tutorial would randomly select a weapon and then would roll a random number to see if the user would survive. I decided I wanted to add some complexity, like hit points for the zombie, weapon differences, and additional random elements. One of my favorites comes when the user selects to fight the zombies and then picks a knife as the weapon.
Not only does this give a cool countdown for successful hits, it also gives the player another chance to either critically hit or critically fail. Using this loop, a player can hit the zombie twice, but still critically fail at the end. I really like this sort of random nature.
Where I Got Stuck
There are two big places where I got stuck in this game, and the first was the both the most obvious and the most time consuming to solve. Basically, I had a curly bracket out of place. It’s an easy problem to have when writing a lot of code — and for me this is a lot. I have for loops inside of if statements inside of functions, and that got confusing fast. After wrestling with why the logic of my finale else statement wasn’t working, I took a hard look at what my program was doing, spoke some of it aloud, and found my extra bracket. Boom, solved.The second problem was that my random number generator was only creating a single random number and then using that through the entirety of the program, meaning that the cool knife fight from above would only go one way. My thinking was that each time I called the ‘random’ variable, it would generate a new random number.
The above code doesn’t tell ‘random’ to get a new random number every time — it simply tells ‘random’ to be whatever number Math.random generates at that instance. To fix that in the knife fight, I put another random = Math.random() at the top of the for loop. This means that every time the program goes back up to the top of the loop, it generates a new random number for the outcome.
I banged my head against the wall for a while on this one, and then on my commute to work I figured it out. I ended up having to record myself explaining the solution so that I could play it back when I got home.
Oh, and mad props if you got the reference 🙂
Xbox Wiki
Please make sure you read the rules and edit policies before making any major contributions to the wiki.
I Made a Game with Zombies in It!
I Made a Game with Zombies in It! | |
Developer(s) | Ska Studios |
---|---|
Publisher(s) | Xbox Live Ska Studios Windows Phone 7 Microsoft Studios |
Release Date(s) | Xbox 360 August 16, 2009 Windows Phone 7 November 29, 2011 |
Genre(s) | Shoot ’em up |
Mode(s) | Single-player, multiplayer |
Platform(s) | Xbox 360, Windows Phone 7 |
I Made A Game With Zombies in It! (stylized as I MAED A GAM3 W1TH Z0MBIES 1N IT. 1), is a zombie-themed action shoot ’em up game released for the Xbox 360 on August 16, 2009 through the Xbox Live Indie Game service. The game was developed by Ska Studios and was designed entirely by company founder James Silva.
Two years after it’s original release, the game was also released on Windows Phone 7.
Gameplay [ ]
The game features one to four protagonists viewed from an aerial perspective. Using two analog sticks, the players shoot droves of attacking zombies while collecting power-ups, with the objective of surviving until the game’s background song ends
Reception [ ]
The game was rated as the best Indie Game for the Xbox 360 of all time.