[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Looking for examples: animation with coroutines
- From: Michal Kolodziejczyk <miko@...>
- Date: Sun, 03 Feb 2013 04:31:20 +0100
On 01.02.2013 21:33, Peter Slížik wrote:
> recently, I spent quite a lot of time studying various internet
> resources on coroutines, continuations, and other related topics.
> There's one thing that many authors hinted upon repeatedly, but nobody
> cared enough to give any particulars. They unanimously wrote that Lua
> coroutines are often used to implement the behavior of character in
> computer games.
You need a coroutine scheduler, which will "magically" manage them for
you. Check out lua-sched or lumen:
> I have quite a hard time imagining a concrete implementation. Is
> somebody on this list familiar with this topic enough to give a few
> pointers, book references, or an example maybe?
Here is a simple working example for love2d: