wighawag Posted February 17, 2016 Report Share Posted February 17, 2016 Hi, I am happy to announce the first release of a new spriter runtime for Haxe (https://github.com/wighawag/spriter , haxelib : http://lib.haxe.org/p/spriter/ ) It is originaly based on the great work of @Loodakrawa for its c# implementation. I optimized it for Haxe and got rid of allocation (so no gc at all while spriter entity is animating!) This does not use pool neither. The runtime itself contain no rendering code and there is currently only one library that do the rendering : https://github.com/wighawag/spriterkha This for Kha : http://kha.tech/ an awesome low level cross platform api. You can find a test project here : https://github.com/wighawag/spriter_test The api is still not complete and it is not yet a 1.0.0 release and I would be interested in feedback Since Haxe can output to different languages, this could be used as a library for any such language as well. Let me know if you need help for that. My implementation has been tested on js and cpp only but should work on all target. The library is unit tested with data from the c# implementation so it should behave in the exact same way The "no allocation" claim is also unit tested (for the cpp target) Hope someone find it useful. Thanks Quote Link to comment Share on other sites More sharing options...
Mike at BrashMonkey Posted February 17, 2016 Report Share Posted February 17, 2016 Awesome work wighawag! I'm sure this will be very useful for a lot of Spriter users. cheers. -Mike at BrashMonkey Quote Link to comment Share on other sites More sharing options...
loudo Posted February 18, 2016 Report Share Posted February 18, 2016 Quote so no gc at all while spriter entity is animating! Awesome! Sadly I still have many allocations (haxe as well) but I tend to reduce them in my dev branch How did you managed to do that? EDIT : Oh I see you use an abstract to use one big Vector instead of multiple Object for your computations. Nice ! I tend to use one static object instead but I still have some allocations (I'm cloning KeyB but I will use a static one for my computations soon). Did you try this implementation of Kha for SpriterHaxeEngine? Anyway, I'll give it a try. Did you make a performance test? I'll be interested on how we can both optimize our libraries. Cheers; Quote Link to comment Share on other sites More sharing options...
wighawag Posted February 20, 2016 Author Report Share Posted February 20, 2016 Thanks Mike and loudo I did not know SpriterHaxeEngine had a kha implementation My main reason to do a new haxe impl was to make a version without reference to rendering and without alloc Vector is the main trick but there are few other. Hxtelemetry was very useful for that. One of them is that because haxe Map do not have a clear method I had to keep track of the key in an array. Also I had to create a dummy key to I guess allocate first I did not do any performance test apart from the alloc test on hxcpp. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.