This past week I’ve been polishing a new feature for procedural generation, patches. This allows me to hand-create a collection of assets (both single-tile and multi-tile) that gets placed down in a singular area by the terrain/city generator. It can be a solid square or only fill some of the squares within. I can import any patch by dragging in a group of objects from a sample scene. The tile system already converts the patches into the tileset currently in use by that map, and mixes in variants as they are available to the tileset.
The patch system has a lot of additional features yet to do. For example, allowing the definition of patches in a nine-slice style where I can scale them to an arbitrary size with consistent edges. This would allow me to create arbitrary-sized plazas, but more importantly, I can create a road patch that has signs, lights and various elements on it, that scales according to the length (and width if desired) of the road.
I also want to put in randomized prop points: object stubs that will randomly place a specific prop in that spot, anything from a trashcan to a stain to an ambient effect. It also allows me to place variants of an existing entity, such as a destroyed version. This will be important so that my generated city doesn’t look all pristine the way it does above.
I didn’t expect to get dragged into city decor so early in AutoFire’s development. It’s certainly a topic of interest to me, but the push in that direction really came from trying to find props for the game. My 7DRL city was fine, it was basically a dungeon. A dungeon can be a twisty maze of passages and hallways don’t necessarily need a specific direction of travel defined. However, it felt like 90% of modern-day props required placement with some thought… You can’t just sprinkle in mailboxes, street lights and stop signs via Random.Range(0, size)… There needs to be established clusters and strips of materials. I can construct hand-built areas anyway, but to extend everything into procedural town I’m pushing the limit of my limited home-grown tools.
Rolling from all this, I’ve also discovered as my game’s scale gets better established that I’m reaching a point where my single-square building assets are looking weirder and weirder… I want the cars to be big and bold, and characters in the world to be larger than life also, but right now they are about two stories tall. I was okay with something more abstract and representational when I was in 2D, but working in 3D makes that scale a bit more important. Aaaaaand the only way to get my building “walls” closer to the “correct” size is to come up with a system for merging building squares into larger structures. That will take a whole new post-process that… I’m going to wait on.
I’m quite aware that I’m running the risk of entering a bottomless pit of effort… Making a city look like a city is hard, and many games make that their only thing, whereas I have
so much more to do. So, I’m going to finish up this patch functionality and pull back to environments that are a bit easier to generate, such as frontiers, shanty towns, junkyards, and so on. This way I can push back into mission generation and create some assassination missions and encounters. This will finally lead me back to the promised land: the refinement of driving mechanics, combat and its associated UI.
Glad all this is so fun. 🙂