Juice Library

Sounds good, I look forward to using it! You’ve got some great ideas aswell with the look of some of these animations

@Simeon, any update on the progress of Juice? Will it be included in the next version of. Codea?

The source code is available to use so you can do what’s in the video but I’m sure this will be polished up alot before submitted with codea

@Luatee, I have the version of Juice listed above but I don’t see things such as juice.screen that are mentioned above

Hopefully indeed!

Well hopefully we see the full version soon

Please, PLEASE, if you implement this, do it natively, even better, similar to SpriteKit.

@Zoyt I’m a little curious: why?

The idea of Juice is quick, rapid game feedback mechanisms based on tween().

Edit: I’ll upload the latest source code soon. While this is a library that I always use now, I’d like to get the API right before including it.

@Simeon, was wondering if you guys are still developing this?

@JakAttak - I assume not. That being said, it probably will be included in Codea soon enough.

Actually I still use it and improve it. I’ll put it on Github soon.

@Simeon, great. Also, I implemented a ‘wobble’ functionality for my own purposes, here it is if anyone can find a use for it:

function juice.mover:wobble(amount, time, speed)
    local m,mk = self:startMove()
    
    local originalSmoothValue = self.smooth
    self.smooth = true
    
    local amount = amount or 2
    
    local t = 0.15 * math.abs((m.angle - -amount))
    if speed ~= nil then
        t = speed / 2
    end
    
    local time = time or math.huge
    local speed = speed or 0.15 * amount

    m.wobbling = tween(t, m, {angle = -amount}, tween.easing.linear, 
    function()
        m.wobbling = tween(speed, m, {angle = amount}, {easing = tween.easing.linear, 
                                                        loop = tween.loop.pingpong})
    end)

    tween.delay(time, 
    function() 
        tween.stop(m.wobbling)
        
        tween(0.025, m, {angle = 0}, tween.easing.linear, 
        function()
            self.smooth = originalSmoothValue
            self:finishMove(mk)
        end)
    end)
end

I’m really sorry. I didn’t do sufficient research before judging Juice. It’s really a great library. That being said, there are a few things I’d love to see before included in Codea:

  1. Physics - Every one of my games I make uses physics. Every one. A seamless integration of physics and Juice would be wonderful. I do understand the shear difficulty of this with animations, though.
  2. Sub-objects - This is what really links me onto an engine. I’d love to have the ability to add objects in another. So you can make an empty juiceobject and treat it as a layer by putting objects in it.
  3. Apply shaders to objects - If an object has sub-objects, there should be an option wether to take a snapshot of child objects, put them in a mesh, and apply a shader to them.
  4. Polygon object - Basically, take the points given to the object, triangulate them, put them in a mesh, and apply it. Then, the user can also give it an image fill by using the library you wrote for me earlier for StackIt (BTW, that was very useful).
  5. Particle object - Pretty much @John’s library.
  6. Blend modes
  7. Line object
    That’s a lot to ask, but that’d be super amazing.
    I’m sure the community would love to commit to it.
    Thank you!
    Edit: I was thinking about it… What if only meshes were used to draw everything. So circles were only meshes too. That’s the case in my game. Just an idea.

Apologies for bumping an almost two-year-old thread, but I hadn’t come across this library before (even after about a year of using Codea quite extensively). It’s awesome, wish I’d found it sooner!

I wonder if we could get a pinned thread for this and similar libraries so that people don’t have to swim the stormy seas of the forum to see what’s available?

Thanks for the bump - this is awesome!

@Mark well, I guess the wiki could use a bit of editing/ reorganising. There’s a lot of great info there, but not presented in the most accessible order.

terrific and wonderful