zf3 / raylib-games-wasm

Simple games using raylib in C++, playable in browsers through WebAssembly / Emscripten.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Web Games using raylib - Sample Code

Sample code that shows how games developed with the raylib engine can be compiled to WebAssembly and deployed on the Web, using Emscripten.

This is based on Ian's Raylib Practices. The games are written in C++ and very simple (are 100-400 lines of code each).

Instructions

Assuming you have Python 3, Emscripten and Cmake installed on MacOS or Linux. You can build everything simply with,

./build.sh

Then you can serve the games with,

cd build/web
python3 -m http.server

Direct your browser to http://localhost:8000 to view the games.

arkanoid:

For instructions to install Emscripten on M1 Mac and build raylib for WebAssembly, see INSTALL.md

About

Simple games using raylib in C++, playable in browsers through WebAssembly / Emscripten.

License:Apache License 2.0


Languages

Language:C++ 51.6%Language:C 47.5%Language:CMake 0.8%Language:Shell 0.1%