therevillsgames Posted February 16, 2013 Report Share Posted February 16, 2013 Awhile ago I converted the LibGDX code over to Monkey http://www.monkeycoder.co.nz/ code when Spriter was first announced over on KickStarter. I have recently rewrote it to use the current version of Spriter and it seems to work pretty well (no bones at the moment): http://www.therevillsgames.com/monkey/SpriterA4/MonkeyGame.html You can check the progress here: http://www.monkeycoder.co.nz/Community/posts.php?topic=2709 Its written so that it should be pretty easy to convert to over OO languages. Looking forward to the full release :) Quote Link to comment Share on other sites More sharing options...
Mike at BrashMonkey Posted February 17, 2013 Report Share Posted February 17, 2013 hi therevillsgames, Awesome. I'm sure many people will really benefit from your work. I've just created this small example Spriuter file which uses bones, which might come in handy when you're ready to work on bone support. http://www.brashmonkeygames.com/brashmonkey/spriter/BoneExample.zip cheers, Mike at BrashMonkey Quote Link to comment Share on other sites More sharing options...
therevillsgames Posted February 18, 2013 Author Report Share Posted February 18, 2013 hi therevillsgames,Awesome. I'm sure many people will really benefit from your work. I've just created this small example Spriuter file which uses bones, which might come in handy when you're ready to work on bone support. http://www.brashmonkeygames.com/brashmonkey/spriter/BoneExample.zip cheers, Mike at BrashMonkey Thanks Mike :) Any chance of some pseudo code on how to implement the bones? Oh I forgot to add this in my original post, since Monkey is a cross platform language, this code basically gives us a Spriter plugin for HTML5, XNA, Java (Android), iOS, Flash, Windows, Mac OSX and a few more targets I cant remember at the moment ;) Quote Link to comment Share on other sites More sharing options...
slopps Posted February 20, 2013 Report Share Posted February 20, 2013 for implementing bones, you basically just need to understand a few basics. With bones, everything can possibly have a parent (but doesn't have to). The transform data (position, scale, and rotation) of each ref, be it a bone or an object, is relative only to that ref's immediate parent. So, you must traverse the bone hierarchy from the top down, and append your transforms as you go. Luckily, the SCML data for each Timeline is structured in hierarchy descending order, so you should only need to loop through your bones once. You can look at the source code for SpriterMC (the updatevisuals method) or grimfang's C++ implementation. There are also a few good forum posts about it: viewtopic.php?f=3&t=5824 and viewtopic.php?f=2&t=1400 Quote Link to comment Share on other sites More sharing options...
therevillsgames Posted February 21, 2013 Author Report Share Posted February 21, 2013 Thanks for the links and info Slopps :) I still haven't got my head around it yet, but I'll keep going :? Quote Link to comment Share on other sites More sharing options...
therevillsgames Posted March 10, 2013 Author Report Share Posted March 10, 2013 Bones are now in :) For the past week or so, I've been having a hard time trying to flip the bones... everything I tried messed up the angles... I was about to give up when I had a brainwave last night and thought sod flipping the bones, I'll just flip the images: http://www.therevillsgames.com/monkey/S ... yGame.html So its a bit of a hack, but its good enough for me to use Spriter in my games :D Code is checked into Google Code: https://code.google.com/p/monkey-spriter-importer/ 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.