- Joined
- Nov 16, 2006
- Messages
- 2,165
<-- Map Resizing Tutorial -->
Resizing?
Yes, in this tutorial I will explain the following things from the editor
which TAKE extra space and can be easly fixed to save plenty of space.
What does this do?
If you are correctly doing what I just showed then your map will be possibly
300-600 kb's smaller, and alot faster with loading.
Why don't we just use a program?
We can use vexorian's optimizer also after optimizing our map, which can
totaly even remove more space ( 1+- mb).
Lets get started!
The first chapter will be the triggers.
-- Triggers --
Now, what is taking space when we use triggers?
First of all : the variables. Each variable created will take a new part of space
in your map, so this will also increase your size and loading time.
Each variable will increase the map its size very slightly, using variables with
arrays will take ofcourse more space.
How can I reduce so much variables taking space?
There are different options here:
- Use only ONE variable which each has the maximum arrays.
For each trigger, use a different array number.
- Use custom scripts with local variables (I will add another tutorial if some don't understand this).
-The third option is to use JASS. JASS doesn't require any(!mostly) variables (when using it
correctly) and increases your map its speed slightly. Since JASS is just a script, it also
doesn't need much space.
Allright, now lets go to the triggers themselves!
Each trigger created will take up space, depenting on how many events/conditions/actions you are using.
An example would be a trigger with 4 actions, those will take lesser space and loading time then
a trigger with 20 actions. Also, try to put useless triggers together since each NEW trigger created will take
extra space and loading time. An example here is using one trigger to setup
the map (set boolean1 = true ,like that), and another trigger to setup the waygates.
Just add the actions in one same trigger, that makes much sense : saving space and reducing the loading time.
------------------------------------------------------------------
-- Objects --
The next part I will discuss : The object editor.
Here are the most mistakes made. I would like to start by the units,
but actualy it doesn't matter where to start since the explanation comes down
on the same.
A thing, that GREATLY reduces the loading time and size is to NOT create custom units!
What should we do then?
Simply edit a standard unit that isn't used in your map.
I'm sure that there are plenty of units which are unused.
I think it doesn't make sense after all...
If you don't believe me, simply create four custom units, save the map and check
the size. Remove them and then check the size. I lost 400kb by removing custom
units.
But now to go on, we come out by the items, destructibles, doodads, abilities, buffs/effects and
upgrades : this is just the same information as above, from the units. Simply edit things you
won't use in your map, and voila! Your map size will be lesser then with custom objects!
-- The map --
Here are some hints to also save space and increasing your loading speed.
-Do not pre-place units, but use a trigger that does it.
-Some doodads like tree's can also be created on the map with a trigger.
I suggest placing some tree's, and then let the trigger automaticly add some.
-Also don't add items manualy, but let a trigger do it. Its very easy, and the
effect stays the same.
> A last hint for placing these objects : use points.
Go stand with your cursor on a location, where the object needs to be created.
Check LEFT down of your world editor : it displays Point: (-3501,4), (2614,6), (0.00).
The ones I displayed are just an examples. But just write down those points or keep
them in minds and then use the [Conversion - Convert Coordinates to Point] option to
create your unit!
BEWARE! This does not mean that it won't leak! Use a variable or
custom script to prevent leaks.
What does this means?
An example of this would be :
<Complete your map by using Vexorian's Optimizer>
-> surely even faster now if you already used it!
Thanks for reading this tutorial,
Sorry for my bad english.
!
~- Heero
Resizing?
Yes, in this tutorial I will explain the following things from the editor
which TAKE extra space and can be easly fixed to save plenty of space.
What does this do?
If you are correctly doing what I just showed then your map will be possibly
300-600 kb's smaller, and alot faster with loading.
Why don't we just use a program?
We can use vexorian's optimizer also after optimizing our map, which can
totaly even remove more space ( 1+- mb).
Lets get started!
The first chapter will be the triggers.
-- Triggers --
Now, what is taking space when we use triggers?
First of all : the variables. Each variable created will take a new part of space
in your map, so this will also increase your size and loading time.
Each variable will increase the map its size very slightly, using variables with
arrays will take ofcourse more space.
How can I reduce so much variables taking space?
There are different options here:
- Use only ONE variable which each has the maximum arrays.
For each trigger, use a different array number.
- Use custom scripts with local variables (I will add another tutorial if some don't understand this).
-The third option is to use JASS. JASS doesn't require any(!mostly) variables (when using it
correctly) and increases your map its speed slightly. Since JASS is just a script, it also
doesn't need much space.
Allright, now lets go to the triggers themselves!
Each trigger created will take up space, depenting on how many events/conditions/actions you are using.
An example would be a trigger with 4 actions, those will take lesser space and loading time then
a trigger with 20 actions. Also, try to put useless triggers together since each NEW trigger created will take
extra space and loading time. An example here is using one trigger to setup
the map (set boolean1 = true ,like that), and another trigger to setup the waygates.
Just add the actions in one same trigger, that makes much sense : saving space and reducing the loading time.
------------------------------------------------------------------
-- Objects --
The next part I will discuss : The object editor.
Here are the most mistakes made. I would like to start by the units,
but actualy it doesn't matter where to start since the explanation comes down
on the same.
A thing, that GREATLY reduces the loading time and size is to NOT create custom units!
What should we do then?
Simply edit a standard unit that isn't used in your map.
I'm sure that there are plenty of units which are unused.
I think it doesn't make sense after all...
If you don't believe me, simply create four custom units, save the map and check
the size. Remove them and then check the size. I lost 400kb by removing custom
units.
But now to go on, we come out by the items, destructibles, doodads, abilities, buffs/effects and
upgrades : this is just the same information as above, from the units. Simply edit things you
won't use in your map, and voila! Your map size will be lesser then with custom objects!
-- The map --
Here are some hints to also save space and increasing your loading speed.
-Do not pre-place units, but use a trigger that does it.
-Some doodads like tree's can also be created on the map with a trigger.
I suggest placing some tree's, and then let the trigger automaticly add some.
-Also don't add items manualy, but let a trigger do it. Its very easy, and the
effect stays the same.
> A last hint for placing these objects : use points.
Go stand with your cursor on a location, where the object needs to be created.
Check LEFT down of your world editor : it displays Point: (-3501,4), (2614,6), (0.00).
The ones I displayed are just an examples. But just write down those points or keep
them in minds and then use the [Conversion - Convert Coordinates to Point] option to
create your unit!
BEWARE! This does not mean that it won't leak! Use a variable or
custom script to prevent leaks.
What does this means?
An example of this would be :
-
Actions
- Set PositionTest = (Point(-500.40, -300.10))
- Unit - Create 1 Footman for Player 1 (Red) at PositionTest facing 0.00 degrees
- Custom script: call RemoveLocation(udg_PositionTest)
<Complete your map by using Vexorian's Optimizer>
-> surely even faster now if you already used it!
Thanks for reading this tutorial,
Sorry for my bad english.
!
~- Heero
Last edited: