A new tip I found...

A new tip I found...

Discuss maps & map creation - from concept to execution to the ever elusive release.

Moderator: Moderators

Post Reply
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

A new tip I found...

Post by Forboding Angel »

Compile your map with 0 compression. THe file size will be quite large. Now 7zip it with max compression. THe ratio will be 2:1, meaning that your compressed map will be almost exactly the same file size as if you had used compression in the compiler, but it will retain all the detail.

Neat huh?

For an example of this, take a Look at Iron gauntlet. The smt file is 97 megs. Compressed the entire map is 55 megs. The map is 18x30 which using my methods of texturing would cause it to be 54-58 megs normally(after 7zipping it) using .5 compression in the compiler.

Try it out on a previous map you have made. Recompile with 0 compression and 7zip, then compare filesizes. I would like to know if I'm the only one that has success doing this, or if it works for everyone.
User avatar
jcnossen
Former Engine Dev
Posts: 2440
Joined: 05 Jun 2005, 19:13

Post by jcnossen »

But it will be a lot larger in memory...
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Post by Forboding Angel »

Hey cool, thanks for that. I was wondering if there was a particular drawback to it.

Is there anyway that you could roughly calculate how much memory it would take up? BTW something I think I've noticed, not real conclusive though. The random Desyncs don't happen as often on maps using this method. Also, I've noticed much better performance on large maps using this method.

IIRC, spring's memory usage is actually quite low, even in large games as it eats more away at processor than anything (unless I'm mistaken, I believe that highest I've ever seen it at was 47 megs).

JC could you please give me a rough estimation as to how much memory something like Iron Gauntlet would be using in memory?

I'll go test it myself as well (I assume taskmanager will tell all).
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Post by Forboding Angel »

Ok well when I ran it jsut now, spring was using all of 13 megs of memory.

I will now test on courtyard which is 32x16 (Compiled at .5 compression)
Last edited by Forboding Angel on 11 Dec 2006, 21:22, edited 1 time in total.
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Post by Forboding Angel »

Tested courtyard, memory usage was 12.5 megs.

Care to shed some light on this? Cause atm I'm not seeing the "downside" as an actual downside.
User avatar
PicassoCT
Journeywar Developer & Mapper
Posts: 10455
Joined: 24 Jan 2006, 21:12

Post by PicassoCT »

I used the same thing on the Trenches.. it is a good Advice - and i never found a drawback. All Maps are running good...
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Post by Forboding Angel »

AHA! So I'm not the only one.

BTW peetah sent me a pm with an image of a map I have never seen before but the mem usage was about 150megs, but honestly. Even crappy comps generally have 512 as a base. SO I'm still not seeing a drawback. And apearently I am a latecomer to this trick, meaning that it hasn't beena problem in the past, so I have issues believeing that this is all that big of a deal...

Besides, for me with 0 compression in the compiler a 16x16 is only about 40 megs large, if that. SO once it's 7zipped it his about 20-23 megs. Still though, I don't see where it is an issue. :-)
User avatar
LordMatt
Posts: 3393
Joined: 15 May 2005, 04:26

Post by LordMatt »

I'm sure he means video memory FA.
mufdvr222
Posts: 681
Joined: 01 May 2005, 09:24

Post by mufdvr222 »

LordMatt wrote:I'm sure he means video memory FA.
I believe JC is talking about video memory, it has to use more memory if the map file size is larger.

@ Forboding, compare framerates and see what the result is, :wink:
User avatar
jcnossen
Former Engine Dev
Posts: 2440
Joined: 05 Jun 2005, 19:13

Post by jcnossen »

It's usually over 200 mb in memory for me though, im quite sure thats correct. A basic calculation of required heightmap data already gives you more than 20 mb for most maps. Maybe your windows doesnt calculate the amount correctly... :|

Also I'm talking about system memory, my guess, knowing the algorithm a bit, that the smt is basically loaded completely in memory, so that should give you a nice estimate of memory use already. SMT is already DDS compressed by mapconv, so it makes sense to put it in memory directly. A quick glance at the code seems to indicate that the DDS tiles are copied to video memory when they're needed (When you move around..)
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Post by Forboding Angel »

@ mufdvr

The framerates are the same, at least on my machine, however interestingly enough, I can run full settings with a huge battle and still get 8 frames a sec on the one that is not compressed int he compiler, whereas I only get 4-5 with one that is compressed using .5

JC I understand what you are saying, however, I'm still not seeing it as an issue, simply because for example, someone with 256 mb of memory is not gonna get good performance on an 18x30 anyway. Hell you can barely run xp properly with only 256 mb of ram.

Now on a 16x16, it will be about 40 mb in memory, as opposed to the 97 mb that an 18x30 would be. THe falloff is quite dramatic, and as such it really isn't an issue.

taking 18x30, the square root is slightly over 28 (iirc) which means if an 18x30 were square it would be a 28x28.

You can't even run spring properly with only 256 mb or ram, and if you try, the performance will be ubercrappy no matter what map you are playing.

Processor usage becomes a problem long before memory does, and quite honestly, I've never had an issue with memory and spring.
User avatar
hunterw
Posts: 1838
Joined: 14 May 2006, 12:22

Post by hunterw »

textures aren't stored in ram though, they are stored in the video card's ram correct?

still, i will probably use this on my next map, since spring isn't really that texture-heavy anyway.
Post Reply

Return to “Map Creation”