lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

At Mon, 1 Jun 2009 07:20:38 +0000, wrote:
> Hi. This is my first post to the mailing list and I have a few
> questions. I have used some Lua before in WoW modding and am now
> working on a game in c++. What I would like to know is if anyone has
> any good explanations of how to set up event triggers using Lua. For
> example setting timers and checking for events sent to a c++ app from
> a Lua object. Any help would be greatly appreciated. Thanks!


if you are on Windows, and you have the time, have a look at this:

I put this together when I was learning Lua.

May give you ideas on how to implement the following stuff:

- binding C libraries to Lua (OpenGL + libjpeg + Windows MIDI output device)
- event system (binding Win32 keyboard/mouse events to Lua handlers)
- coroutine scheduler

As of timers, you may be interested in understanding how calls like
Timer.wait(1000, Timer.MS) don't block the scheduler from running other
Lua threads while the blocking call returns.


- MinGW
- Lua 5.1
- libjpeg
- freetype2

(FT2 is not really needed, just uncomment the Font module in the
Makefile, it's currently not used by anything)

Happy hacking,