A downloadable game for Windows

Made for the Litlte RPG Maker Mini-Jam over a long weekend. I decided to play around with some procedural dungeon generation algorithms I had been researching, and I thought it would be funny to implement these in RPG Maker XP.

It turned out to be a lot of work to figure out how to dynamically create things in RPG Maker XP. All of the level layouts, treasure chests, enemies, etc are all created dynamically in script, based on random seeds. If I had more time, I would have added a seed entry prompt too. The maps could have been bigger, and I would have liked to add more set-piece rooms and details.

There's probably no reason to keep playing past level 10, and gold does nothing.


Technical explanation:

The entirety of the map loading logic has been replaced, so that it no longer loads from file but instead generates the map and all items/enemies/events at runtime. I used a custom random number generator (xorshift16 with a Weyl counter), but that probably wasn't necessary since I could just have seeded Ruby's random generator instead.

There are two algorithms being used to generate the levels. First, a KD-Tree is generated using random divisions, with the first weighted towards the being at 1/3 or 2/3 of the size of the room. This is what generates where the walls will be placed, but the rooms are not yet connected. From the list of rooms (the "leaves" in the KD-Tree's graph), connectivity data is created to determine which rooms are adjacent to which others.

Using the connectivity data, the second algorithm, a Random Depth-First walk is used to generate a maze from the KD-Tree. Doors are placed randomly on the shared walls.

The enemies are then placed one per 4-tile division of each room (in its longest dimension), except for the stairs room and the treasure room.

The biggest challenge was just to figure out which event numbers did what from script, so that I could synthesize the treasure/stairs/enemy encounters on map load. It took about 6 hours to implement and debug the level generation logic, 2 hours to make all the assets and entity types, and then about 10 hours to just do all the grunt work of figuring out how to make things like the stairs, treasure chests, and encounters in script.

Download

Download
RedskyTowers.zip 1,010 kB

Leave a comment

Log in with itch.io to leave a comment.