• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Terrain question

Status
Not open for further replies.
Level 12
Joined
Mar 23, 2008
Messages
942
How much does terrain affect map size?
its because on my hero arena, I wanna to have different arenas to fight, but one of them is so big, that takes all the space away. letting me only with two arenas, the hero choose area and the duel area.

So, there is a limit of map size? My actual map have 10240/8960.
And if increasing map terrain size will affect map size Kb much.
 
Level 5
Joined
May 23, 2008
Messages
148
I heard that some 3rd party tool can resize your map to 480 x 480 tiles (which is 61440 x 61440 distance units). I don't believe terrain itself could take much space, but lets try to apply some theory here.

Lets take a single tile and think what possible data can it contain.
  • Terrain type (Grass, Rough Dirt, etc): well, there might be over 256 terrain types (or maybe not), but lets assume pessimistic case and increase the limit to 65536: 2 bytes.
  • Terrain type variation: cap of 256 is surely enough: 1 byte.
  • Height: I cannot see much precision of this value (at least not in WE) si I assume float type: 4 bytes (it could be an integer though, making it 2 bytes).
  • Cliff level: 15 possible values, ergo, it fits in 4 bits, so maybe it shares a byte with some other value, lets hold on this one.
  • Cliff type: on each map, it has maximum two possibilities (so lets hold on 1 bit).
  • Cliff variety: tested on Lordaeron it had at least 3 variations (2 'convex' and 1 'concave') (at least 2 bits).
  • Blight: a tile can be blighted or not (1 bit).
  • Boundary: the same as with bligth (1 bit).
  • Water: 1 bit (shallow water is the same as deep water, but with different cliff level).
  • Ramp: 1 bit.
  • Shadow map: I have observed that generated shadows have approxmiately the precision of the smallest grid in WE. 16 such little squares cover a tile. 16 times 2 possibilities (shaded or not) equals 32 (5 bits).
  • Lets sum up all the bits not joint into bytes yet: 4 + 1 + 2 + 1 + 1 + 1 + 1 + 5 = 16 bits = exactly 2 bytes.

Ok, now lets add all the bytes: 2 + 1 + 4 + 2 = 9 bytes per tile. Lets look at yor map. You say its size is 10240 x 8960 (80 x 70 tiles), so I inferred from this statement, that you provided size of playable area (values of entire map must be multiple of 32). Minimal full map area would be 96 x 96 = 9216 tiles. having 9 bytes per tile it gives exactly 81 KB, which is not that bad ^^.

Assuming that the max possible dimensions are 480 x 480 it would give 2025 KB, a bit under 2 MB (1.977), which hurts a bit in comparison with B.net 4 MB cap. You can't go more than 576 KB in World Editor though.

Note 1: I assumed pessimistic cases wherever I could, so it probably could occupy less disk-space. Also take the possibility of compression into consideration.

Note 2: All this is entirely my personal theory, so I do not guarantee its propriety.​
 
Level 12
Joined
Mar 23, 2008
Messages
942
Thanks. But I think you are right, I added a huge arena to my map and the file size is almost the same ^^

Edit: Its possible to shrink a terrain? Its because I did a huge arena... and its take so much time to cross that will lower gameplay...
But I already added everything, rivers, trees, doodads...
How can I make it smaller?
 
Last edited:
Level 5
Joined
May 23, 2008
Messages
148
Go Scenario->Map Size and Camera Bounds. Check Modify Map Bounds and you are free to truly resize your map (remembering that it has to be a multiple of 32 (32, 64, 96, 128 etc)). Adjust the playable map area by checking only Modify Camera Bounds. It's absolutely intuitive. I believe you can do it ^^.
 
Status
Not open for further replies.
Top