Currently it's just
- an environment (based on 3d camera first person example)
- capture mouse
- fullscreen
- free camera toggle (f4)
Basic FPS game attempt for the web with raylib
git clone --recurse-submodules --shallow-submodules https://github.com/plu5/cwebfps.git- Install emscripten if you don't have it already.
emccandemarneed to be in PATH. - Build raylib:
cd raylib/src emcc -c rcore.c -Os -Wall -DPLATFORM_WEB -DGRAPHICS_API_OPENGL_ES2 emcc -c rshapes.c -Os -Wall -DPLATFORM_WEB -DGRAPHICS_API_OPENGL_ES2 emcc -c rtextures.c -Os -Wall -DPLATFORM_WEB -DGRAPHICS_API_OPENGL_ES2 emcc -c rtext.c -Os -Wall -DPLATFORM_WEB -DGRAPHICS_API_OPENGL_ES2 emcc -c rmodels.c -Os -Wall -DPLATFORM_WEB -DGRAPHICS_API_OPENGL_ES2 emcc -c raudio.c -Os -Wall -DPLATFORM_WEB emar rcs libraylib.a rcore.o rshapes.o rtextures.o rtext.o rmodels.o raudio.o - Build the game:
cd ../.. make -C cwebfps - Host the game:
cd cwebfps python -m http.server - It will be on http://127.0.0.1:8000/ on the same machine, or localip:8000 on other machines in the local network, where localip is the local ip of the device you're hosting on (
ip addresson Arch, and on other operating systemsifconfigoripconfig).
After building, upload the files index.html, index.js, index.wasm, index.data