lua-users home
lua-l archive

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


2012/10/22 Giuliano Suminsky <yksnimus@gmail.com>:

> I like your way much more than mine. The thing is the OO x lua static
> only functions..whats the best way to communicate the c++ agent ( a
> class object I presume) with the lua, without using other lua
> libraries..All C functions you described needs to have access to the
> agent.
> Id like to do it myself instead of having to pick a library straight
> from beginning (I want to learn lua, not some library), than later I
> can decide for myself witch library suits me better (or even writing
> my own)..

Kevin's approach is what is sometimes known as "callback" programming.
You may want to take a look at Love2D (also known as Löve or just Love)
which has a similar approach. The game engine provides only a general
hardware interface, you have to code everything else in Lua via callbacks.