ysdl
ysdl is a lightweight SDL binding for Lua 5.1.x. Depending on what you are looking for, it may or may not be of interest to you.
Advantages:
- simple: only a single C file to include in your application
- small: many of the most common SDL functions are bound, but not all of them, so the binding isn't larger than Lua itself
- includes functions from SDL, SDL_image, SDL_mixer, and SDL_ttf
- Lua function names closely match their SDL counterparts, with predictable changes
- MIT-style licensing
- fast: very little type and error checking is done
Disadvantages:
- unforgiving: very little type and error checking is done; if you pass the wrong argument to a SDL function, you will crash
- small: if you need something that isn't yet bound, you'll have to add a binding yourself
- not all SDL functions are bound
- documentation is minimal
In other words, if you're looking for a complete, hand-holding SDL binding, this isn't it. If you'd like a simple, lightweight SDL binding, and don't mind occasionally adding things on the C side, then ysdl might work for you.
Download:
- ysdl source: ysdl-20100710.zip
Example Applications:
- Sam Lantinga's aliens SDL demo ported to Lua and ysdl: aliens-lua_ysdl_port-0.3r1.zip
(GPLv2; find the original at http://www.libsdl.org/projects/aliens/) - Trygve Vea's Awesome Tower Defense 0.3 ported to Lua and
ysdl (with some additions and modifications): awesometd-lua_ysdl_port-0.3r4.zip
(GPLv2+; find the original at http://anticrap.net/awesometd/) - Thatcher Ulrich's meteor_shower LuaSDL demo ported to ysdl:
meteor_shower-ysdl_port-0.3.4r1.zip
(public domain; find the original in LuaSDL 0.3.4 at http://luaforge.net/projects/luasdl/)