Asteroids
This is a WebAssembly port of an Asteroids game written in C
How to build
And compile it to WebAssembly:
emcc \
-o app.html asteroids/*.c \
-Wall -g -lm \
-s USE_SDL=2
Run the demo
-
Go to the app folder which contains the app.html, app.wasm, app.js files
-
Start the server .
If you do not have your own HTTP server, use the simple one as followFirst, install npm >= 5.2
Then, run
npx http-server
-
Browse the app .
Visit your own http://localhost:{$port}/app.html .
Or if you use npx server, visit http://127.0.0.1:8080/app.html