Learn Ruby the Hard Way – Exercise 45 You Make a Game

Here is my work for Exercise 45.

I took the game I created for Exercise 36, and made it “classy”. Originally, I had the player pick an item in the basement. This item would determine which monster they would run into. In this revised version, the player will get to interact with at least two monsters.

I used an Engine class to play the game, and a Map class to determine the next scene. I had a bride of Frankenstein and a merman (think Merman from Cabin in the Woods) in the original game. I added a zombie for Exercise 45.

I created a Player class and a Zombie class for a battle showdown between the two. Each turn, the player could decide to rest or fight. (Resting increases health points.) The zombie would attack every turn, but its accuracy would drop to 50% once its health points were lower. The math took a bit of figuring out! (I didn’t want the player to be able to get away with only attacking every turn.) However, a small ‘problem’ that remains is that the player could choose to rest every turn.. forever! I need to get more practice with game design.

My game, inspired by Cabin in the Woods. Now that’s it’s October, I have another excuse to rewatch the movie!


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s