Quick Links: Download Gideros Studio | Gideros Documentation | Gideros community chat | DONATE
LuaJIT and TNTParticlesEngine — Gideros Forum

LuaJIT and TNTParticlesEngine

ArtiomArtiom Member
edited March 2014 in Bugs and issues
Hi!
I'm trying to use awesome TNTParticlesEngine with awesome LuaJIT and got this:
"03-21 17:51:30.639: D/Gideros(21836): source/tntparticlesengine.lua:1100: attempt to index global 'arg' (a nil value)"
At line 1100 we have:
1099 function CParticles:setSpeed(speed, ...)
1100 local speedMax = arg[1]

It seems something wrong with LuaJIT because it's working well on regular Lua in Gideros Player.

Thanks.

Comments

  • ar2rsawseenar2rsawseen Maintainer
    edited March 2014
    @Artiom yep, luajit runs under other lua standard, which does not automatically create arg variable.
    in each function that has ... as arguments passed, you need to create it your self like this:
    local arg = {...}
    Hint, hint @GregBUG :)
  • @Artiom, @ar2rsawseen
    yes :) !!!! update coming soon :)

    :D :D :D :D :D :D
    TNT ENGiNE for Gideors Studio - Particle Engine, Virtual Pad, Animator Studio, Collision Engine - DOWNLOAD NOW !!! IT'S FREE!!! -
    www.tntengine.com
  • ArtiomArtiom Member
    edited March 2014
    Thanks, @GregBUG but I already fixed this :)
    I have a bug when I create hidden emitter or hide it later:
    source/tntparticlesengine.lua:308: The supplied Sprite must be a child of the caller.
    stack traceback:
    source/tntparticlesengine.lua:308: in function source/tntparticlesengine.lua:278
  • @Artiom

    send me a small project that reproduce the issue,
    so i can fix.

    thanks.

    :)
    TNT ENGiNE for Gideors Studio - Particle Engine, Virtual Pad, Animator Studio, Collision Engine - DOWNLOAD NOW !!! IT'S FREE!!! -
    www.tntengine.com
  • Hi @GregBUG

    Maybe this can help you fix your nice TNTParticle
    I tried LuaJiT with demos of TNTParticle and these demos isn't working as before:

    demo 4
    demo 5
    getting_start_1

    Finally, I don't remember as was working TNTParticle before, I only remember some demos. I hope this can help you in something.

    P.S.
    @Artiom yep, luajit runs under other lua standard, which does not automatically create arg variable.
    in each function that has ... as arguments passed, you need to create it your self like this:
    local arg = {...}
    Hint, hint @GregBUG :)
    @ar2rsawseen, you are right
  • @GregBUG,

    local fireParticle = CParticles.new(particleTexture, 20, 0.3, 0.6, "add")
    fireParticle:setSpeed(220, 320)
    fireParticle:setSize(0.1, 0.1)
    fireParticle:setColor(255,110,80)
    fireParticle:setAlpha(0)
    fireParticle:setRotation(0, -160, 360, 160)
    fireParticle:setAlphaMorphIn(240, .15)
    fireParticle:setAlphaMorphOut(50, .9)
    fireParticle:setSizeMorphOut(0.8, 0.9)
    fireParticle:setSpeedMorphOut(450, 1, 450, 0.5)
    fireParticle:setColorMorphOut(110,110,110,1.2,20,20,20,1.5)

    local fireEmitter = CEmitter.new(37.5, 0, 90, fireSprite)
    fireEmitter:assignParticles(fireParticle)
    fireEmitter:start(true) --start hidden, error here
  • ok.

    i'll look at this issue.
    TNT ENGiNE for Gideors Studio - Particle Engine, Virtual Pad, Animator Studio, Collision Engine - DOWNLOAD NOW !!! IT'S FREE!!! -
    www.tntengine.com
  • GregBUGGregBUG Guru
    edited March 2014
    @Artiom
    ok. bug fixed.
    a new update very soon (tomorrow)
    fixed hide/unhide bug and luaJIT compatibility.
    thanks. :D

    Likes: HubertRonald

    TNT ENGiNE for Gideors Studio - Particle Engine, Virtual Pad, Animator Studio, Collision Engine - DOWNLOAD NOW !!! IT'S FREE!!! -
    www.tntengine.com
    +1 -1 (+1 / -0 )Share on Facebook
  • Nice @GregBUG I already want it to be tomorrow ^:)^
  • GregBUGGregBUG Guru
    edited March 2014
    New version of my particle engine for Gideros Mobile SDK!


    In this version:

    Hide/Unhide bug fixed.

    Added LuaJit Compatibility

    some code optimizations.

    Ciao!!!!

    (TNT Particles Engine 2... ;) do you want a tech sneak peak ? hihihi!)

    soon... soon.... ;)

    Likes: OZApps

    TNT ENGiNE for Gideors Studio - Particle Engine, Virtual Pad, Animator Studio, Collision Engine - DOWNLOAD NOW !!! IT'S FREE!!! -
    www.tntengine.com
    +1 -1 (+1 / -0 )Share on Facebook
  • ar2rsawseenar2rsawseen Maintainer
    Very interested what did you came up with :)
  • @GregBUG
    Seems Xmas, our voices were heard <:-P
  • @HubertRonald
    :D

    @ar2rsawseen
    i'm starting to code visual designer now...

    but i'm not sure what RAD to use (lazarus free) or Xojo but not free (but app is 100% cocoa)...

    TNT ENGiNE for Gideors Studio - Particle Engine, Virtual Pad, Animator Studio, Collision Engine - DOWNLOAD NOW !!! IT'S FREE!!! -
    www.tntengine.com
  • @Greg, Xojo would be a better option, as you could also make it a web service hosted on your servers (if you want and have the Enterprise License)
    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
Sign In or Register to comment.