Tuesday, 27 December 2016

Wall object and an idea

We all know rooms are an important part of a roguelike experience, but what about just walls? I was thinking how to create a smaller room inside a room and in the process broke down a room to individual walls with a starting point, direction and length. Also with optional door placed somewhere along the way.

Then as usual for roguelike developers I had an idea. What would happen if the wall object was created with checking if the door is in valid location (empty space on both sides) and then you would just create a lot of walls, possibly even with a backtrace routine to clean a wall that fails to create properly (wall object is such a small part that it could save the previous tiles under it).

I guess it's just going to create some kind of boring maze. But it's probably an idea I'm going to test when I get the actual work done with rooms. Who knows it could be an alternative option to the current maze routine which seems to have similar problems as it's quite boring. It's difficult to make interesting labyrinths with "strong" algorithms.

No comments: