Open datahead8888 opened 9 years ago
I may take a look at this and see what can be done whenever I get some free time. For now just some ideas and thoughts.
This seems like it should allow a sprite added to the overworld that would be animated as follows:
<sprite>
<!-- position/passive -->
<property name="image" value="world/objects/hedge/green.imgset" />
</sprite>
green.imgset:
time 100
green_1.png
green_2.png
green_3.png
green_2.png
Just from a quick skim of the code in devel, it seems like this should work, including plain sequential animations but also some randomness in frame branching. Eventually I should add a file describing the .anim format.
I just tested this by editing world 1's world.xml and setting some sprite to use an enemy .imgset file "enemy/larry/grey/walk.imgset". It seems to work correctly.
Could you post it in a PR so that we can try it out? Be sure to include testing instructions or worlds/levels as needed.
Pull request here: #484
There isn't any changes to code needed, it just requires manually editing the world XML files. Currently neither the level editor or world editor that I'm aware of have a way to show imgset items in the editor. I don't know anything about the editor code so don't know how to change that.
Very cool. Now we only need a to add a UI element in the editor that supports animated graphics...
Vale, Quintus
As discussed at http://forum.secretchronicles.de/topics/305 it would be great to be able to have animations for sprites in the world map.
To quote Quintus: