HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Lag in Map

03-30-2006, 07:29 AM#1
Karawasa
Hey Guys,

Recently, I have started experiencing lag when casting spells in my map. A basic spell, like a shockwave modified to crushing wave model will lag when casted and lag until finished.

I checked for leaks etc. I only added some new triggers and improved the terrain a lot. This got me thinking, can having too many doodads cause lag like this? If so, what number should I keep them too?
03-30-2006, 07:38 AM#2
PhoenixFeather
How big is your map?
Do you have a lot of units on it?
How powerful is your computer?
03-30-2006, 08:01 AM#3
Karawasa
Well heres the thing:

The version that is giving me some lag is 2.2. Version 2.1 was completly fine.

Now aside from some trigger changes that I have confirmed are not the problem, here is what I did: Added 4000 doodads (up from 4000, I have NOT exceeded limit and am NOT using WEU), imported a music file 187 kb, imported two custom models each 100kb, placed about 20 critters around the map, using custom fog and water color options in map options menu.

Let me describe the symptoms. Some spells that didn't lag now do lag, some are unaffected. For instance, I had a jump spell that was fine before. Now it lags when you cast. I had a shockwave modified to crushing wave model that was fine before, now it lags the whole duration of the wave. Basic stuff like net or blizzard etc. are fine. Even complicated spells like meat hook and blackhole are fine. It seems only the three mentioned spells are causing lag, plus there are very minor stutters.

I did some testing and I concluded that the doodads are too blame partially. The question is, what can I do? What number shouldn't I exceed? Is it the doodads alone? I haven't surpassed the limit so why is this happening? I see plenty of maps with tons of doodads (RPGS) and they don't lag. I had 4000 doodads and it was fine, 8000 and its a problem. I deleted like 3000 to test it out and it STILL lagged although a tad better. I have some animated ones, but not too many. I think the problem may be a combination of things. Can custom models (I use 3) lag? I have an imported frog, snake and palm tree(that sways a little). I use about 150 trees of this type, 3 frogs and 3 snakes.
03-30-2006, 11:10 AM#4
harel
Are there any places in the map where the spells don’t lag?
Are the animated doodads placed in the same area?
Here is a tool that can help you find memory leaks.
Maybe there was an unnoticeable lag and now when the map needs more resources it lags.
I have a map with 11000 doodads and I don’t have any lag.
03-30-2006, 03:59 PM#5
Panto
CastleOrange discovered that several AoE spells cause a lot of lag when cast over an area with many doodads, for his map, Exploring the Ruins. Perhaps that's what you're encountering. I know for certain that Shockwave was among them.
03-30-2006, 06:51 PM#6
Karawasa
Tested the spell in an area with NO doodads, still lagged the same amount.

The animated doodads are spread around the map, where I was testing lacked them. I also tested these by deleting over 90% of the animated doodads and the spell STILL lagged.

I am positive the memory leaks are non-existent, besides, I tested this right at the start of the map, not like 10 min in.

The idea about more resources causing it to lag makes sense. This would go hand in hand with the idea that the increase in doodads etc. is to blame.

It seems to only be AoE spells like shockwave. In fact, it is ONLY shockwave. Blizzard and blackhole do not cause any lag. Jump is based off shockwave as well. What can I do to fix this?

Also note that I am using a few custom models, could that be a problem in anyway? These models are for a few random critters around the map, and the palm trees which there is about 150 of around the map.
03-30-2006, 08:07 PM#7
Karawasa
Ok for all those who suffer from this problem, TERRAIN DEFORMATIONS ARE THE DEVIL. I simply replaced these spells with carrion swarm and used that as the base and its smooth as silk!
03-31-2006, 11:06 AM#8
nooK
Thanks a lot man!
It`s true: I was using a spell based on shockwave and it lagged; since I use carrion swarm it runs smooth :)
But it wasn`t lagging on my other map where I used the same spell, that´s strange :/

Also im using a Jump too, it lags a bit on my actual map, on my old one it doesn´t :(
Must be the stomp I think. Are there any alternatives to stomp?
03-31-2006, 03:06 PM#9
shadow1500
Seems that terrain deformations cause alot of lag in big maps, kinda sad since i must to use them in my map..
03-31-2006, 03:55 PM#10
Meanie
Ok sorry this might have been said but didnt bother to read the entire text but(modified as triggerenhanced spells) spells with intervals or durations set to 0.00 makes the spell do something each 0.00 second and that is as fast as it can and it does it forever...you might have understanded it if not well that causes SEVERE LAG!

Solution: Set these values to 0.01( You wont see it)
03-31-2006, 06:49 PM#11
Karawasa
Quote:
Originally Posted by sh9w
Thanks a lot man!
It`s true: I was using a spell based on shockwave and it lagged; since I use carrion swarm it runs smooth :)
But it wasn`t lagging on my other map where I used the same spell, that´s strange :/

Also im using a Jump too, it lags a bit on my actual map, on my old one it doesn´t :(
Must be the stomp I think. Are there any alternatives to stomp?

The reason why it lags on some maps and not others is because of map size, doodads etc.

As for your stomp problem: thunderclap, silence and you can also use triggers. For instance, when your unit lands I assume you want it to do a warstomp and stun everything that it lands on. You can use a dummy thunderclap ability, modify the animation so it looks like warstomp (should't have the terrain deformation, if it does, use silence) and then create a dummy unit, pick everything within a certain distance of your jump unit and have the dummy unit cast stormbolt with no projectile on everything.
04-13-2006, 12:38 PM#12
nooK
Yes for all those having the same problems I can suggest:

call CasterCastAbilityLevelAOELoc...

Just one line of code -> Castersystem is your friend