Hi guys,
Over the past few days I've been working on a Spriter importer for AppGameKit Tier 1. Now I know AppGameKit V2 supports Spine (which is basically the same thing as Spriter), but personally I like Spriter's interface and workflow much more than Spine, not to mention Spriter is free.
Anyways, the importer is almost finished. Right now it can load a .scml file and play all of its animations (I haven't implemented tweening between keyframes yet). However, I've run into an issue.
Loading all of the images for the .scml file I'm testing with only takes AppGameKit 100 milliseconds (super fast). However, file parsing takes a very long time. Generally, AppGameKit V108 takes around 7 - 8 seconds to parse the file and AppGameKit V2 takes 8 - 10 seconds (probably because the window become "Not Responding" for a second). When my computer is feeling a bit slow (I have a lot of things open) I've seen in take 30 - 40 seconds to parse the file. These benchmarks are all from my PC, so I'd imagine on a mobile device loading could be even slower.
I did a benchmark in Tier 2 for a comparison, and it loads in less than a second. I would guess that this is because in C++ I can use an XML parser, whereas in Tier 1 I have to do all the parsing myself (which turns out to be a bit slow).
I've also tried using AGK's file writing commands to output a .scml that can be easily loaded with AGK's read commands. I scrapped this idea, because the 356KB .scml file became over 100MB.
I've attached my importer to this post, I'm hoping someone may be able to spot some ways to speed it up. Be warned though, I didn't comment my code at all (oops).
Sean