Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Emscripten support #7510
This is currently WIP, but I would appreciate feedback on it.
It currently works on SDL1 on 32bpp blitter (8bpp blitter doesn't work, I suspect broken SDL palette support in emscripten shim). It doesn't look correct though, because html provides BGRA buffer and all blitters assume RGBA. Modifying
It works too on SDL2 branch, with significantly better performance, both on 8bpp (with correct colors) and 32bpp (same BGRA issue, but it is faster than 8bpp). Maybe this PR should wait on SDL2, as it works much better on it.
Network is handled by emscripten as WebSockets, both UDP and TCP. It requires proxy, like this one: https://gist.github.com/Milek7/b921ec9f8d875fe2d5a8b06bfd533834
It's hidden in the commit-checker log but
type macro from Squirrel code clashes with Emscripten math.h. This is likely Emscripten fault because it shouldn't define own identifiers without __ prefix, but, eh.