lua-users home
lua-l archive

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


> I spent a couple days messing around with Lua + LuaSWIG + SDL, and
> produced a little video game.  The SDL wrapper may be of interest for
> anyone interested in prototyping games,

Just a note on the wrapper code generated by swig. It doesnt look
fantastically efficient for the constants. Each one has userdata
malloced (eg. a long) and there seems to be a mechanism for reading it
using tags. toLua does this a lot more efficiently by just setting
numbers (tolua_constant)! I bodged sdl.i into sdl.pkg and got tolua to
generate a binding and spookily they are almost exactly the same size
(232k).

Only managed 4890. Bah.