• 🏆 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!

Horrible Lag/FPS drop with map.

Status
Not open for further replies.
Level 5
Joined
Dec 15, 2010
Messages
115
I know it's a dumb and annoying question, but I am really at a loss. I just made an awesome (imo, and I know a few others that would love it) map, but it gets horrible FPS/Lag about a minute or so after starting a game on it. I need help trying to figure out the cause. What I have come up with.

It IS the biggest size, but I have made and used those kinds of maps many other times with no trouble.

Every minute in to the game it starts to have FPS/Lag issues until about 5 minutes when it is borderline frozen.

I tried using fewer players, until just myself on the test mode, didn't change anything. I also removed all the creeps, no change.

I deleted a bunch of trees and other destructible stuff, no change.

The map is not trigger heavy, all it has is Way Gate triggers and another to set the starting resources

Does water contribute to it? It has a lot of water as space filler, should I change it to something else?

No custom units are being used other then a *slightly* modified tavern where I just added a couple heros it removes (For some reason the editor likes to remove the Alchemist, Firelord, and Tinker).

I have had much more doodad heavy maps with even more units and creeps on it with no trouble at all (I mean upwards of 1k total units on a map with like 6k doodads).

None of the units are all grouped up is one massive group.

Can anyone else think of anything it might be? It's my favorite map I have made so far.
 
Level 8
Joined
Dec 9, 2005
Messages
523
AFAK trees doodads etc doesn't contribute much to the kind of lags you described. In my own personal experience I once had a similar problem, but with an ability. And it wasn't with the triggers either, but with the settings of the spell. I made a Shockwave ability but apparently I ticked the "terrain" box in the targets. And everytime I used it, I lose 5 fps permanently to the point of watching a slideshow.

My point is, check your abilities. It could be something seemingly harmless like a wrongly set target on an ability.
 
Level 5
Joined
Dec 15, 2010
Messages
115
We could be guessing here all day. You need to post the map or the triggers at least.

All right, I am still new to map making as well as the community, and I know this site has various map uploading rules, and I am nervous about breaking any : / Since the map is only about 60-70% done. As for the triggers (So far)...

  • Melee Initialization
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Melee Game - Use melee time of day (for all players)
      • Melee Game - Limit Heroes to 1 per Hero-type (for all players)
      • Melee Game - Give trained Heroes a Scroll of Town Portal (for all players)
      • Melee Game - Set starting resources (for all players)
      • Melee Game - Remove creeps and critters from used start locations (for all players)
      • Melee Game - Create starting units (for all players)
      • Melee Game - Run melee AI scripts (for computer players)
      • Melee Game - Enforce victory/defeat conditions (for all players)
  • Starting Resources
    • Events
      • Time - Elapsed game time is 0.00 seconds
    • Conditions
    • Actions
      • Player - Set Player 1 (Red) Current lumber to 5000
      • Player - Set Player 2 (Blue) Current lumber to 5000
      • Player - Set Player 3 (Teal) Current lumber to 5000
      • Player - Set Player 4 (Purple) Current lumber to 5000
      • Player - Set Player 5 (Yellow) Current lumber to 5000
      • Player - Set Player 6 (Orange) Current lumber to 5000
  • Level 1 Waygate
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Neutral Building - Enable Way Gate 0087 <gen>
      • Neutral Building - Enable Way Gate 0095 <gen>
      • Neutral Building - Set Way Gate 0087 <gen> destination to (Position of Way Gate 0095 <gen>)
      • Neutral Building - Set Way Gate 0095 <gen> destination to (Position of Way Gate 0087 <gen>)
To save post space, there is 7 other triggers just like the way gate one above, the only difference is the way gate ID numbers.

EDIT: Just saw the posts about the leaks, that could very well be it, but I am unsure how exactly to fix that : / If anyone could take a look at the ones I posted to be sure everything is ok/broke.

Maybe the waygate triggers leak. If you have any triggers that use a location, you have to remove the location after you use it.

Sorry for being so terrible again, but what exactly do you mean by this?
 
Level 27
Joined
Jul 6, 2008
Messages
11,325
erm way gates can be set manually by clicking on the and choosing the region.
And they are enabked from default if they got set location and you don't trriger them to get disabled. Plus if you got lots of Map Initilization or whatever similar condition trrigers, you should put them as one.
just telling you... current triggering is really uneficient.
 
Level 5
Joined
Dec 15, 2010
Messages
115
erm way gates can be set manually by clicking on the and choosing the region.
And they are enabked from default if they got set location and you don't trriger them to get disabled. Plus if you got lots of Map Initilization or whatever similar condition trrigers, you should put them as one.
just telling you... current triggering is really uneficient.

The set destination thing was greyed out and I couldn't change it, that's why I triggered it. And I'll fix the map initialization thing.
 
Level 11
Joined
May 31, 2008
Messages
698
You dont really have any leaks, i mean your waygate triggers do leak, but it isnt alot so that probably isnt the problem.
Does it slow down even if you arent doing anything in the game? like if you just start it with only you playing and just wait, will it still slow down?
Idk what it could be

But i think that if you do some things with Map Initialization as the event, it can mess it up.
Try changing the events from Map Initialization to Time Elapsed = .1 seconds instead.
You dont need to do this with the default Map Initialization trigger tho (Melee Initialization)
 
Level 5
Joined
Dec 15, 2010
Messages
115
You dont really have any leaks, i mean your waygate triggers do leak, but it isnt alot so that probably isnt the problem.
Does it slow down even if you arent doing anything in the game? like if you just start it with only you playing and just wait, will it still slow down?
Idk what it could be

But i think that if you do some things with Map Initialization as the event, it can mess it up.
Try changing the events from Map Initialization to Time Elapsed = .1 seconds instead.
You dont need to do this with the default Map Initialization trigger tho (Melee Initialization)

Yeah it just slows down no matter what, so I will go try the time change. And here is a pic of the Way Gate destination (Non-trigger) I was talking about.

http://tinypic.com/r/2zr3rbk/7

EDIT: Alright, changed the melee initialization to time, but it still lags after some time. So it must be the triggers leaking, is there a way to fix it?
 
Level 11
Joined
May 31, 2008
Messages
698
Well to fix your location leaks, all you have to do is create a location variable. Then set your location to the waygate. Then remove the location

ex.
set TempLoc = (Position of Way Gate 0095 <gen>)
Neutral Building - Set Way Gate 0087 <gen> destination to (TempLoc)
custom sctipt: call RemoveLocation(udg_TempLoc)
set TempLoc = (Position of Way Gate 0087 <gen>)
Neutral Building - Set Way Gate 0095 <gen> destination to (TempLoc)
custom sctipt: call RemoveLocation(udg_TempLoc)

That will remove your leaks
 
Level 2
Joined
Feb 8, 2011
Messages
31
You need to make regions at each waygate to set them up without using triggers.

If the triggers you pasted above are the only triggers in your map, then the lag isn't a result of poor triggering.

If you have more, post them. Otherwise, it would benefit us if you just posted your map here.

It could be that it only lags on your computer (if you haven't already tested it with other people of course), which, unfortunately, would be your problem. If it doesn't only lag on your computer, I can try my best to find the problem.
 
Level 5
Joined
Dec 15, 2010
Messages
115
Alright sorry for being terrible and not doing this earlier and being a time waste. I just deleted every trigger except the map initialization one that custom maps have by default, and it still happens, so now it's time to figure out what the problem might be, I will get back on this.

It could be that it only lags on your computer (if you haven't already tested it with other people of course), which, unfortunately, would be your problem. If it doesn't only lag on your computer, I can try my best to find the problem.

I doubt it, my computer isn't top of the line, but I have never had trouble with maps before this (Save one Blizzard map, but that's because I had like 15 other programs running in the back).

Update:

Removed every unit except starting positions and gold mines - No change.
Removed all regions - No change.
Reverted the tileset to the default - No change.
 
Level 26
Joined
Aug 18, 2009
Messages
4,097
I tried using fewer players, until just myself on the test mode, didn't change anything. I also removed all the creeps, no change.

I deleted a bunch of trees and other destructible stuff, no change.

That's at least a good approach, reducing the problem to find its roots.

Does water contribute to it? It has a lot of water as space filler, should I change it to something else?

Anything adds but I doubt that's the lion's share. Terrain and doodads that are currently beneath your camera are not even rendered.

(For some reason the editor likes to remove the Alchemist, Firelord, and Tinker).

These heroes were implemented by patch and the map uses the old object data on default (>>>Scenario >>Map Options).

We could be guessing here all day. You need to post the map or the triggers at least.

Agree. You do not have to present the map. Just so we can look it up here and it can be deleted afterwards again. If you have already reduced the problem like you said, removing features, and the lag still occurs, send this decreased version please as it's easier for us too.

In my own personal experience I once had a similar problem, but with an ability.

Would be also a guess of mine. If you hardly use triggers, you probably have some bad object editor data that causes the lag.

Maybe the waygate triggers leak. If you have any triggers that use a location, you have to remove the location after you use it.

Only if the TC extremely exaggerates it like with some very large loops. Really, the leak phobia of the members of this site is stunning.

If at begining it's okay, and later it starts to lag, it must be a leak and can be only trigger related, so it must be something with waygate or whatever trrigers....

Or it's just that the map reveals new contents within play time.

@TC: If your triggers are like that, they probably won't be the reason. They are not even ongoing while the game progresses, so they won't create new leaks if there were any.

Plus if you got lots of Map Initilization or whatever similar condition trrigers, you should put them as one.
just telling you... current triggering is really uneficient.

That would be really messy, putting things together that have nothing to do with one another.
 
Level 5
Joined
Dec 15, 2010
Messages
115
Agree. You do not have to present the map. Just so we can look it up here and it can be deleted afterwards again. If you have already reduced the problem like you said, removing features, and the lag still occurs, send this decreased version please as it's easier for us too.

Alright, I will do so, but where do I upload, or PM, or what?
 
Level 5
Joined
Dec 15, 2010
Messages
115
EDIT: Fixed, Firefox being stupid, had to use..... IE Dun-Dun-DUN.

Goal of the map is intended to be, 6 players start in each dungeon, emerge in to the overworld and conquer it, venture in to your opponents dungeons and eliminate them. I am a sucker for playing on maps made after old games.

I removed all units other then the startign locations and gold mines.
I removed all triggers other then the default initialization.
I removed all regions.
I removed a fair amount of doodads.
Any custom object data is back to the default.
Still having the problem.

Oh the dungeon section doesn't have the LoS and "No-fly" parts added yet, so ignore that.
 

Attachments

  • Hyrule NES.w3x
    179.1 KB · Views: 70
Last edited:
Level 2
Joined
Feb 8, 2011
Messages
31
Take out this line in your Initialization trigger and tell me if the lag is still there:
  • Melee Game - Run melee AI scripts (for computer players)
 
Level 26
Joined
Aug 18, 2009
Messages
4,097
Yes, its a combination of the standard AI and your terrain. There is no building space. The for me undead-player summoned a crypt and a ziggurat and then permanently fruitlessly tried to find a spot for the altar or another building. This was clearly visible as it had always withdrawn its acolytes from the mine and sent it back the other second.
 
Level 5
Joined
Dec 15, 2010
Messages
115
Thank you so much, that fixed it (Well I have been playing it for 5 minutes with no trouble, so I assume it is). A little disappointing since I usually like to have an AI work on a map if possible, but it's low priority and idc if it can't work.

Players > AI

Well what do you think so far? (Honest opinion, if you thought it sucked and it should burn in hell, do not hesitate to state that)

+rep to go around.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,198
animated objects or global weather effects on the map as both of these things can cause lag.

These can not cause lag as they generate no net traffic. At most they can cause lag by performance degradation but that is minimal due to how insanly fast computers now are.

He already said that his poor performance (not lag, he was using the word lag incorrectly) was caused by the AI.
 
Level 8
Joined
Dec 12, 2010
Messages
280
These can not cause lag as they generate no net traffic. At most they can cause lag by performance degradation but that is minimal due to how insanly fast computers now are.

He already said that his poor performance (not lag, he was using the word lag incorrectly) was caused by the AI.

Now I see where your coming from lol. You keep saying these things don't generate net traffic, now I know why. The word lag is short for what > lagging which means falling behind or slow. Which could mean slow performance from anything. I sometimes lag myself :) I'd think its safe to say that most people loosely use the term lag when refering to a frame rate drop that causes the game to stick or studder.

@Zoldam > You gave up on the AI? Have you considered forcing the AI with triggers. I recently made a triggered AI on the map Modern War that forced the AI to build every structure in a certain region. It actually turned out pretty good the AI builds every structure, trains every combat unit, Forms an attack group and attacks any one of four enemy players on the map. It will also replace any lost workers, rebuild lost structures, upgrade its main base and defend its base against attacks. I also added a condition where the AI won't build a worker unit if the base was under attack. (unlike the melee AI)
A difficulty system was also made depending on what type of computer AI is used > easy, med, or insane. Which adjusted a gold bonus for the AI, Attack interval, Attack delay and upgrade delay time.

It's probably not the easiest thing to do, it may not be the most efficent AI vs a scripted or melee AI, although it doesn't cause any noticable loss in game performance (dare I say lag) mostly due to DSG and Ap0 for teaching me how to prevent trigger leaks and combining triggers for greater efficency. (and you thought no one was listening)

And I must say I rather enjoyed making it :)
 
Level 5
Joined
Dec 15, 2010
Messages
115
@ ironman

Well I know practically nothing about triggers, so I don't think I would be ready to work on new AIs.
 
Status
Not open for further replies.
Top