Friday, May 30, 2014

Our Zombie Apocalypse

This quarter we did a pretty awesome Zombie Apocalypse Simulation.  We started off the quarter knowing nothing about code.  Here is our end result.  The yellow smiley faces represent the humans, the green crooked faces are the zombies, and the twinkies are the food.  The humans run away from the zombies, and the zombies run towards the humans.  We also programmed a function to have humans the ability to reproduce.  When two humans are on the same square there is a certain possibility that a new human will be created.  The twinkies are used to feed the humans.  If a human doesn't eat a twinkie within a time period they will starve and die!

We had the program include the option to change how many humans or zombies you want.  You can decide how long it will take them to starve.  Next, you can change the how big the grid is.  Finally you can change how many food sources and the chance that food will move.  We are pretty proud of this, because there are a lot of areas to customize.

All in all, we are pretty amazed at how our program turned out.  We had a bit of a struggle getting to where we are today, but it was worth it.  In the future we would add an interactive box for the reproduction rate, and to have an auto play button.  We think it would be cool to have this as a live background on an iPod, or desktop. In the end, we had a good time in stats, and really learned a lot from Mr. Pethan.

No comments:

Post a Comment