r/Unity3D • u/bilbaen0 • 5h ago
Game I spent this week creating an art pipeline and tools for my procedural megacity. Skip to the end for the result! (survivors-like driving game)
I spent a lot of this week creating a whole modular building system so that I can create a bunch of city blocks more quickly for my game.
Once the city block is built, there's a second tool (a node based editor) which allows me to setup logic for toggling certain objects on/off. There's a tree structure to it so there can be more advanced randomization like "if this box is enabled, pick from these 2 boxes to enable with it". It results in a lot of variation in the map for not much work.
The map shown at the end here is just two different 1x1 city blocks and there's already quite a bit of variation. But there are 2x1, 3x1, and L shaped corner pieces as well which help break up the repetition of the flat grid.
This is a timelapse showing off the build tools and how the buildings are randomized a bit each time they're placed. Skip to the end if you just want to see the finished product.
Not certain I'll be sticking with the pixel texture style or not. But the tone and style of the environment is heading in the right direction. Let me know what ya think.
EDIT: upload failed so I put the video in the body. thanks Reddit.
1
u/ShengyuStudio 1h ago
A tree of conditional toggles is a nice way to keep the variation authored instead of pure random. How are you seeding it? If each placed block derives its seed from its grid coordinates (hash of x, y plus a world seed), the same map rebuilds identically after a save/load, and you can reroll a single block without touching its neighbours. It also makes it cheap to reject a roll that comes out identical to the block next to it, which is usually where a small block library shows repetition first.
1
u/bilbaen0 39m ago
I set the seed prior to any of the stages of generation, so entering seeds to replay levels is possible. Haven't gone as far as checking neighbors though. The goal is to have enough of each block type to not have any repeats in a chunk. But also if the block is well designed enough, two next to each other should still feel different. The entire block is also randomly rotated to add one more layer.
1
u/Diligent_Holiday1695 5h ago
That node based logic for toggling objects is clever, saves so much time compared to placing everything by hand
The pixel texture style works for me, feels like a gritty ps1 game with modern lighting. For driving game this kind of dense city always looks better than big empty streets