The International Simutrans Forum


Author Topic: User-friendly, fixed map coordinates  (Read 1677 times)

0 Members and 1 Guest are viewing this topic.

Offline IgorEliezer

  • Devotee
  • Administrator
  • *
  • Posts: 4099
  • Cake recipes are cool... REALLY!
    • Igor Eliezer Architect and Urban Planner/Arquiteto e Urbanista
  • Languages: PT, EN, AutoLISP, Python
User-friendly, fixed map coordinates
« on: November 18, 2012, 10:29:29 AM »

I think it would be nice if Simutrans had fixed map coordinates so that players can tell each other where a certain element of the game is.

What we have now: The current coordinate system is dependent on the view. This system is relative to the topmost tile in the isometric view, that is, the left-uppermost tile in the mini-map. This means that, if I rotate the game view, the coords of a certain point will change too, that point can have 4 different x,y values. If a player wants to tell other player where a station or vehicle is, both players need to have their game views at the same rotation (which is hard to tell since there's no compass in Simutrans).

What I propose:

* The coordinate system would be relative to a fixed point in the map, preferably x=0 and y=0 would be at the center of the map upon its creation. z=0 would be the sea level. .If I rotate the map, the values of a certain point wouldn't change.

* Even if I enlarge the map, the coord values wouldn't change. 0,0 would be always at the original center of the map.

* Simutrans could keep the current system as internal coordinate system, if need be, but it would be "translated" for the user.

If this were implemented, we could say that:

- X-coords would act like longitudes in the geographic system, or the N-coords in a UTM system. This means, +x would be always East, -x, West;
- Y-coords would act like latitudes in the geographic system, or the E-coords in a UTM system. This means, +y would be always North, -y, South;
- Z-coords would be the altitude. Z=0 would be always the sea level no matter the water level you set up in the Landscape Settings.

These details above aren't so important. What matters is that a certain point in the map had fixed x/y/z values, no matter if I rotate or enlarge the map.
« Last Edit: November 18, 2012, 10:43:59 AM by IgorEliezer »

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 5647
  • Languages: EN, NO
Re: User-friendly, fixed map coordinates
« Reply #1 on: November 18, 2012, 11:13:19 AM »
If only the view and the map were more clearly separated, Simutrans wouldn't have to actually rotate the map, just "move the camera".

Offline Fabio

  • Devotee
  • Administrator
  • *
  • Posts: 2898
  • The Pak128 Guy
    • Visit me on Facebook
  • Languages: EN, IT, RO, FR
Re: User-friendly, fixed map coordinates
« Reply #2 on: November 18, 2012, 11:53:21 AM »
Is it even possible to rotate online games maps? Or does that desync somehow?

Ters's idea would be the best, if possible. Translating coordinates as Igor says would be next best.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 10022
  • Languages: De,EN,JP
Re: User-friendly, fixed map coordinates
« Reply #3 on: November 18, 2012, 04:10:48 PM »
Rotation of the main view was the easiest way. The problem are that certain routines (like the ribis for display) need to be rotated while other stuff can stay static. Same for houses, which could even have different shapes in different views.

Nevertheless a view only rotation would be nice as this would indeed allow for rotation in only games. Anyone for patching this into the game, please go ahead.

Indicating always the same coordinates in the lower corner with sea level at zero should be very easy, since roation and offset is stored. The compass is also very long on my todo list. I even have some nice ones lying around ...