Update of patch #1134 (project wesnoth):

                  Status:             In Progress => None                   

    _______________________________________________________

Follow-up Comment #4:

How to activate the in_hex optimization correctly in your WML:
The in_hex optimization is always optional, if you never use the in_hex key,
all will work fine but rendering your units will be more cpu expensive. The
optimization also help people not using any animations, because even a simple
mouse move "animate" some hexes.

The in_hex key is always considered equal to 'no' by default. That means that
you never need to use a 'in_hex=no', but adding one where 'yes' is not wanted
may be useful to indicate to others that this place was reviewed and you
didn't just forget something. It could also be used to hint an artist about
an image having just one pixel out of the hex, maybe he could change that
(maybe add a comment like 'his ear is not in the hex').

There is 3 cumulative levels of optimizations (or 4 if your consider that do
nothing is one level), each one is more efficient but need more work:

- Optimize the base frame:
The base frame is the image key at the root of unit_type file. Check if this
image fit in a hex. If it does then add 'in_hex=yes' just below it. If it
doesn't fit in a hex, nothing is needed, but you may add a in_hex=no (see
remark above). This will optimize all units which don't have standing
animations or if the user deactivates them in his preferences.

- Optimize standing animations:
First, do the previous step about base frame. Next, check if the unit has
standing animations. If you find a [standing_anim] and all its frames fit in
hex, then add an 'in_hex=yes' into that [standing_anim] tag (same remark as
above about using in_hex=no). Note that some units like drakes may have a
[standing_anim] hidden in a macro.

- Optimize each frame of a standing animations:
This is probably never useful, but may help specific cases. First, optimize
the base frame, but not the root of [standing_anim]. Instead, check if some
frames fit in a hex. That is if the image in [frame] fit. In that case, add a
'in_hex=yes' into the [frame] tag. One possible use of that is to indicate
which images fit or not (after all, you know this info now).

Later, a similar optimization could be used for idle animations.

To test this optimization: for the base frame, use the :sunset mode and
highlight adjacent hexes. If the unit fit in a hex, she must be refreshed by
your move. Note that the test doesn't work if your unit is on a keep or other
higher places. For standing animations, just verify that adjacent hexes are
not refreshed when playing the anim. For specific frame, same thing, but you
must probably slower its speed to see it.

    _______________________________________________________

Reply to this item at:

  <http://gna.org/patch/?1134>

_______________________________________________
  Message sent via/by Gna!
  http://gna.org/


_______________________________________________
Wesnoth-bugs mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-bugs

Reply via email to