LOREBOUND INTERACTIVE

Last week, we discussed how we were starting the prototyping process and concluded that the first item on the agenda needed to be a rudimentary city map generation system. We also discussed how art is not a factor in the prototyping stage, as that comes much later. It's all about creating and testing functionality, not making it look pretty. That said, we now have a rudimentary city generation system up and running.
Here's a short video showing the procedural generation of the city map in action.
So what are you looking at? Well, we basically have a grid generation system here, made up of map 'tiles'. While most of these tiles are 1x1 generic tiles, there are special tiles called landmarks that have some unique characteristics. First off, they have a footprint, which is a collection of points that defines what tiles a landmark takes up when placed. In fact, each landmark can have multiple footprints, and the generator will randomly choose from them, or if none are defined, it will use the default length/width defined in the blueprint to create a "default footprint" on the fly. This is so, even if a designer forgets to populate a new landmark with any footprints, it will still be created and not crash the generation.
So what are the cubes floating above the landmarks? Those are placeholder meshes that eventually will be visual representations of the type of landmark, such as a floating cross for a hospital, a hammer and wrench crossed for a hardware store, a gun for a military base, etc. These placeholders show that the mesh generation is working, although more work is needed in this area to get it in the visual center of whatever footprint is created.
Another interesting feature is the zone coloring. I had to create dynamic material for the zones since they need to be able to change color based on faction control. Right now, since that isn't a thing yet, they are just randomly assigned, but the system for assigning colors is working.
Each landmark also has a specific minimum and maximum number that can be spawned, but I ran into some interesting issues with the spawning logic. If something large (like a stadium) has multiple iterations (either because of a high minimum OR maximum) you don't want to spawn all of them before moving onto other landmarks, as there may be no legal spaces for later landmarks to spawn.
Instead, I'm having the logic iterate through the list of buildings, comparing the current 'pass' and only spawning it if the minimum is not met yet. So if we have buildings A with a min of 1, B with a min of 2, and C with a min of 3, the generation will spawn the buildings in the order of A B C | B C | C, before then repeating the process to add extras up to the maximums. This keeps any one landmark from being starved out, and we get as many of the minimum landmarks in as possible. Also, each landmark has a "target" number to spawn somewhere between its min and max, so it won't always fill a map with the max possible. This is because we want to enable behaviour like a landmark with min 0 and max 4 sometimes spawning none.
Eventually, I want to add a system to gather single tiles into generic districts and neighborhoods dynamically. This is a bit tricky because it needs to minimize the amount of "orphan" tiles, and I'm not sure how I'm going to do it yet. Also, other dynamically generated zone types must be created for terrain like rivers, mountains, and green spaces like forests and parks. All of these will need their own special parameters and generation logic.
With all that in mind, I'm pretty happy with where the generation is currently, but I've decided my next step is to make a UE5 design tool to assist with creating landmark footprints.
One of the coolest features of Unreal Engine 5 is that you aren't limited to the engine's tools and can create custom ones that interface with it. Most of the time, these are created in-house at a studio by tool engineers to help designers accomplish a task easily and quickly without having to fiddle with the much more technical bits.
Right now, footprint data is basically a set of relative Cartesian coordinates. Most human minds don't think in that way, though. So, the tool I'm going to create will fix that and allow designers to quickly create and save custom footprints using a visual interface. In preparation for this, I've already extracted the footprint data out to its only public structure.
Stay tuned to see how it goes!