My map is on single player, its abaut 60% complated.
Today i runed the map and i faund out that it lags very much.
My map lenght is 16,9 MB (mainly becouse of music). Is that the problem?
Shouldnt be, if you dont mind post it and ill look over it to see if it has a problem. Its usally due, to the ammount of triggers you have running at once... Or massive spawning
Then it must be triggers becouse there is no spawn in the map.
It is true that i have alot of triggers.
Are there eny chance to fix it?
Make sure you don't have too many units.
If by "lag" you mean the game plays slowly, chances are it's what Legacy said. Too many units will lag the game.
If by "lag" you mean triggers won't work fast enough, make sure:
1: you have hyper triggers (helps speed of preserve trigger triggers)
2: you don't have triggers with waits* in All Players... and best not to have them for forces too. Move the triggers to another player.
*Waits stack so if you have them on a force or "all players" it will slow all triggers with waits in that force.
i bet if you have some kind of music running over and over it can create major lag... and yes everything else is said above so i wont repeat but just saying music repeating over and over sometime creates lag..
if your playing it in single player....remember to change the speed in the game to fastest...it defaults to normal
By lag i mean the game plays slowly.
Yes i use Hypper Triggers
I alweys change speed to fastest.
Yes i have 1 music theme runing over and over but it isnt something like:
PlayWav(blablabla);
PreservTrigger
Its like
PlayWav(blablabla);
Wait(The time that wav is playing + 2000 milisecs);
PreservTrigger
ADDITION:
Oh by the way i have 574 triggers in my map.
Many of them running at the same time.
99% of them are for player 1.
Test your map in various ways.
Delete all the units/sprites, save as another copy. Try this copy. If it still lags, it's your triggers.
Delete all the triggers, save as another copy. Try this copy. If it still lags, it's your units/sprites.
Delete all units/sprites/triggers, save as another copy. Try this copy. If it still lags, it's your computer.
Thanks Legacy il try it.
ADDITION:
I tested it.
Whitout triggers my map dosnt lag.
Is there any chance to fix?
Make less triggers or more eficient triggers
Effecient triggers, I.E. location sharing, eliminate redundancy, take out rapid remove/create triggers....
How big is your map? 16mb?
It may be sc attempting to load such a huge file AND keep it playing.
SC wasn't really meant to import and play such huge files and run efficiently at the same time.
Well taking out the triggers fixed the lag and chances are triggers don't make up nearly 16MB so chances are it's not the size of the map causing the problem
Since it's the triggers lagging the game I'm guessing you have too many triggers that are something like:
| Trigger |
| Players: |
| ¤ Player 1 |
| Conditions: |
| ¤ Always |
| Actions: |
¤ Move location 'location 0' on 'terran marine' for 'player 1'
|
| ¤ Preserve Trigger. |
Try to use triggers that don't loop continuously. Most likely you can reduce some triggers, like for the one above, change the condition to:
'Player 1' brings exactly 0 'Terran Marine' to 'location 0'
It not use
'Player 1' brings at most 0 'Terran Marine' to 'location 0'
Doesn't that run faster?
It makes it so it doesnt always move the location, just when it needs to.
Triggers dont lag maps. Constantly building up cache does. The only way to fix this is to become proficient in organization and trigger editing.
Tips are
1)Never use waits use a deathcount timer.
2)Check for chace leaks. Ie(repeated action waits)
an example would be constantly moving unit from point a to point b. But the terrain on point b was one that couldnt be moved to. Therfore the it would load every trigger into a waiting pool(cache) and would lag the hell out of you the longer it runs.
Basically make sure the triggers work right.
Ok so i deleted all always move location to unit. It still lagged.
Then i tryd deleting music and i reduced my map to 2,4 MB. It still lagged.
Then i tryd deleting trigger that containd burrowed zergling move to loc preserv.
Guess what ... it still lagged.
I work on this map more then a year so im pised off that it lags.
ADDITION:
Ok so i deleted all always move location to unit. It still lagged.
Then i tryd deleting music and i reduced my map to 2,4 MB. It still lagged.
Then i tryd deleting trigger that containd burrowed zergling move to loc preserv.
Guess what ... it still lagged.
I work on this map more then a year so im pised off that it lags.
ADDITION:
Sorry for duble posting above. My internet lag like hell.
Well if you posted the map or gave the map to one of us then we might be able to fix it. Could it be that it is just your computer? I had a map that I made before that laged insanely on my computer. But when I tried it on my friend's computer it worked so smoothly. Like a knife through butter really. What kind of computer are you running?
There are also many other kinds of laggy types of triggers like:
-triggers that give away units constantly.
-triggers that create alot of burrowed units.
-triggers that repeat oftenly without resolution (like always triggers with a preserve).
-triggers that constantly create and remove units.
-triggers that move units constantly.
Thse are the main laggers of maps. Check those out.
Do you remember the last thing you did before it started lagging like crazy?
ADDITION:
Have you tried the map on single player and on multiplayer?
Well i tryd it a minut ago on bnet. It lagged exactly like on sp.
Explain this "lag."
Is it a choppy omg once in a while slow?
Is it a POW game literally stops for a whole second slow?
Or a constant pain where you cannot even move your mouse or the mouse literally jumps around the screen seemingly, random.
Its a constant pain where my mouse literally jumps around the screen seemingly, random.
Interesting. This is interesting.
This may be caused by creation of many units at the same time or rather the movement of many units at the same time or the giving of many units at the same time. I had this same problem. It would be easier if you posted the map. Some people find it easier to see rather then to be told about it.