Page 2 of 5

Re: cron.lua

Posted: Wed Apr 27, 2011 7:22 pm
by Jasoco
This might be useful for me. I had been wondering how to do timing correctly for a while. Especially for stuff like cinematics where stuff needs to be moving and disappearing and appearing at specific times.

Re: cron.lua

Posted: Wed Apr 27, 2011 10:55 pm
by kikito
Hi jasoco!

Definitively, it can help with the "measure time" part. For resolving the whole cinematics thing you will need different stuff.

It's actually funny that you mention it, I've been thinking about cinematics in lua since I read a question about them in stack overflow two weeks ago. Open another thread if you need help with them; I might be able to surprise you.

Re: cron.lua

Posted: Wed Apr 27, 2011 11:53 pm
by Jasoco
kikito wrote:Hi jasoco!

Definitively, it can help with the "measure time" part. For resolving the whole cinematics thing you will need different stuff.

It's actually funny that you mention it, I've been thinking about cinematics in lua since I read a question about them in stack overflow two weeks ago. Open another thread if you need help with them; I might be able to surprise you.
Thing is I was hoping to create something that works along the lines of Apple's "Core Animation" where you have objects and can tell them to animate from one place to another and have stuff happen when they're finished or all of them finish or whatever. If you use OS X or iOS a lot, you know what I mean. Everything is animated via Core Animation in OS X/iOS.

Of course I'd tried simple methods before, but nothing really solid. Plus I don't have any content.

Re: cron.lua

Posted: Thu Apr 28, 2011 1:39 am
by BlackBulletIV
Jasoco wrote:
kikito wrote:Hi jasoco!

Definitively, it can help with the "measure time" part. For resolving the whole cinematics thing you will need different stuff.

It's actually funny that you mention it, I've been thinking about cinematics in lua since I read a question about them in stack overflow two weeks ago. Open another thread if you need help with them; I might be able to surprise you.
Thing is I was hoping to create something that works along the lines of Apple's "Core Animation" where you have objects and can tell them to animate from one place to another and have stuff happen when they're finished or all of them finish or whatever. If you use OS X or iOS a lot, you know what I mean. Everything is animated via Core Animation in OS X/iOS.

Of course I'd tried simple methods before, but nothing really solid. Plus I don't have any content.
Ah ha, you're wanting a tweening library with the ability to tween properties. You're about to release a library to do that aren't you kikito?

Something that I think would help cinematics is a timeline library, like Greensock's TimelineLite/TimelineMax for Flash.

Re: cron.lua

Posted: Thu Apr 28, 2011 2:16 am
by Jasoco
BlackBulletIV wrote:
Jasoco wrote:Thing is I was hoping to create something that works along the lines of Apple's "Core Animation" where you have objects and can tell them to animate from one place to another and have stuff happen when they're finished or all of them finish or whatever. If you use OS X or iOS a lot, you know what I mean. Everything is animated via Core Animation in OS X/iOS.

Of course I'd tried simple methods before, but nothing really solid. Plus I don't have any content.
Ah ha, you're wanting a tweening library with the ability to tween properties. You're about to release a library to do that aren't you kikito?

Something that I think would help cinematics is a timeline library, like Greensock's TimelineLite/TimelineMax for Flash.
Basically something like this:

Re: cron.lua

Posted: Thu Apr 28, 2011 2:46 am
by BlackBulletIV
Wow that's pretty cool. Yeah a tweening library would be best for that job.

Re: cron.lua

Posted: Thu Apr 28, 2011 7:59 am
by kikito
I agree. A tweening library would be very good for performing things like those "zoom in/zoom out" operations (as well as fade-ins, gradual color changes, gradual volume up/down in music, etc).

As BlackBulletIV was saying, I was planning to implement a library for making tweening easy in Lua, as I've got a bank holiday next monday.

My lib is going to be inspired in jquery's animate function (scroll down to see some examples). Mine will probably have less functionality though.

The interface is already defined and it's going to be very minimalistic, like in memoize, cron and inspect: 2 main functions, with 2 additional ones for extra stuff that will not be used most of the time.

All in all, note that there are already some solutions out there for tweeing out there:

Re: cron.lua

Posted: Tue May 03, 2011 10:50 pm
by kikito
Quick update: I've made a couple small changes in cron.lua
  • It now liberates more memory than before (not all of it, but still)
  • It supports funcTables (tables with a _call metamethod) in addition to functions
I'm working on my tweening library, and it is nearly finished. I just need to make it a bit cooler and it'll be ready.

EDIT: the tweening library was released months ago, but I forgot to update this thread. Here it is: tween.lua

Re: cron.lua

Posted: Sun Oct 28, 2012 11:53 pm
by kikito
cron.lua update!

I've released a new version (1.2)

The big change in cron.lua 1.2 is a new method, cron.tagged. It allows tagging time entries, as well as updating them/cancelling them in groups:

Code: Select all

local cron = require 'cron'

cron.tagged('main-menu','menu').after(5, showMenu)

...

cron.tagged('main-menu').update(dt)
cron.tagged('menu').cancel()
Other changes:
  • Minor changes/optimizations (contributed by hahawoo
  • Tests have been improved

Re: [library] cron.lua - time management for LÖVE

Posted: Thu Nov 01, 2012 9:02 pm
by bartbes
If you use cron.update, does it update all tags too?