The International Simutrans Forum

 

Author Topic: Largest possible maps?  (Read 6351 times)

0 Members and 1 Guest are viewing this topic.

Offline AP

  • Devotee
  • *
  • Posts: 1202
  • Languages: EN
Largest possible maps?
« on: January 15, 2010, 04:42:22 PM »
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.

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4592
  • Languages: EN, DE, AT
Re: Largest possible maps?
« Reply #1 on: January 15, 2010, 06:29:59 PM »
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.

Offline AP

  • Devotee
  • *
  • Posts: 1202
  • Languages: EN
Re: Largest possible maps?
« Reply #2 on: January 15, 2010, 08:24:46 PM »
Understood, many thanks. :)

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9518
  • Languages: De,EN,JP
Re: Largest possible maps?
« Reply #3 on: January 15, 2010, 09:11:22 PM »
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.

Offline AP

  • Devotee
  • *
  • Posts: 1202
  • Languages: EN
Re: Largest possible maps?
« Reply #4 on: January 16, 2010, 06:52:02 PM »
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...

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9518
  • Languages: De,EN,JP
Re: Largest possible maps?
« Reply #5 on: January 16, 2010, 08:21:45 PM »
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.

Offline AP

  • Devotee
  • *
  • Posts: 1202
  • Languages: EN
Re: Largest possible maps?
« Reply #6 on: January 16, 2010, 09:41:10 PM »
Quote
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.


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?



Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9518
  • Languages: De,EN,JP
Re: Largest possible maps?
« Reply #7 on: January 16, 2010, 11:52:15 PM »
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.

Offline kierongreen

  • Dev Team, Coder/patcher
  • Devotee
  • *
  • Posts: 2269
Re: Largest possible maps?
« Reply #8 on: January 17, 2010, 09:05:16 AM »
If I've still got nothing to do later today I might look at this

Offline AP

  • Devotee
  • *
  • Posts: 1202
  • Languages: EN
Re: Largest possible maps?
« Reply #9 on: January 17, 2010, 03:35:02 PM »
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!

Offline kierongreen

  • Dev Team, Coder/patcher
  • Devotee
  • *
  • Posts: 2269
Re: Largest possible maps?
« Reply #10 on: January 17, 2010, 05:46:48 PM »
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...

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9518
  • Languages: De,EN,JP
Re: Largest possible maps?
« Reply #11 on: January 17, 2010, 08:03:04 PM »
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.

Offline kierongreen

  • Dev Team, Coder/patcher
  • Devotee
  • *
  • Posts: 2269
Re: Largest possible maps?
« Reply #12 on: January 17, 2010, 11:12:13 PM »
I'm working on incorporating it into the existing scenario code (which uses tab files).