A Brief Overview of ‘dungeons’ so far

‘dungeons’ is the 2D dungeon crawler I mentioned earlier. The main focus is on procedural generation of ‘levels’ with a number of randomly scattered features; rooms, keys, gold and enemies, for the moment.

At the moment, when a level is generated, the following events occur:

  1. Rooms are generated with a random size in random locations. Each room has a random number of doors cut into the walls. doors
  2. The each door is randomly connected to another randomly chosen door using a simple implementation of A* Pathfinding (inspired from this helpful article). After being connected, the door is marked as such, so that it cannot be chosen again. This has two downsides: 1 – There will always be a door that is the last one standing and permanently unconnected. This could be a room with one door. 2 – Paths cannot currently overlap, so it is somewhat messy.connected doors
  3. The middle start area of each level is created at the center. This contains the up and downstairs to the previous or next level. The top most level never has an upstairs, for obvious reasons.stairs
  4. Gold is scattered around for points, keys are scattered around to unlock the trapdoor leading down to the next level. Both are spawned only within rooms, and having more than one key (currently up to five) combats the first disadvantage mentioned in point 2 above.keysandgold
  5. The corridors and room walls are decorated, sort of Dungeon Keeper style. This is done by recognizing the ‘passability’ of tiles surrounding each tile and deciding on which type of layout it is. An example is a right hand corner.decor
  6. Finally, monsters are spawned. These are passed the current level tile data to decide where they can move, and move with a bias towards their current directions rather than turning, so are decorated like zombies for now.zombs

When the player plays the level, all tiles are hidden except those they have just passed. These are revealed with a cardinal line of sight of 5, then forgotten on a tile by tile basis after five seconds, unless a torch item is placed down. visibility

That’s all for now. I’ll release a playable version as soon as its a bit less buggy and a bit more interesting to play. If you want to play it now anyway, send me a tweet and I’ll get back to you soon.

1 comment

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 )

Google+ photo

You are commenting using your Google+ 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 )


Connecting to %s

%d bloggers like this: