Author Topic: Map Dimension Limitations  (Read 1978 times)

Offline Hooman

  • Administrator
  • Hero Member
  • *****
  • Posts: 4955
Map Dimension Limitations
« on: July 08, 2007, 01:51:53 AM »
There seems to be a map size limitation of 1024 x 512.

We've known of a limitation for a while, but I don't think a reason why was ever posted so here is one.

In the ctMoMove Command Packet, the waypoints have the x and y coordinates bit packed into a 4 byte field. The lower 15 bits are for x and the next 14 bits are for y. They have pixel granularity, so that gives a maximum of 2^15 / 32 pixels per tile = 1024 tiles wide, and 2^14 / 32 pixels per tile = 512 tiles high.

Outside of that range units will not be able to set proper destinations due to overflow.

Offline Highlander

  • Hero Member
  • *****
  • Posts: 780
  • Outpost 2 Elder
Map Dimension Limitations
« Reply #1 on: July 08, 2007, 05:53:08 AM »
So does this equal a world map then ?

What about "Fractures", that map is "taller" than the usual world map, isn't it ?
There can be Only one. Wipe Them out. All of Them.

Old player still playing. Visit Spark for a game of Outpost 2

Offline Sirbomber

  • Hero Member
  • *****
  • Posts: 3238
Map Dimension Limitations
« Reply #2 on: July 08, 2007, 11:01:50 AM »
Fractures is 128 x 256. Around the World and Axen's Home are both 512 x 256.
I thought going above 512 on the x-axis caused OP2 to crash? So the real map limitations would be 512 x 512?
"As usual, colonist opinion is split between those who think the plague is a good idea, and those who are dying from it." - Outpost Evening Star

Outpost 2 Coding 101 Tutorials

Offline Arklon

  • Administrator
  • Hero Member
  • *****
  • Posts: 1269
Map Dimension Limitations
« Reply #3 on: July 08, 2007, 12:09:34 PM »
I think he meant 512x1024 (since I could do that fine).

Offline Hooman

  • Administrator
  • Hero Member
  • *****
  • Posts: 4955
Map Dimension Limitations
« Reply #4 on: July 08, 2007, 01:32:17 PM »
I'm pretty sure the problem I mentioned allows for up to 1024 x 512. Maybe I'll do a bit of actual testing.

Edit: Altough, non around the world maps do double up on the x direction, so maybe there are additional problems above a width above 512. But around the world-ness is controlled by the width of the map, so it shouldn't need to double up at that size. Could always be a bug related to that behavior though.
« Last Edit: July 08, 2007, 01:34:40 PM by Hooman »

Offline Arklon

  • Administrator
  • Hero Member
  • *****
  • Posts: 1269
Map Dimension Limitations
« Reply #5 on: July 08, 2007, 01:36:11 PM »
Well, if you're right, then the real size limitation would be 512x512.

Offline Sirbomber

  • Hero Member
  • *****
  • Posts: 3238
Map Dimension Limitations
« Reply #6 on: July 08, 2007, 03:07:58 PM »
Nobody ever listens to me...  :rolleyes:  
"As usual, colonist opinion is split between those who think the plague is a good idea, and those who are dying from it." - Outpost Evening Star

Outpost 2 Coding 101 Tutorials

Offline Arklon

  • Administrator
  • Hero Member
  • *****
  • Posts: 1269
Map Dimension Limitations
« Reply #7 on: July 08, 2007, 03:09:04 PM »
Quote
Nobody ever listens to me...  :rolleyes:
Exactly.

Offline BlackBox

  • Administrator
  • Hero Member
  • *****
  • Posts: 3093
Map Dimension Limitations
« Reply #8 on: July 08, 2007, 03:24:15 PM »
Yeah, the game crashes if you use a map more than 512 wide. It could be something to do with the code that handles the wrapping for world maps.

Has anyone actually tried maps that are 512 high?

Furthermore, I bet the game would display a map properly that was above that (in vertical size)... you just couldn't issue commands to the lower 512 rows of the map.

Offline Arklon

  • Administrator
  • Hero Member
  • *****
  • Posts: 1269
Map Dimension Limitations
« Reply #9 on: July 08, 2007, 03:40:06 PM »
Quote
Yeah, the game crashes if you use a map more than 512 wide. It could be something to do with the code that handles the wrapping for world maps.

Has anyone actually tried maps that are 512 high?

Furthermore, I bet the game would display a map properly that was above that (in vertical size)... you just couldn't issue commands to the lower 512 rows of the map.
Yes, maps 512-1024 tiles tall work.

Offline Sirbomber

  • Hero Member
  • *****
  • Posts: 3238
Map Dimension Limitations
« Reply #10 on: July 14, 2007, 05:01:25 PM »
But you can't do anything in the lower half? Then what's the point? Sounds like a waste of the mapper's time to me.
But maybe somebody could find a use for it...
"As usual, colonist opinion is split between those who think the plague is a good idea, and those who are dying from it." - Outpost Evening Star

Outpost 2 Coding 101 Tutorials