Haunted Mansion – 2018 7DRL – Day 7, Finished!

Another year, another 7DRL. 14 of them now. Play it now here!

You are a Real State agent who visits an old abandoned mansion to assess its market value and put it on sale, but when you are inside, checking some of its ancient artifacts, you pass out and wake up in a room…. what surprises await for you in the mansion? Every time you play there will be a new adventure!


  • Design, Code and Integration by Santiago Zapata
  • Game Art by Giovanny Ramirez
  • Cutscenes by Bombillo Amarillo
  • Ambient Music and Sound Effects by Ashton Morris

I was only able to fit less than 2 hours on the final day (!). During the day I precompiled the list of things to be done in my head, to make the most of out the limited time I knew I would have. Here’s what I did during that final push:

  • Integrate the walking animation for the main character (!)
  • Add ambient music
  • Add doors opening SFX
  • Add intro sequence
  • Add endgame image and logic control.
  • Add losing condition (time limit, 20 minutes)
  • Fix issue with conflicting camera fades
  • Add instructions

As you can see, all of it was polishing, no new game content but I think it was worth it to provide a better end product.


I’m happy with the results this time. Following are the things I wish I could have included:

  • Slightly more elaborate puzzles: I wasn’t aiming for very complex puzzles, but hoped for more than just keys + doors.
  • Descriptions for objects in the mansion, including tying them to the (generated) history of the inhabitants.
  • More furniture and room types: Especially the beds, bathtubs, toilets and dining tables. I got some of them from Giovanny late on Sunday but it was too late to include.
  • A real mansion layout generator: A higher level generator which could decide the room types and positioning based on a general mansion pattern. (Sadly, right now rooms types are just randomly chosen).
  • Footsteps SFX: Time was running out and I couldn’t figure out a 5 minutes solution for this so had to leave it out.
  • Rooms of variable size with scrolling: Will probably require some tweaking to the engine since som many things are tied to the fixed size (had to do it because of the jam constraints)
  • Animations of the character walking up and down and a better walking animation.

On the other hand, this is a list of things I was very happy to achieve:

  • Setting the mood of the game, with the in-game art and the color palettes, as well as the awesome ambient track and SFXs and the intro scenes.
  • The engine for mansion exploration including item management (sadly couldn’t exploit it more)
  • The mansion layout generator, and tying it the engine which included transforming the 2D map into a logic structure.
  • The room generator which managed to create somewhat believable mansion rooms (and was pretty polished)

So far, only a couple bugs have been reported (and none of them seems to be a extreme blocker) which is good:

  • Sometimes you can escape the boundaries of reality and walk thru the background of the room
  • In some contexts, the game runs too slow. (Still trying to find out the causes)

I consider this is a complete game (go ahead and try to escape the mansion!), however I believe there’s potential to continue working on it. Here are some ideas I’m thinking on working on besides the ones already mentioned above (I’ll likely write a longer post about it in the future):

  • Multiple stories mansion: Stairways, balconies, towers.
  • Multiple ways to die.
  • Separate look and use commands.
  • NPCs lying around giving you info and driving the plot.
  • Scary moments!
  • Hidden rooms.
  • More!

Time invested: 30:31


Haunted Mansion – 2018 7DRL – Day 6

Getting close to a playable game, at least now you can roam the mansion and your advance will be restricted by locked doors for which you have to find a key. With some more efort we will have a basic game.

Coded the transformation of dungeon rooms into mansion rooms, effectively integrating the random layout generator into the engine.

Modified the Dungeon builder to generate sections separated by locked doors, and placing keys for the player to find, ensuring it’s solvable.

Splitting the mansion into sections, while not “realistic”, makes for a more interesting scenario given the time limitations. (Else there may be places worthless to explore, and determining the winning condition would be harder)

Screen Shot 2018-03-10 at 2.45.11 PM

While on a boring adults’ assembly, started thinking on the theming of the rooms, based on the list of objects at hand. Ended up with some room type definitions

Screen Shot 2018-03-10 at 10.50.20 PM

Used this to select the floor and wall types for rooms (as well as persisting the color selection).

Started integrating the content into the rooms, starting with some floor and wall decoration.

Screen Shot 2018-03-10 at 10.42.21 PM

To Do

  • Continue integrating different room types
  • Add character art and walking animation
  • Win and Lose conditions

Screen Shot 2018-03-10 at 10.56.11 PM

Haunted Mansion – 2018 7DRL Day 5 – No Code

I couldn’t afford to code on the game today. 😦

However, on the art side, Ashton sent a cool sounding ambient track as well as a pack of eerie SFX.

And we also had advancement from Giovanny who created 40 different objects to populate the mansion.

I also contacted some old friends who made the art of Ancient Shadows, and they agreed I could use some of it on this project, I’m thinking on using them for a kind of intro sequence.

Finally, even tho I couldn’t code, I thought a lot on the theme and general structure for the game as well as the main character. Here’s the first draft, a summary of what the game is about:

You are a boring Real State agent who visits this old abandoned mansion to assess its market value and put it on sale, but when you are inside it, checking some of its ancient artifacts, you pass out and wake up in a room. You find out you are trapped inside the mansion and begin looking for a way out, but as you do that you discover a monster is about to invade our world and the only way to stop it is by invoking an ancient ritual, whose details are scattered all around the mansion.

Of course, there’s only two days left, and I’m super tired… I’ll likely fail.

Haunted Mansion – 2018 7DRL Day 4 – Procedural at last

<insert complaint about being too busy here>

At long last was finally able to start working on the procedural aspects of the game. After a false start trying to come up with a generator that created the rooms layout directly, I decided to do a two steps process where I first generate a general layout and then I can go through each room and transform it to the format required for the engine.

I took Ananias’ dungeon generator as a base, removed a LOT of things on it, and tweaked it for the purposes of this game (super narrow rooms with 8 specific possible exits and no corridors at all.

Screen Shot 2018-03-08 at 9.34.27 PM
Prototype 7×3 room with possible exits marked as asterisks.

It took some effort but finally got some good results. Next step involves mapping this to room data, including translating the vertical rooms to the horizontal format.


Screen Shot 2018-03-08 at 9.26.45 PM
Room boundaries marked as #, Doors as + signs, starting room is in the middle on the top


I still need to add the locks / unlocks to it (i.e, pairs of keys and locked doors, or some other kinds of more creative obstacles). But I’ll first integrate this basic map into the engine so the player can roam the mansion.

Already thinking in the best way to cut the scope to provide a finished product while it still being interesting and not just an alternate format for a plain exploration game with lots of backtracking.

Things on the ToDo:

  • Integrate mansion layout generator with the engine
  • Character art and walking animation
  • Better Inspect stage objects (Description)
  • Layout generator including keys and doors
  • Mansion history generator

Time counter

Screen Shot 2018-03-08 at 9.56.37 PM

Haunted Mansion – 2018 7DRL Day 3

Didn’t manage to do much today. Especially missed the mark for doing the first version of the procedural generator :/

Added identification of objects via UUID to prevent them from being generated multiple times once picked, this also allowed me to implement the “Drop” command.

Unlocked doors are now also kept status so you can drop your key to lighten your load.

Finally, I got the first batch of art from Giovanny for the walls, doors, and floors. I  did an initial integration (still with random hues for walls and floors) and looks pretty good.

Screen Shot 2018-03-07 at 10.27.10 PM

Time Invested so far: 12:00

Haunted Mansion – 2018 7DRL Day 2

Another crazy day at work and adulting… but this is the 7DRL, there are no excuses.

  • Room Collisions have been implemented, instead of checking point inside trapezoid, I just put some invisible blocks as boundaries.

Screen Shot 2018-03-05 at 11.29.00 PM

  • Added objects in the level with collisions and depth ordering
  • Doors now have to be “used” in order to navigate, and you can potentially use other objects in the world too.
  • Fade effect when using doors
  • Picking up items, simple 9 slots inventory with an “active” item you can change with tab
  • Paint walls and floors in the level with random colors
  • Using keys to open doors

Screen Shot 2018-03-06 at 7.03.21 PM

Giovanny continues working on the art part, mainly focusing on more floor and wall types, as well as some initial objects.

Captura 1Captura 7Captura 3


Base engine

  • Drop items
  • Persist door status
  • Better Inspect stage objects (Description)
  • Character animations

Procgen 1

  • Layout generator including keys and doors
  • Mansion history generator

Time Invested so far: 9:00

Haunted Mansion – 2018 7DRL Day 1

GOTO Day 0

Expected to advance a bit more but was caught up in a lot of work.


  • Created project skeleton based on phaser-es6-webpack
  • Coordinated with Giovanny the format for the assets. Agreed on a style (black layout + paper texture + color), hoping we can achieve it.
  • Basic project setup, output a sample empty room with a sprite moving around using cursor keys.

Screen Shot 2018-03-04 at 11.23.01 PM

  • Implemented navigating through rooms, using a fixed mansion layout and basic art


  • Talked with Ashton Morris, he’s going to work some awesome ambiance and SFX for the game.
  • Giovanny set to work and sent me some initial artwork for testing integration

Peek 2018-03-05 17-46

To Do

Base engine

  • Collision with room boundaries
  • Collision with stage objects
  • Pick up items
  • Inspect stage objects
  • Use keys on doors
  • Character animations

Procgen 1

  • Layout generator including keys and doors
  • Mansion history generator

Spent time: around 5:00