• 🏆 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!
  • ✅ The POLL for Hive's Texturing Contest #33 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!

[Crash] Survival Game - General Lag

Status
Not open for further replies.
Level 9
Joined
May 21, 2014
Messages
580
Hello again, Hive.

I have an ancient map that I decided to work on again. It's a survival game where monsters periodically spawn from all corners of the map. The player must build a base to ward off the monsters to survive.

Since the monsters periodically spawn, soon, the map will be filled with units, and then low-end computers will lag out then crash soon. I want to request for suggestions of how I can make the map less laggy at all costs.

Thanks.
 
Heaving a lot of units in map is quite heavy for any map. You also will lag harder if there are many of them on your current screen.

Periodicly picking all units in map might also be a too heavy operation, if the interval is set too low.

The suggestions mentioned in posts above sounds good to make some precautions to avoid having too many units at same time.

I belive too many effects and eye-candy things is also not really positive in your case.

Also ensure you don't have memory leaks. The game could get jerky, after some gametime with too many leaks. (http://www.hiveworkshop.com/forums/triggers-scripts-269/things-leak-35124/)
 
Level 9
Joined
May 21, 2014
Messages
580
Thank you for your replies. The monsters have to travel as the proper position is one key to winning and abusing their distance and spawn points. The starting delay? Mind elaborating this one?

The usage of food is quite interesting; i might be able to use that instead. Food can exceed 200+, right? (I mean the food consumed, not the maximum number of food.)

I have fixed leaks already as well, thank you for your concern. The eye-candy things are (as much as possible) limited too. I will have to recheck, though. Thanks for the reminder.
 
Level 9
Joined
May 21, 2014
Messages
580
Using food is an effective way of checking the amount of creeps without needing to use unit groups or integers, for which you'll need to add/remove in various ways based on whatever spells and such might be on the map.

I am back from being busy.

I also wanted to ask if the trigger called "Player # (Color) Food Used" is capped as well, or it just endlessly increment without any limit?

I am assuming that the hard coded food was the amount of available food that a player can have, but not the food number that the unit actually takes up.
 
Status
Not open for further replies.
Top