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

Map-Efficiency improvement!

Status
Not open for further replies.
Level 7
Joined
Aug 30, 2008
Messages
347
I have a question, is there a way to improve map efficiency such as speed and loading times, also the ingame lag...

does making the map size epic do something for it?
Is optimizing the only way?
bunch of questions....
also, does the amount of triggers in the trigger editor decrease speed and efficiency or is it only the custom models and music...

pls help :thumbs_up:
 
Level 10
Joined
Aug 19, 2008
Messages
491
I have a question, is there a way to improve map efficiency such as speed and loading times, also the ingame lag...

does making the map size epic do something for it?
Is optimizing the only way?
bunch of questions....
also, does the amount of triggers in the trigger editor decrease speed and efficiency or is it only the custom models and music...

pls help :thumbs_up:

I'm not an expert coder, but there are 4 things that creates lag and size:
- Extremely many triggers
- GUI (the normal scripting language you use)
- Music (size only)
- Unproper leak cleaning

For the first one, there isn't really anything you can do about the quantity but you can increase efficiency with advanced coding. If you really want to go ahead into Jass already, sure, be my guest, but I don't recommend it just yet since you seem like you're new to the World Editor.

The second case involves the same solution as the one above: Jass.
If you don't know what Jass is yet, I can tell you.
There are 2 scripting languages that Blizzard made: GUI and Jass.
GUI stands for General User Interface and is what you normally see in the Trigger Editor:
  • GUI Trigger
    • Events
    • Conditions
    • Actions
Jass however, is the "pure" language for WarCraft III. GUI is actualy Jass, but in a more usefriendly form. Jass looks something like this:
JASS:
function Conditions takes nothing returns boolean
    return true
endfunction

function Actions takes nothing returns nothing
endfunction

//===========================================================================
function InitTrig_Jass_Script takes nothing returns nothing
    local trigger t = CreateTrigger()
    call TriggerRegisterAnyUnitEventBJ( t, EVENT_PLAYER_UNIT_SPELL_EFFECT )
    call TriggerAddCondition( t, Condition( function Conditions ) )
    call TriggerAddAction( t, function Actions )
endfunction

I guess that this doesn't look very appealing to learn at your current stage, right?
Don't worry, in time you'll learn it (if you keep on editing that is)

Now you may wonder why GUI is so laggy (maybe you're not but still).
Well, GUI actually "activates another action"*, which activates yet another action, and that action activates another action, and that is the source of the action.
So instead of doing 1 action it does 3, and that increases processing time.

*"activates another action" is actually "calls another function", but I decided to make it easier for you to understand.




For the third case, I can only recommend you not to use it. Music increases the size of a map up to 10x, and that's not very good now is it?

And as for the fourth case, there's an easy solution. I recommend you visit the page Billy the Cat linked, or visit some tutorial here on hive. I really don't have the time to explain in detail how you can remove leaks when there are so many good tutorials already up.


I wish this helped. If not, just ask and I'll give it another shot.
 
Level 8
Joined
Nov 9, 2008
Messages
502
You could rescale all units and doodads allowing you to use a smaller map size to the same effect.

Force a 10 second wait for all players at beginning of the game in which time create 1 of all types of units (with all abilities) then remove them. This loads the resources to your memory so when they appear in-game they won't cause pauses while the game loads the resources.
 
Level 7
Joined
Aug 30, 2008
Messages
347
ok thanks everybody! im gonna try this out on my maps and hopefully it will drastically improve it! :)
 
Status
Not open for further replies.
Top