Haunted Mansion

Rules:

  • Move with WASD
  • Aim and shoot with the mouse
  • Collect the coins
  • Shoot the zombies
  • Freeze when the ghosts touch you
  • Don't piss off the statues

Difficulty:

Documentation

Concept

The basic idea of this game was to have a character running around a haunted mansion, trying to find the treasure inside of it, and fighting off the various things that would haunt such a place. I wanted there to be not only ghosts and zombies that would be dealt with in different ways, but also statues that would be outside of the map itself and follow the player around with their eyes. This part was greatly inspired by the illusion of the busts inside Disneyland's Haunted Mansion ride where their eyes seem to follow you no matter where you are in the room. In this game these statues' eyes would turn red every now and again before shooting beams at where the player was when their eyes started to turn.

I thought this as a mechanic would combine well with the way the ghosts kill the player, so while the player might be standing perfectly still to avoid a ghost from killing them, they would be vulnerable to the statues and vice versa.

1) Div layout

First I layed out the outline of the game board.

2) Statue Tracking

Then got the secondari canvii (those on the corners of the map canvas), to track the position of something on the screen. At first it was the mouse

3) Player Movement and Shooting

Created the player character, got it to move around the map and track shots where shoot wherever was clicked. These lines you see here are what became bullets.

4) Shooting, Ammo, Coins, Scoring, and Zombies

At this point I added bullets that were tracked throughout the loop (so they didn't just stop wherever was clicked) and created something for them to shoot at-the zombie monster. Along with an ammunition tracker and randomly spawning ammo drops that the player could pick up to replenish their ammo. The other dropped item, coins, the collection of which determin the score, was also put into effect here.

05) Collisions, Ghosts, Statue Kills

Added collision tracking between the player, zombies, the bullets that kill them, and ghosts, the new monster. This monster does not kill on contact like the zombies do. They will kill the player if the player moves at all while the ghost is touching them. This includes the mouse, seeing as that's what the player uses to aim. The final enemy, the statues that inhabit the outer canvii were added here, at least as far as they shot lasers at the player every so often.

06) Start Menu, Difficulty

With most of the actual game elements put together, at this point we started focusing more on the design of the game and the UI with which players would interact with it. This included a start menu that appears when the game begins where the rules are explained and the player can set their difficult with a slider. This difficulty increases the likelihood of all the different monster related events (zombies and ghost spawns and then the beam being shot from the statues' eyes) while also decreasing the likelihood of ammunition refills spawning.

07) Pause Menu, Play Button, and Highscore Permanance

After the start menu, I created a pause button, pause menu, and a play button that would appear to get the player out of the pause menu. Also created a highscore that would be remembered by the users computer in between uses.

08) Assets

Now, after all the elements of the game were done, I could finally create the assets to be assign to the character, ghost, zombie, statue, and map. Note that the statues' are actually a seperate drawing from the statue itself because they have to move around and follow the player where that character is on the map.