HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

A question for the weu creator(s)

07-13-2004, 01:06 PM#1
sATARa
Hi, I really love WEU... Its really the best thing that ever happened to wc3 mapmaking :D . Id just like to know one thing...
See, Im using WEU for a very big n complicated project me n a friend r working on... and since we`re really pushing the limits with the number of doodads, units, n triggers, in this map... lag is really something we should watch out for.
So what I would like to know is, how memory and processor consuming are actually some of the advanced triggers...
I know this is a very genearl question n you cant give me a clear answer for all of the triggers, but for example... is there anything we should look out for?
How heavy are these actions for example:
"Set units real, boolean, string... value"
"Get gold cost of item type"

Thx in advance
I would really appriciate this ;)
07-13-2004, 01:46 PM#2
th15
I love WEU too :) Mostly because I'm too lazy to write JASS though :)

The kind of triggers that really burn processor power are things like the "sliding" triggers.

The spell enhancer too does chew up CPU time (partly because some of its effects uses sliding)

Too many SFX tends to kill RAM because it stores a boxful of variables. Some of the advanced destructible triggers may have the same effect.

Mostly though, WEU actions are watertight and do not have too much an effort on in-game lag. The extra stuff that WEU adds (if you use all of its functions) tends to inflate filesize and multiply loading times though. The things you mention would have almost no effect on the computer. A boolean variable takes up a single bit of memory address while the others take 8 bytes (except string which is variable) and require no processing (The CPU does not have to "translate" the data).

Some things that you should never do:

Using MP3s as sounds. MP3s need to be decoded before playing. Though smaller, you should always use wavs for any sound effects.

Very big loops.

Creating lots of heroes at once with triggers. Heroes has about 50% more data fields than units and you'd have to load all their heroes at the same time. If you notice the game "spiking" when you create lots of new heroes with triggers, pre place the heroes in a corner of the map. That way the data for these new heroes is loaded before the game starts.

Ordering a lot of units at once (try to spread out the ordering over time).

Creating ENORMOUS amounts of units at once. Duh.

Memory leaks. Plenty of tutorials available on this. Plenty of people who know more about this than I do.


Of course this isn't an exhaustive list, but it's what I can think of off the top of my head.
07-13-2004, 01:57 PM#3
sATARa
Thx man ^_^ very informative...

Can you just tell me how using MP3s actually effects the game... couse we have a huge 600 kb mp3 imported. Does the decoding take place at loading time or every time you play your sound?
I did test it it online, and it worked fine, caused no lag... but since there are still many things to add to the map, i guess it could become a issue...
07-13-2004, 02:03 PM#4
th15
To my knowledge MP3s and decoded when played. But it should pose no problem if you're using the MP3 as music. If the MP3 is for a cinematic voiceover, then you may have slight syncing problems.
07-13-2004, 02:09 PM#5
sATARa
What about if I were use it as a 3d sound in game?
07-13-2004, 02:33 PM#6
th15
If it's used very often then I would suggest converting it to wav. But otherwise if you only use the sound once, the file size savings are probably worth it.
07-13-2004, 05:53 PM#7
sATARa
Thx man, you helped me alot :D :D