[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: example Lua game
- From: "Nick Trout" <nick@...>
- Date: Tue, 6 Nov 2001 11:38:35 -0000
> 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.