Another big gap between the last update and this one. Â Part of it was a good thing (two-week vacation to Japan) and part of it was a bad thing (two weeks of airport-spawned sickness after going to Japan).Â ThenÂ for the last month I continued to purge that damn technical debt.
It turns out thereÂ were a lot of things that the game generated (including things I wrote this summer when creating the overworld) that was mired in sub-awesome way of storing things. Â I can’t say things are perfect now, butÂ my Perforce Â tree is starting to fill up with all the datafiles I can now create, search and copy to my heart’s content.
The datafile systemÂ (again, inspired by the one used inÂ Dungeonmans) allows me to use tables to reference other tables, as well as arbitraily roll dice for whatever I want. Â I still have entities to squeeze into the system but I think everything else is in a pretty good state. Â Now I just have to train Notepad++ to parse them just a hair better and I’ll be in a great place for editing.
One thing I won’t be converting into text files is the Patch System I wroteÂ for my initial attempt to create cities. Â I wrote that system to integrate well into the entity editor, and I can drop in a bunch of tiles into an object and then drag the object right into an info panel to bake it out. Â I’m not great at tools but I’m pretty happy with that one. Â I’ve only just started to fill out variety with it but I think it can produce some really crafted setpieces in the midst of the pile of procgen that a Roguelike generally has.
Coming back toÂ working on the generation of a quality city, I decided to double down on the value of Patches and try a generation system that capitalizes on it. Â We colloquially call it the “Crown Royal bag” method, once again inspired by Dungeonmans (Jim mentioned in his talk at last year’s international Roguelike conference). Â It was actually first written about by Mike Anderson on RogueBasin. Â The idea is to keep a list of all yourÂ legal walls that can hold doors in a list and draw randomly. Â Pick one of those walls and consider busting a door into the side. Â Then pull a precrafted “room” from your virtual Crown Royal bag at random and see if it fits onto that particular doorway. Â If it doesn’t fit, throw it out and start over. Â For hundreds of draws you might only place 40-50.
There are number of issues using this for a city. Â First of all, as you can see here,Â my tiles are created withÂ entrances and exits built in… Â Â I had to create an entrance and exit tagging system to figure out what tiles were valid connections to each exit. Â That wasn’t too hard luckily, although I have to create connections now for single-lane roads and just plain asphalt and dirt, which are more interesting alleys and short cuts than the core big, two-lane roads.
Second, the technique basically creates a tree rather than a nice, playable dungeon with loops. Â I’ve got a ton of ugly dead ends and roads that lead up to other roads but don’t connect. Â It’s important for the proper feel that intersections look right and create nice setpieces with crosswalks and driveways and stop signs and such. Â To accommodate this I needÂ a more sophisticated system, in particular a way to overlay roads onto other roads and have them convert to intersections. Â That actually means that I’d be heading intoÂ creating a road link system instead of relying on handcrafted patches, but I think I can integrate some smart tagging on my tiles to handle this.
The battle continues… Â Trust it’ll look better soon.