Hi! Here is the documentation of data.xml, the file that you need to edit to
define your animations. It's pretty brief so don't worry if you don't
understand it, I suppose it's better to experiment with it. Here's a short
tutorial:
Say that you have produced ten frames for odd walking sw (left/towards the
camera). Then name them odd.walking.sw.001.png to odd.walking.sw.010.png,
and copy them into the Resources folder. If you just start the game now, you
will see that it uses the six first frames. Now open data.xml in a text
editor and find the element <frames>6</frames> right below <direction
id="sw" ... . Change "6" to "10". At the same time you need to fill out the
<offsetx>, <offsety>, and <delay> elements immediately below so that there
are ten values instead of six between the curly brackets, otherwise the
engine will crash when it doesn't find the values that it needs. Then, if
you run again, the engine should use all ten frames.
Presuming that your images are about 200 pixels high, they will be a lot
smaller than the old images which are about 400 pixels. To give your images
correct size, change the <scale>0.5</scale> element at the top of the file
to <scale>1</scale>. Moreover, if you think that odd advances too much for
each frame, decrease the <speed> value.
Next you will need to edit the offset values so that Odd will be correctly
positioned relative to the ground and to user clicks. For each frame, find
the x and y coordinates of Odd's feet and edit the sequence in the <offsetx>
and <offsety>, respectively. The first value in each sequence belongs to the
first frame, the second value to the second, etc. Try out the animation; if
he for instance seems to be too far right in a specific frame, increase the
offsetx value for that frame.
Finally, you can edit the speed of the animations in the <delay> element. It
specifies the time in milliseconds for each frame.
Notice that there is no error checking at all in the engine, so it will
crash if you make a mistake. The probable causes are:
* There is a syntax error in the XML file. Open data.xml with Internet
Explorer, it will run a syntax check and report any error.
* An image file is missing. If you specified 10 frames, there must be 10
correctly named image files in the Resource folder for that animation.
* The sequences in the <offsetx>, <offsety> and <delay> elements don't
contain enough values. If the preceding <frames> element specifies 10
frames, there must be 10 values in each of these sequences. The values must
be separated by spaces.
Oh, one more thing! You need to download the latest version of OddWin32.zip
that I uploaded a few minutes ago. The one from yesterday is outdated
already.
Good luck, and again, ask if you run into problems! I guess ICQ is useful
for that, I'm usually online 19-23 Swedish time. And please tell us if you
come up with a feature that would make your animations work better!
/Jerker
begin 666 DataXmlDoc.txt
M5&AI<R!D;V-U;65N="!D97-C<FEB97,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