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/AppGameKit Studio Showcase / BMW Spine Sprite Animation API [Tier 1]

Author
Message
Wilf
Valued Member
17
Years of Service
User Offline
Joined: 1st Jun 2006
Location: Gone to Unity.
Posted: 9th Dec 2017 13:53 Edited at: 6th May 2020 11:32
BMW_Skeleton version 2.0

Hi all,
AGKs Spine implementation has been broken since Spine changed the way attachments work in 3.8. Animations no longer load at all.
Because TGC have stated they won't work on Spine in AppGameKit any more, I've reworked my BMW skeleton system and removed all of AGK's Skeleton2D commands.
Basically this lib loads in the Spine JSON, creates Tweenchains for every bone and slot and plays them using BMW_Update(skeletonID)

This WIP API supports both 3.7 and below, and 3.8 and above Spine skeletons. The command list has been expanded to cover AGKs functionality.

Done
Load a json skeleton once, subsequent skeletons with the same path will use the same data.
Generate sprites from a Spine image atlas and attach them to bones.
Image use is tracked internally to prevent loading the same image multiple times.
Scale bones - now you can scale in addition to rotate and translate.
Skins - animate skin alpha and colours in Spine see the results in your AppGameKit app
Events - add an Event Key in Spine to trigger a sound effect or particle in AGK.
Shaders - apply shaders to your skeleton!
Curve data - it detects whether an animation curve is present and applies TweenSmooth1() if so, TweenLinear() if not.

To Do (eventually):
Support for multiple image files and atlases
Meshes

REQUEST FOR HELP
The one thing this implementation lacks is interpolation between animations over time, and I've not sure how to implement that.
I've had a look at the AppGameKit Tier 2 source code for Spine here:

https://github.com/TheGameCreators/AGKTier2/blob/master/common/Source/Skeleton2D.cpp

..but I don't know the right approach to blend between anims. I'm pretty sure I need to store the Previous values and interpolate to the new over time, but I don't want to create temporary tweens on the fly.

Can anyone help?

May 6th 2020
- Split all source files out again - one file was too difficult to manage.
- Added my LIB_Basics.agc library for 2d camera control (pan/zoom/grids)

This lib is based on Baxslash's very cool Adaptable Spine Character code:
https://forum.thegamecreators.com/thread/218190
and uses Madbits deeply awesome json api:
https://forum.thegamecreators.com/thread/218297

Command List:


Attachments

Login to view attachments
Arbrakan
13
Years of Service
User Offline
Joined: 10th Oct 2010
Location: Geneva
Posted: 17th Jan 2018 23:00
Great ! Juste what i was looking for Thanks Wilf !

Do you have plan for the Spine Meshes ??

Thanks !
Xaby
FPSC Reloaded TGC Backer
16
Years of Service
User Offline
Joined: 17th Apr 2007
Location: Berlin
Posted: 18th Jan 2018 23:59
I am hoping, to get better nativ support from TGC in AppGameKit for Skinning, Attaching things to bones and be able to Use Skeletons like 3D objects, to be able to interact in a 3D environment.

I am hoping also, to have support for Bounding-Boxes and Box2D. And the events, you can make in Spine. And also Mesh deformations.

Great work. Hope TGC will use a newer runtime for Spine and Spriter and or implement Creature (from Kestrelmoon) soon. (hoping 3 years now for better Spine support)
Wilf
Valued Member
17
Years of Service
User Offline
Joined: 1st Jun 2006
Location: Gone to Unity.
Posted: 3rd Feb 2018 15:43
Thanks Arbrakan and Xaby!

I did have plans for meshes but I started a new job last October which as usual has limited my time and energy. It's hard to make games on the weekend when thats your day job I'm not complaining though. I get paid to make video games, live in a tax-free country, work from home and have a swimming pool 1 minute away.

I'd love to see the full Spine feature set in AppGameKit but it got deprioritized when the price of Spine went up to non-hobbyist levels. Thats pretty clear from the level of response on this forum

I'm just glad we got what we did, when we did.
Naughty Alien
6
Years of Service
User Offline
Joined: 26th Jul 2017
Location:
Posted: 1st Mar 2018 05:06
...you did really nice work...i really think that Spriter/Spine support in AppGameKit is a must for 2D game development...current support for Spine is somewhat basic, which is fine for most cases, but i would love to see support for Meshes/Vertices in Spine..
Arbrakan
13
Years of Service
User Offline
Joined: 10th Oct 2010
Location: Geneva
Posted: 1st Mar 2018 08:18
+1
Qugurun
Valued Member
9
Years of Service
User Offline
Joined: 8th Dec 2014
Playing: AppGameKit
Posted: 25th May 2020 04:03
Wilf, thanks for the work you've done. Tell me there is an opportunity to hope that you will do similar for dragonbones?

Login to post a reply

Server time is: 2024-03-29 14:35:02
Your offset time is: 2024-03-29 14:35:02