News:

The Forum Rules and Guidelines
Our forum has Rules and Guidelines. Please, be kind and read them ;).

Easier Manual City Generation

Started by statto, June 20, 2009, 04:54:54 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

statto

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.

vilvoh

Would be a good extension request for scenario files..

Escala Real...a blog about Simutrans in Spanish...

Combuijs

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



statto

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?

IgorEliezer

PPM files could work as PAK's do.

To make a pak file you need: 1) A PNG image file; 2) A DAT text file.

Then, PPM file: 1) A BMP image file for heights; 2) A TXT text file for data: object, coord x/y, population etc.

VS

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!

prissi

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.

jap train fan


IgorEliezer

#8
Quote from: jap train fan on July 23, 2010, 11:26:09 AM
i like it

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

Isaac Eiland-Hall

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.

jap train fan