Tangent128 / luasdl2

A pure C binding of SDL 2.0 for Lua 5.1, Lua 5.2, and LuaJIT.
ISC License
383 stars 73 forks source link

Web export? #70

Closed egordorichev closed 6 years ago

egordorichev commented 6 years ago

Hey guys! The project is so awesome. I love both Lua and SDL2, but I can't see any C code anymore after working in Lua for a while. I really love LOVE2d engine, but looking for a replacement, because it doesn't properly support HTML5 export. The question is: this should compile into HTML5, shouldn't it?

Could I kindly ask you to add a script or something for that? That would be AWESOME! This project has a big future! I totally want to use it for all my next Lua projects <3

Thanks, Egor.

Tangent128 commented 6 years ago

In theory, it might be possible to hack something together with emscripten to compile a Lua interpreter and Lua-SDL together, but it would not be something I'd want to try maintaining. (though if the patches to make it work are simple I'd consider merging them)

https://github.com/ghoulsblade/love-webplayer might be worth a look for your usecase? There are also a few Lua-to-Javascript compiler projects out there if you don't mind writing adaptors for the HTML canvas & audio APIs.

egordorichev commented 6 years ago

Thanks for the answer. I've tried both love.js and love web player, but they are pretty out of date and well, pretty bad 😶 I will look into making a patch, thanks :+1: