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. 🙂