Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics

city generating tips/help needed (c# unity)

A topic by mircogames created Aug 10, 2017 Views: 216 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?


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.