Quick Links: Download Gideros Studio | Gideros Documentation | Gideros Development Center | Gideros community chat | DONATE
tntanimator32.lua: bad code in precompiled chunk — Gideros Forum

tntanimator32.lua: bad code in precompiled chunk

billydbbillydb Member
edited October 2016 in General questions
Hi, I realise this is a super old plugin but in the latest Gideros the tntAnimator seems to have stooped working. Anyone know if there's an easy fix? Else I guess I'll have to convert to using movie clips or something :(

Comments

  • piepie Member
    Donate to @GregBug and he will send you the lua source :)

    Likes: SinisterSoft

    +1 -1 (+1 / -0 )Share on Facebook
  • hey guys if you thinks that would be useful to anyone i can release the source of my tnt animator lib.

    what do you think ?
    TNT ENGiNE for Gideors Studio - Particle Engine, Virtual Pad, Animator Studio, Collision Engine - DOWNLOAD NOW !!! IT'S FREE!!! -
    www.tntengine.com
    +1 -1 (+8 / -0 )Share on Facebook
  • Do it GregBUG!
    My Gideros games: www.totebo.com
  • here is it! ;))
    enjoy \m/
    B-)
    zip
    zip
    TNTAnimatorStudio115_FULL_Edition.zip
    5M

    Likes: muro, pie, n1cke, totebo

    TNT ENGiNE for Gideors Studio - Particle Engine, Virtual Pad, Animator Studio, Collision Engine - DOWNLOAD NOW !!! IT'S FREE!!! -
    www.tntengine.com
    +1 -1 (+4 / -0 )Share on Facebook
  • piepie Member
    Thank you GregBUG! come back soon! :)

    For those who are interested I made some additions to use callbacks instead of events: it actually handles both but uses callbacks if provided.
    Usage is similar to the default tntAnimator addEventListener call:
    local function myCallbackFunction(e)
    	print(e.animationName, e.previousAnimationName )
    end
     
    --action = "add" "remove" and "clear" 
    --event = ANIM_CHANGE, ANIM_START... (tntanimator events)
    --callback = function to trigger on event: same values of default tnt events are returned:
    --ie:
    self.anim:callbackDo("add", "ANIM_CHANGE", myCallbackFunction ) --add callback on "ANIM_CHANGE"
    self.anim:callbackDo("remove", "ANIM_CHANGE") --remove callback on "ANIM_CHANGE" 
    self.anim:callbackDo("clear") -- removes every defined callback for this tnt object
    lua
    lua
    tntanimator.lua
    28K

    Likes: GregBUG

    +1 -1 (+1 / -0 )Share on Facebook
  • piepie Member
    edited October 2016
    Hi, right now tntanimator does a bunch of work adding and removing one Enterframe event for each instance of CTNTAnimator (it uses this trick also to set animations on play/pause).

    I tried "fixing" this behaviour:
    I made some modification to use only one enterframe listener (which calls every enabled animation) and it seems to work so far.. it is a bit faster than original on my tests, but I haven't tested it deeply.
    Please tell me if you try it and have unexpected results/leaks and bugs :)
    no action is needed, just replace the library in your project.

    edit: updated file with small addition.
    CTNTAnimator:free(true) should remove everything that may be left behind to be garbage collected.
    lua
    lua
    tntanimator.lua
    30K

    Likes: muro, GregBUG

    +1 -1 (+2 / -0 )Share on Facebook
Sign In or Register to comment.