• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Trigger] What is causing lag every x seconds?

Status
Not open for further replies.
Level 23
Joined
Nov 29, 2006
Messages
2,482
What triggers could cause lag every x seconds?

Hi all folks...

Im having this project called Defenders of Silvermoon since a half a year ago, and I have alittle issue.

On my superhigh tech computer where I am now modding my map, you can't really feel any lag spikes every x seconds...

But at my other house, I have a pretty crappy computer, and then I see that it has small lag spikes every 2-3 seconds (i think it was). I've done everything to remove custom scripts and such, but its still not lagfree...

The map is a hero defense where evil units spawn each 30 seconds...
But I can't be it (or can it), since i've disabled it, and it still lags

(Could it be that the terrain is lagging up?
The amount of doodads/destructibles are around 6300, but I've not done multiply "fire effects or such" on each other... I know that greatly causes lag)

Could it be that my initializations triggers are too complicated or something?
A friend of mine said that the game is having less lag spikes later on in the game, and that's even when more enemies are spawning.

It would be nice if someone has any suggestions I could do :)

/Regards Eccho
 
Last edited:
a hero defence with 6300 doodads, wow. btw about the fire yea id get rid of it compleetly any animated doodads cause alot more lag than unanimated ones
Unless your hero def is huge? or reall senic there is not need for 6300 doodads
try to keep the number under 2k, and thats still pretty high..
normally the init trigger dosnt cause lag spikes, it causes starting lag (first 5 secs of game)
if the lag is paternal you might wana see if you have any triggers that fire in that same or close to same patern, although its mostlikely the doodads
 
Level 29
Joined
Jul 29, 2007
Messages
5,174
Lags could be caused by a lot of different reasons.

Either give us more information like
  • Is the lag getting heavier and heavier (which suggest leaks)
  • Does it always lag every x seconds ?
  • Are you using uber big triggers ?

Or you can give the map, to someone you trust (gif me gif me !! ^^) who knows more then you.


Lol i'm second.

There are a lot of maps (mainly RPGs) that use thousands of doodads and they don't lag at all.
 
Level 23
Joined
Nov 29, 2006
Messages
2,482
Bloody_Turds you wrote:
btw about the fire yea id get rid of it compleetly any animated doodads cause alot more lag than unanimated ones

I know that, and I said I knew they are lagging, so Im not using them at all.

Unless your hero def is huge? or reall senic there is not need for 6300 doodadstry to keep the number under 2k, and thats still pretty high..

The thing is I'm using an environment which is requiring lots of doodads... I don't want it to be that stiff, as many defenses/sieges are... Besides it doesn't look that well if the map isn't with "city-terrain"

GhostWolf you wrote:
Is the lag getting heavier and heavier (which suggest leaks)
Does it always lag every x seconds ?
Are you using uber big triggers ?

As I said too, according to a friend of mine the lag gets smaller and smaller.
And yes I see a pattern somehow, cause it is constantly lag indeed.
I don't know how you define a big trigger. But if I have a large trigger, let say after 10 seconds of gamestart. Will this cause regular lag, and if so, why not just a longer map freezing?

There are a lot of maps (mainly RPGs) that use thousands of doodads and they don't lag at all.

Maybe the combination of a large amount of doodads, and many spawnwaves add-on the lag spikes?

I can give you the map... np ._.

/Regards
 
Level 29
Joined
Jul 29, 2007
Messages
5,174
Well, your coding seems to be just fine, you don't leak (unless I didn't notice) groups or locations.
I can't really see any reason for this to lag :S

By the way, why don't you make all your Init triggers in one big trigger and/or put the Init event in their triggers.
I don't see a big point in calling them in a one Init trigger beside showing off :xxd:

Try to make a test map, remove all the doodads and check if that's the cause.
 
Level 23
Joined
Nov 29, 2006
Messages
2,482
ok.... this seems to be the fact.

I played my map with a friend with a not that good comp... He said there wasn't any lag at all.

So it appears, that older computers are suffering from constant lag in every game... I can't really tell now, since im not at the suckish comp, but I've played (as example) dota, and battle tanks, and its not lagging in the same, if I remember right.

I guess its unsolutionary for old comps...

Anyway thx for your help, both of you

/Regards
 
Status
Not open for further replies.
Top