🤑 Indie game store🙌 Free games😂 Fun games😨 Horror games
👷 Game development🎨 Assets📚 Comics
🎉 Sales🎁 Bundles

city generating tips/help needed (c# unity)

A topic by mbaal created 13 days ago Views: 70 Replies: 2
Viewing posts 1 to 3

So I'm working on a transporting tycoon game  and  I just can't get past the city generating problem.

I store the world tiles in a 2D array and create an object called town.

In the town Script attached I have a function that should put down a road and then create more roads and residential. but i cant figure out a good way to do this. 


does anyone have some tips or suggestions?

Moderator

City generation is tricky. For RogueBot I first generated a street grid, then broke it up by adding "islands" in certain intersections, that contained parks or simply more buildings. The result is hardly realistic, mainly for lack of diversity, but looks reasonably organic at least. Might serve as a starting point.

What properties do you want in your city? I think it would be helpful to first manually plot out a few cities that are "typical" of what you would like your generate and then work backwards from there to come up with an algorithm.

Here's a useful article that could serve as a starting point for generating cities. The rooms generated would be your towns and the edges your roads.