Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Spriter Importer - Need Your Help!

Author
Message
Hockeykid
DBPro Tool Maker
17
Years of Service
User Offline
Joined: 26th Sep 2007
Location:
Posted: 14th Aug 2014 14:30
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

Attachments

Login to view attachments
Duffer
21
Years of Service
User Offline
Joined: 9th Feb 2003
Location: chair
Posted: 20th Oct 2014 09:51
@ Hockeykid - how far did you take this?

I was also looking at Phaelax's spriter importer for DBPro... but one for AppGameKit (and I am thinking AGK2) would be v handy...

a long time dabbler with DBC and DBPro with no actual talent but lots of enthusiasm...
Hockeykid
DBPro Tool Maker
17
Years of Service
User Offline
Joined: 26th Sep 2007
Location:
Posted: 20th Oct 2014 09:55
Quote: "how far did you take this?"


Not any further than this post. Unfortunately, AppGameKit Tier 1 doesn't have an XML parser so parsing the Spriter file myself causes loading to take quite awhile.

If you take a look at the code, let me know if you find a way to speed it up.

Sean

Duffer
21
Years of Service
User Offline
Joined: 9th Feb 2003
Location: chair
Posted: 20th Oct 2014 09:58
@ Hockeykid,

I'll take a look.

I'll also look again at Phaelax's implementation in DBPro - see if anything can be learnt.

a long time dabbler with DBC and DBPro with no actual talent but lots of enthusiasm...

Login to post a reply

Server time is: 2024-11-25 09:25:34
Your offset time is: 2024-11-25 09:25:34