Been working a little on a city spawner script for my helicopter game.
It’s grid based and handles arbitrarily large “city parts” by inspecting colliders and fitting the part into the grid based on a lot of stuff. For example you can set a parameter to control how “flat” the ground needs to be in order for a part to be placable at the location. So you can basically splat a city onto a hilly landscape and it will place houses at appropriate locations.
It also supports a bunch of parameters to controls “neatness” as in how flawed placement the city parts have. Here is a “suburban area” with a high neatness:
The first time i ever saw a vista like this was in Grand Theft Auto vice city - after you get the helicopter - i started flying around and realized you could see the whole city - it was a real moment. Now you’re doing it in unity.
Even better, i dindt know you could “stream in” stuff like that via a script or procedurally generate things. Im coming from a pure flash background where you can do anything in actionscript - knowing you can create a script that does this in Unity too is a real inspiration for me - thanks.
Thanks for the encouragement! I will be working on roads yes… not entirely sure how to make it look good… but considering the low-poly buildings I think I can get away with something fairly rudimentary.
On a side note… does anyone know how to get rid of the Z-fighting flickering after you use CombineChildren?
This is great. I’m a big fan of procedural content, this is exactly the kind of stuff we need more from because as Indy developers we can’t spend months just filling the game world. Without procedural content, we’ll always be limited to small games.
It definitely draws inspiration from Desert Strike. However the gameplay will be a bit different… more RPG elements but not as involved story, since it is a one-man indie project at the moment.
Is a great Work :shock: , I want to see the helicopter in action.
The street can be the same sand but more clear, like a town. Is rare to see paved roads in the middle of the desert. And the roads are too rect, please put some curves.
Yep, my frustum is quite shallow… this is some other problem where the CombineChildren script seems generate multiple redundant triangles or something.
If redundant triangles are being generated, you should be able to detect them in the graphics statistics panel by comparing your scene with and without using CombineChildren.
really nice work so far and what more you can do, it’s to make the buildings to automatically find the ground under them, and to place them self on it. You can make it thru “Awake” function