News:

Simutrans Wiki Manual
The official on-line manual for Simutrans. Read and contribute.

Largest possible maps?

Started by AP, January 15, 2010, 04:42:22 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

AP

Hi all.

Quite simply, I was wondering if there is a maximum size map simutrans can handle? And, by extension, if there are issues which large maps cause which smaller maps do not, such that they aren't a good idea.

To be clear, I'm implying large maps with detailed terrain and long distances between cities. But probably not many more vehicles, and not necessarily much more population, than on a smaller map, just more landscape.

For instance, I've just created the south coast of England at 6000x1500, simutrans handles it fine (and my PC isn't complaining either).

I just thought it prudent to ask before, rather than after, I invest time into improving it.

Dwachs

Technically, up to 16.284 = 2^15 could be possible. However, the memory requirements would be immense. The less trees on the map the better.

So if you would like to have large maps, then create maps like you said: narrow and long.
Parsley, sage, rosemary, and maggikraut.

AP


prissi

Most CPU time is by convois. Thus if your map fits into main memory its should be no problem. Imho 4096*4096=2^12 tiles is somehow the practical limit.

AP

Here's a vaguely related question, then:

We have an "expand map" button, which does exactly what it says... but is there any way to do the opposite, to crop a map? Could it be done? Could that button be made to work in reverse as well?

Over in pak.britain we're playing around with real-world maps, but the only way to get the towns, rivers, roads, in the 'correct' places is to manually populate them and create an sve file.

Rather than do the same (slow) job multiple times, to make the various maps for different speeds of computers / etc at different sizes, it would be cunning if we could populate one big map, then crop it in various configurations, and discard the unwanted information.

Yeah, I know this is almost an extension request...

prissi

Rather I would suggest an xml file with the town locations an names to be loaded. The non-existing parts are automatically omitted. This could also define rivers etc.

It would be very easy to crop a savegame without any convois or stations outside the map. But cropping cities, factories etc. would require more logic. Can be done, but it is surely not to notch priority for me. First solution seems better for me.

AP

QuoteRather I would suggest an xml file with the town locations an names to be loaded. The non-existing parts are automatically omitted. This could also define rivers etc.

This does sound like it has potential  :)  ; any information you could point to re how we create xml files would be appreciated (my skills are more graphics than coding!)

Also, how would it be loaded into simutrans? I mean, you'd need to load it at the same time as the matching ppm file in the 'new map' dialogue, how would you do that?

Would the game also know automatically what to do if you specified a 256x256 crop of a larger ppm file; would it know to crop the river data / city spawn points as well?



prissi

I would define maps as xml or tab files like
map=britain1200.bmp
offset=148,-140
town[1]=London,3000,124,124
...
river[1]=124,124,126,126,129,129...

and so on. But I will not programm this anytime soon. Lack of time for even more important stuff.

kierongreen

If I've still got nothing to do later today I might look at this

AP

Cool, will watch with interest.

The only other way that's been suggested is a graphical solution - just as the ppm file supplies terrain height, maybe another image overlay could have river data (in 4 colours for 4 different widths)? Possible advantage being intuitive to create - just trace over the ppm in photoshop ( and avoids the many co-ordinates for long and curvy rivers...).

The towns by co-ordinate is logical, especially since it gets the names right!

kierongreen

Currently my thinking is to extend the scenario system to support bmps and city locations in a similar way to that described by prissi. Primarily this is to avoid having to complicate the gui but if there's any strong objections or a preferred way people would like this done I'm open to suggestions...

prissi

Since SImutrans has also a parser for tab-files (and some brain dead xml) I just though this would be the most easiest solution. Personally I would favour the tab files approach, but anything that gets done will be good.

kierongreen

I'm working on incorporating it into the existing scenario code (which uses tab files).