megamarc / Tilengine

Free 2D graphics engine with raster effects for retro/classic style game development
https://www.tilengine.org
Mozilla Public License 2.0
847 stars 95 forks source link

Any plans to port to WASM? #123

Closed gulagkulak closed 3 weeks ago

gulagkulak commented 3 weeks ago

Seems like the perfect library for making games that run inside a modern web browser.

megamarc commented 3 weeks ago

I have a private development branch that compiles to wasm with emscripten. I have to work on some small details, but it's almost complete.

At this moment it just compiles original C samples to wasm, to run inside the browser. Should anybody write a decent javascript wrapper, it could be used to write games directly in javascript.

Here some examples of it already running:

https://www.tilengine.org/emcc/platformer.html https://www.tilengine.org/emcc/mode7.html https://www.tilengine.org/emcc/shooter.html https://www.tilengine.org/emcc/shadow.html

Use cursor keys to move, and z to shoot