Remix.run Logo
jasonjmcghee 7 hours ago

Definitely SDL2.

Author is currently building version 12 which will be using SDL3. But it's been in development for quite some time with no clear end date afaik.

newobj 3 hours ago | parent | next [-]

I stand corrected!

krapp 7 hours ago | parent | prev [-]

It is easy to get Lua (with LuaJIT) working with SDL3, though.

That obviously isn't a replacement for the framework but it is perfectly doable if someone just wants to write a game in Lua with minimal overhead.

Edit: I mention LuaJIT specifically because it lets you create metaclasses around C objects, which is much easier than messing with the Lua stack from C, and it's easy to make a 2d vector class from an SDL Point or a spritesheet or what have you. There are a few rough edges like dealing with pointers and gc but to me it's the best of both worlds (the speed of C, and some implicit type checking, and the flexibility of Lua.)

Obviously you could do it the hard way and the other way around with normal modern Lua but it's such a pain in the ass.