Jump to content

Maximum map size parameter questions


Topaz Light
 Share

Recommended Posts

According to the research I've done, the maximum map size permitted in FE7 is 43x36.

However...

  • I have also read that the maximum map size varies by game. Is this correct? And, if so, what is the maximum map size for FE8?
  • I recall reading at one point that those dimensions were flexible, but only if the two numbers added up to the same amount (or something along those lines); i.e. you could make a map that was 29x50 tiles if you wanted, since 29+50 and 43+36 both add up to 79. Is this correct? It kinda sounds fake, so I'll defer to people who know what they're talking about; what is the truth in regards to maximum map dimensions?

Thanks for your time!

Link to comment
Share on other sites

I recall reading at one point that those dimensions were flexible, but only if the two numbers added up to the same amount (or something along those lines); i.e. you could make a map that was 29x50 tiles if you wanted, since 29+50 and 43+36 both add up to 79. Is this correct? It kinda sounds fake, so I'll defer to people who know what they're talking about; what is the truth in regards to maximum map dimensions?

maybe if it multiplies, but it couldn't possibly be add o_O

43 x 36 = 1548 tiles of the map; my memory says the maximum is 1600 but i don't have any actual clues

The game could probably handle a 15 x 104 map if that is the case... ehu

Link to comment
Share on other sites

I haven't seen any doc, but here's an educated guess on why this is.

There's a few different maps saved in ram, each of which plots a certain attribute of the (whole) map on a grid. For instance, the unit map shows where each unit is. The fog map shows which squares should be visible. The range map shows which squares can be attacked. You get the idea. Each map gets a chunk of memory, and in the beginning, it contains a table if row pointers. Why is this useful? Well, given a set of coordinates, it's quite easy to return the data at those coordinates.

Example: Assume r0 = x coordinate, r1 = y coordinate

ldr r2, Your_Map @ The offset of the map whose data you want to find. The row pointer table begins here.

lsl r1,2 @ Leftshift your y coordinate by 2 (equivalent to multiplying by 4)

add r2,r1 @ This mean you're now looking at correct row pointer

ldr r2,[r2] @ Dereference that pointer (now you have the offset of the row's data)

add r2,r0 @ Add the x coordinate. Congratz, you're now pointing to the data at the coordinates you specified

ldrb r0,[r2] @ Actually grab the data

Sure, you could get the same data, assuming it's set up in the same way, but without the row pointer table, by dereferencing:

Your_Map + (y*length_of_map) + x

but multiplication is pretty resource-intensive, so IntSys decided to do it this way. Another thing to note is that each row has an extra 2 squares added; maybe as some kind of buffer? I dunno. The point is, a new column would cost 1 new byte per row, but a new row costs 1 new byte per column, + 2 for a buffer, + 4 for the new row pointer.

Of course, this could be entirely wrong and I'm talking out of my ass. The way the maps are set up is certainly correct, thought.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...