Quick Links: Download Gideros Studio | Gideros Documentation | Gideros Development Center | Gideros community chat | DONATE
Spine Gideros Runtime — Gideros Forum

Spine Gideros Runtime

evsevs Member
edited March 2013 in Announcements
Hello,

Attached is my port of Esoteric Software's Spine Corona Runtime found here: https://github.com/EsotericSoftware/spine-runtimes

A bit hack and slash, but it works!

NOTE: Added changes by @petec here

http://www.giderosmobile.com/forum/discussion/2714/spine-gideros-runtime#Item_15

cheers

evs
+1 -1 (+6 / -0 )Share on Facebook
«13

Comments

  • Wow, thanks @evs :)
    have fun with our games~
    http://www.nightspade.com
  • cool, so from this sample we can work with exported json from Spine tools?
  • Very cool! I'll have to play with this. What kind of changes did you have to make? I did a diff but it looks like you ran a source formatter, makes it hard to see which changes are important. :)

    Note we'll be refactoring the Corona Lua runtime into a generic Lua runtime that the Corona runtime uses. That should make it even easier for you to implement one for Gideros.
  • evsevs Member
    edited March 2013
    @NateS

    That source formatter was me :\">

    The changed files are:

    main.lua

    spine/AttachmentResolver.lua
    spine/Skeleton.lua
    spine/SkeletonJson.lua
    spine/utils.lua

    Also added file spine/json.lua

    I've attached a version with your original formatting so you can do a diff :)>-

    Thanks for such a great tool!!!

    I look forward to the generic Lua runtime (and an updated LWJGL for OSX)

    NOTE: Added changes by @petec here

    http://www.giderosmobile.com/forum/discussion/2714/spine-gideros-runtime#Item_15

    cheers

    evs

    Likes: talis

    +1 -1 (+1 / -0 )Share on Facebook
  • BJGBJG Member
    edited February 2013
  • Great, thanks @evs! Interesting how similar Gideros is to Corona. This diff should help when I make the generic Lua runtime. :)
  • petecpetec Member
    Hi @evs. I've been using your code to play with Spine. Thanks for the work you've done on this - it is a really handy tool and it's been going well until I tried changing the image attached to a bone (in the same way as is shown in Spine's second video with the foot image being changed). The moment I try that I get the following error:

    .\spine\SkeletonJson.lua:358: attempt to index upvalue 'json' (a boolean value)

    I get the same error if I simply try to hide an image attached to a bone by setting its visibility, without trying to swap images. Any ideas what is causing that?
  • evsevs Member
    @petec

    Have you made sure you use upper case for the json calls e.g Json.Decode(jsonText)


    cheers

    evs
  • petecpetec Member
    @evs I'm using the code that you wrote but pointing it at my data folder, so all calls use upper case as you did. Image visibilty works ok in Spine but when I export the project and use it in Gideros translations, rotations and scaling all work but changing image visibility causes the crash.

    My problem is that I don't understand what's going on in all the spine files, so I can't unravel it! I'll have a play with visibility in the demo project to see what that does.

    Thanks, Pete
  • petecpetec Member
    @evs I think I might have sorted the problem. There were a couple of places causing the error:

    In Slot lua around line 45 I changed:
    self.skeleton.images[self.attachment]:removeSelf()
    to
    self.skeleton:removeChild(self.skeleton.images[self.attachment])
    I guess that the original line is Corona syntax?

    In SkeletonJson.lua around line 357 I changed:
    attachmentName == json.null
    to
    attachmentName == null
    as that was the name being given to images that were set to not visible (i.e. removed!).

    I think that's all I needed to change to get it working. Can't be 100% sure as I tried several other things along the way while trying to make sense of things.

    Thought I'd let you know in case you wanted to tweak your code for anyone who might be downloading it. You'd better check it works if you do in case I've missed anything here.

    Quite surprised myself that I found the problem :D
  • evsevs Member
    @petec

    nice detective work!

    Here's an update with your changes - I can't test as I only have a trial version of Spine :((


    cheers

    evs
    zip
    zip
    spine-gideros.zip
    178K
  • petecpetec Member
    @evs I'll check it out when I get some time. It was your original work on this that encouraged me to support the kickstarter project with $30 to get a full copy as it made it easy to incorporate it in Gideros projects.

    Thanks, Pete
  • petecpetec Member
    @evs I've checked your file and it works fine with setting visibility of images.

    Line 12 of your main.lua would benefit from adding 'true' to anti-alias the images:
    return Bitmap.new(Texture.new("data/" .. attachment.name .. ".png",true))
    Pete
  • There is a a new version of Sprite Helper 2 Pro which does all of what Sprite Helper did and now can also do skeletal animation. I shall post a review soon, but that should not stop anyone from checking it out anytime now. It exports these animation for Gideros, C*SDK, Cocos2D.
    twitter: @ozapps | http://www.oz-apps.com | http://howto.oz-apps.com | http://reviewme.oz-apps.com
    Author of Learn Lua for iOS Game Development from Apress ( http://www.apress.com/9781430246626 )
    Cool Vizify Profile at https://www.vizify.com/oz-apps
  • This is a new version for new Spine format (merged skeleton and animation json files) :D tested with Spine 1.7.01
    zip
    zip
    spine-gideros-new.zip
    223K

    Likes: Mells

    +1 -1 (+1 / -0 )Share on Facebook
  • @stnguyenvn
    no time to test now but thanks for sharing :)
    twitter@TheWindApps Artful applications : The Wind Forest. #art #japan #apps
  • @stnguyenvn thanks for sharing :)
    have fun with our games~
    http://www.nightspade.com
  • @stnguyenvn Nice! Thank you for sharing this :)
  • stnguyenvnstnguyenvn Member
    edited January 2014
    I fixed some bugs related to scale, blending mode and created a public git repo so we can work on it together easily:

    http://github.com/stnguyen/spine-gideros

    (someone please help makes it a clickable link, I don't have permission ;) )

    Likes: phongtt

    +1 -1 (+1 / -0 )Share on Facebook
  • devfujidevfuji Member
    edited March 2014
    Hello,
    first thanks all for your portings.
    I have a question:
    how game performance are affected using Spine instead of raster sprites?
    Is there some degradation on some platform?

    I know that spine make the game use less memory as there are less image to load, but i think that memory saving will hit the CPU mole... I'm most worried about mobile games. Have you got some intense project that use Spine and at the same time some complex game logic as intelligent enemies os particles?

    thanks
  • kredor7kredor7 Member
    I tried this out however I seem to have an issue.

    With just the sample project without any changes running it on the desktop player after about 30-40seconds fps drops considerably down to a grinding halt and memory usage of the play increases dramatically.

    Has anyone else had this issue?

    I have not tested on mobile player yet.
  • Is Spine support still available with the latest version of Spine?
    My Gideros games: www.totebo.com
  • I'm going to bump this once a year! Bump!

    Likes: antix

    My Gideros games: www.totebo.com
    +1 -1 (+1 / -0 )Share on Facebook
  • antixantix Member
    edited June 2017
    JSON exports from the latest version of Spine do work with Gideros but I am guessing you can't use any special features added after 1.7

    Likes: totebo

    +1 -1 (+1 / -0 )Share on Facebook
  • The wait is over! I shall cease bumping this thread.

    http://giderosmobile.com/forum/discussion/7416/imgui-bindings#latest

    Likes: Apollo14

    My Gideros games: www.totebo.com
    +1 -1 (+1 / -0 )Share on Facebook
Sign In or Register to comment.