Difference between revisions of "Minimizing your Script"

Jump to navigation Jump to search
479 bytes added ,  06:43, 10 August 2009
de-emphasized importance of technique
imported>DragoonWraith
m (Reverted edits by KyleWollaston (Talk); changed back to last version by Halo112358)
imported>Sabar
(de-emphasized importance of technique)
The following is only important when a script does a CPU intensive task that is known or has been tested to affect the frame rate. This is generally reduced to situations that involve naive searching, sorting, or constant iteration through many references. Code that must have inefficient algorithms can best take advantage of the techniques here. Note that almost all code produced with the vanilla editor will already run well, regardless of programming technique.
 
== Gamemode Scripts ==
Avoid using gamemode scripts wherever possible. Use quest scripts if you can, or try to find ways to put as much of the script work into OnLoad, OnEquip, and ScriptEffectStart blocks as possible.
begin GameMode
if (some condition)
(some extremelyinefficient/complex long code blockalgorithm)
endif
end</pre>
endif
 
(some extremelyinefficient/complex long code blockalgorithm)
end</pre>
 
Anonymous user

Navigation menu