Skip to main content
Topic: Easier Manual City Generation (Read 4567 times) previous topic - next topic

Easier Manual City Generation

This idea is mostly for custom maps.

Instead of using random city generation, you would be able to read the city name, x and y coordinates, and population from a text file.

So, if you load up, say, Germany.ppm as a height map, the game would look for, say, Germany.city in the same folder.

Germany.city would look like:
Berlin,(xcoord),(ycoord),(population)
Hamburg,(xcoord),(ycoord),(population)
München,(xcoord),(ycoord),(population)
etc, where the xcoord and ycoord are the coordinates of the city hall, and the population is the city population.

This would allow users to play on "realistic" maps without having to add any of the cities manually while maintaining a random yet consistent flavor every time they start a new game.

Further thought: If (x,y) is under water, the city is ignored.

Re: Easier Manual City Generation

Reply #1
Would be a good extension request for scenario files..

Re: Easier Manual City Generation

Reply #2
And it would indeed be a very useful extensions in combination with heightmaps. It's one if have often thought about.
Bob Marley: No woman, no cry

Programmer: No user, no bugs



Re: Easier Manual City Generation

Reply #3
I haven't looked at the code since I am not at all proficient in C++, but in theory, this shouldn't be too hard to implement, should it? Anyone with knowledge of world generation?


Re: Easier Manual City Generation

Reply #5
I thought it would be impossible, but PPM could be extended exactly as you describe. If the other information comes after the picture.

My projects... Tools for messing with Simutrans graphics. Graphic archive - templates and some other stuff for painters. Development logs for most recent information on what is going on. And of course pak128!

Re: Easier Manual City Generation

Reply #6
Since BMP is the preferred image format for maps (since it is, at least RLE encoded, much smaller as PPM), the imformations should be rather independent of the image format.

Re: Easier Manual City Generation

Reply #7
i like it

Re: Easier Manual City Generation

Reply #8

And? Anything else to add to the discussion?

I would ask you to post in an old topic only messages that are useful. Bumping pointlessly an old topic is considered spam.

Please read this: http://forum.simutrans.com/index.php?topic=4529.0

Re: Easier Manual City Generation

Reply #9
And to clarify, jap train fan, please consider this an official mod warning. We are glad to have you on the forum, but this bumping of old topics to not add anything useful is getting to be too much.

Re: Easier Manual City Generation

Reply #10
ok i'll stop