• Add Review
  • Subscribe
  • Nominate
  • Submit Media
  • RSS

Started on Xu, made a dungeon layout tool

This month I started out to implement the playable hero Xu. I made battle animations for four of her skills, including the diverse elemental attacks Soul of Nature (Forest-element), Soul of Crystal (ice, which counts as Shadow-element), and Soul of Flame (Fire-element, obviously). Like Zelda with her elemental arrow attacks, Xu is a highly magic-centered character whom I allow to cheat by having lots of different elements to attack with. ;)

After finishing those up, I decided I really should hunt down and squash one of the critical bugs currently in the game: it sometimes crashes when moving from one room to another. Since the crash happens infrequently, I theorize it may have something to do with specific positions of rooms within the dungeon, for example the edges or corners. To test that theory thoroughly, I need to control how the dungeon is laid out, rather than leaving it to the random generator as usual. I could do that with debug code that forces the generator to lay the rooms out a certain way, but I decided to instead make a general system for creating non-randomized dungeons, since I'm going to want to make a bunch of those eventually anyway.

So I created a spreadsheet document in which I could 'draw' the details of a dungeon's layout -- what rooms are where, what doorways connect them, which monster groups if any are in them, etc. Then I worked out formulas to translate that information into the variable values that represent them in the actual game and export them into data files that can be read by my DynDatabaseOverride plugin. This isn't the first time I've incorporated such spreadsheet-to-data-file tools into the project's production pipeline, but it was rather tricky this time. The dungeon layout info is represented two-dimensionally (since the rooms are conceptually north/south/east/west of each other), but I had to rearrange that into single rows in the translation process. I still haven't quite gotten the game to run correctly with the custom dungeon layouts, although I'm reasonably certain the data itself is sound. I just need to incorporate it properly into the dungeon generation code.