| 01-23-2004, 01:33 PM | #1 |
I'm making a 12 player custom map that works similiar to Footman Wars. Each player is limited to 75 units. A short while into the game I was having some serious lag issues, likely caused from the map using too much memory or some such thing. So I added an action to 'Remove Dying Unit' It helped, for awhile. The game lasted about 5x longer -- until it happened again. Does anyone else have any ideas? The only thing I could notice that changed from when the game was running fine to when it started to slow down was that my units evolved from tier 3 to tier 4 and became Frost Wyrms. |
| 01-23-2004, 02:01 PM | #2 |
Sounds to me like you've got memory leaks out the wazoo. Make sure all of your triggers end properly. Try to make sure that you dont have too many randoms that would cause memory holes. I'm not an expert on this but it just sounds to me like you have big time memory leaks. Hopefully someone more knowledgable than I can explain better. But Im willing to bet thats your problem -Huh |
| 01-23-2004, 03:07 PM | #3 |
What do you mean by triggers that 'end properly'. All my triggers are made in the standard editor and the only custom script I have is for when a player dies -- it creates a local variable to hold the player over a wait statement so he can have 30 seconds to say bye before being defeated. Since nobody is being defeated, I don't think that'd be a problem. Although, do local variables need to be manually cleared? As for random, there's just one trigger that activates after a short delay to randomly make race/unit-type selections for computer players and players that haven't chosen within the alotted time. |
| 01-23-2004, 03:29 PM | #4 |
Something tells me theres a tutorial buried somewhere in this site that will answer your question better than i can :P. Do you have many triggers that loop over short periods of time? Like periodic events that trigger every few seconds. 'Cause if you do, thats been known to make BIG lag. I dont think local variables need to be manually cleared unless it was for a specific circumstance. Otherwise i think 90% of the maps out there would be broken, because I know most map makers wont bother clearing every variable. By closing triggers, i just meant.. if you have a trigger that only fires once, do you use trigger- turn off this trigger at the end because sometimes that can help reduce lag. Honestly, i dunno man. Im not an expert on these things yet. But i know how bad it sucks not being able to get help so i thought id have at it. Good luck though. |
| 01-23-2004, 04:12 PM | #5 |
lol yeah I know, I rarely ever get answers to my questions -- I appreciate it. Turning off triggers seems like a good idea. I'll hafta look through my code and add some of those statements in and try it out again. Which also makes me think, I may have a number of places that loop through unit groups -- I could probably optimize them better. Oh the turmoil of map-making... Thanks again, Huh Update: Good stuff. Now I had also changed the units' death to be "Does not decay, not revivable" or whatever -- but I don't see how that'd have an effect since there was also a trigger previously to remove any dying units. Same thing, right? Anyhoo... it turns out that after 30 seconds into the game, there are only 3 triggers that actually need to run. So I had the rest of them turned off and played through twice with no problems at all. Maybe I can up the max spawn limit now ^_^ You hit Low Upkeep in like no time at all with only a 75 unit limit. Much thanks, Huh. |
