Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411502 Posts in 69379 Topics- by 58435 Members - Latest Member: graysonsolis

April 30, 2024, 04:38:46 AM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperDesignTown/City Generation
Pages: [1]
Print
Author Topic: Town/City Generation  (Read 1510 times)
RyanT
Level 0
**


View Profile WWW
« on: September 09, 2010, 06:38:35 PM »

Ignoring the language I intend on using, what do you guys believe is the best way of accomplishing the generation of a town or city? Essentially, the goal would be to generate streets, perhaps street names, lights, benches, and of course the buildings. These buildings would be a basic rectangle shape and would be designated a certain "Business". For an example, building one would be a hardware store, thus, it would have tools inside and workbenches.

My original idea of accomplishing town generation was to first generate the streets horizontally and vertically. Once finished, find the open spaces and fills it with a building. But of course, there is probably a better route to take.
Logged

http://www.terrortreehouse.com
A collection of science fiction short stories by Ryan Taylor.
RCIX
Guest
« Reply #1 on: September 09, 2010, 06:45:12 PM »

Mandatory relevant link: http://www.introversion.co.uk/subversion/
Logged
george
Level 7
**



View Profile
« Reply #2 on: September 09, 2010, 06:47:34 PM »

And http://pcg.wikidot.com/pcg-algorithm:city-generation

eta: holy cow, how did I forget this one:

http://forums.tigsource.com/index.php?topic=1982.0
Logged
starsrift
Level 10
*****


Apparently I am a ruiner of worlds. Ooops.


View Profile WWW
« Reply #3 on: September 09, 2010, 11:46:48 PM »

My original idea of accomplishing town generation was to first generate the streets horizontally and vertically. Once finished, find the open spaces and fills it with a building. But of course, there is probably a better route to take.

IMHO, you'll get a better, more "realistic" layout for your city if you generate the spaces instead of the streets, ensure there's separation between the building spaces, and assume streets lie between. Why? Because when you generate a street, you're basically giving your generator a direction and a length and connecting it to a previous street. This will make it look more like a regular grid than anything. If you build blocks you can have irregularly sized blocks on a 'tile' motif, and streets of varying length and connection to fill in the spaces. If you want to get fancy, you could add a neighbourhood classification that takes a larger area and says "all the blocks within are within the length and width bounds of s and t", which will make for a regular suburb or something, yet there's something else a bit away. Though if you want long broad highways and such through your city (that take up more than one tilespace in width) I'd generate those first first.
Logged

"Vigorous writing is concise." - William Strunk, Jr.
As is coding.

I take life with a grain of salt.
And a slice of lime, plus a shot of tequila.
RyanT
Level 0
**


View Profile WWW
« Reply #4 on: September 10, 2010, 02:09:20 PM »

Like always, this indie community has someone of the quickest people to reply to design questions. I will certainly read over each link/text provided, thanks!
Logged

http://www.terrortreehouse.com
A collection of science fiction short stories by Ryan Taylor.
george
Level 7
**



View Profile
« Reply #5 on: September 10, 2010, 03:18:54 PM »

Speaking of links, that reminds me of these from a programming blog that I think are good food for thought:

http://playtechs.blogspot.com/search?q=city+generation
Logged
Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic