Let there be doors!

The building generator no longer creates rooms without an exterior wall and adds a door to each exterior wall. Still dealing with some bugs though:

Double doors?

I’m seeing doors in random locations around the maps, but I also found these double doors which I didn’t intend. Procedural generation finds a way!

I’m still stumped on how to implement z-levels for buildings. I have some ideas, but none of them are particularly elegant.

Partitioning Buildings

First interior wall

Working on some code now that partitions buildings into spaces that can be used to house the city’s various businesses.

Initial vertical partitioning wall

I need to better develop the generators created earlier to populate each space with a business, but I am more worried about implementing z-levels for buildings. I’m not sure how to deal with staircases or elevators, and, more specifically, how I can make sure each space has access to them. Spaces on upper levels obviously can’t have doors on exterior walls :).

Partitioning buildings recursively

Building Variety

Corner buildings suck

I’ve added some variety to the building shapes. The “corner” buildings took much longer to get right than I had expected, and, to be honest, they are still very buggy. I had to run the game a few times to get that screenshot. Here’s what they look like most of the time:

🙁

Part of the weirdness is caused by the algorithm I’m using the draw the map, and part is the actual code that generates the buildings. It has already taken me several days to get here, but I’m going to keep at it until it works the way I want.