• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Map Optimization

Status
Not open for further replies.
Level 2
Joined
Nov 4, 2004
Messages
23
I know there are programs to optimize some things in your map. But what can I, the map maker, do to help my map run more smoothly/less loading time/smaller file size etc.

Couple of things come to mind:
- Better to use multiple triggers or 1 big trigger, for things with the same event?
- Better to use a few Integer variables or 1 Integer Array?
- I read something about cliff heights?
- I see blizzard maps or maps like dota make all their heroes by editing existing ones. I tried this and found the map size increased. What are the reasons they do this?
- Is it beneificial to turn off triggers that wont be used again? Or triggers that are for spells that may not be used for whatever reasons?
- Creating units in WE then removing them in map initialization to remove the initial lag for when they enter the map, but sometimes this doesnt work for me, any ideas why?
- Other things like using points rather then using say 'center of region' or making a variable i.e. TempPlayer rather then using (Triggering Player) throughout.

My reasons for asking is my map is quite large and may have a lot of units at once, not extreme amounts but I'd like it to run as smoothly as possible. Also Ive created a save-load code for my map which needs some of these points addressed.

Thanks.
 
Level 6
Joined
Sep 17, 2005
Messages
276
Komodo said:
- Creating units in WE then removing them in map initialization to remove the initial lag for when they enter the map, but sometimes this doesnt work for me, any ideas why?

huh?? did i understand you right - you place units with your WE and you remove them when you start playing your map?? :?:
Anyway... some actions doesnt work on map initialization so perhaps try an even with -elapsed game time = 0.01 sec or somethin...

to your quest with the arrays.. well i use arrays as often i can because its much easier to handle and easier to reset when they leak (with for integer loop).

some tips: :wink:
- if its possible dont set triggers at init-on. better to enable some later with trigger action.
- good way to destroy some leaks is following trigger, especially if you have lots of units spawned:

EVENT: A unit decays
COND:
ACT: wait some seconds
remove decaying unit from game

so you are sure that no unit leaks on your RAM

For the other questions a cant tell you much, im a bit new to mapping too... sry :?
 
Level 2
Joined
Nov 4, 2004
Messages
23
Sunny_D said:
Komodo said:
- Creating units in WE then removing them in map initialization to remove the initial lag for when they enter the map, but sometimes this doesnt work for me, any ideas why?

huh?? did i understand you right - you place units with your WE and you remove them when you start playing your map??

Ever noticed how when a unit (especially heroes) are created for the first time during a map it lags? Well place that hero somewhere on the terrain then remove it a map initialization. Then when you play your map and that unit is created it wont lag. Good example is the old DotA where it lags when your hero is created.
 
Level 6
Joined
Sep 17, 2005
Messages
276
hm....well i didnt noticed that yet.

to your quest to use big trigger or some smaller:
well, my experience showed that one trigger is faster. if you have much actions to run, add some waits (not too much) between them. even if only a 0.1 sec-wait it helps reducing laggy.

anyway i edited above post. maybe it helps ya a bit, but hey as i said im a new mapper :)
 
Level 6
Joined
Sep 17, 2005
Messages
276
yea... sure this is another way but as i make a resevil kinda map it doesnt look very well if they disappear on death. so i made a wait of some sec in between.
 
Status
Not open for further replies.
Top