This project serves as a practice of using only pure Zen-C to compile and link against raylib to generate a wasm build of a simple pong game.
Check out the Zen-C programming language here! Kudos to Zuhaitz-dev for creating what I would call, cppfront of the C language.
Play it here https://lamweilun.github.io/zc_pong
Controls for the game:
- W/S to control the left paddle
- I/K to control the right paddle
NOTE: Zen-C is still heavily in development. So far, built and tested on Linux using this specific commit of Zen-C. But it should work with any newer versions of Zen-C.
- Setup emscripten
- Setup Zen-C compiler
- Clone this repo
- Modify any code in
main.zcas you see fit - Build with the following commands...
- Use this if you want to use emscripten's html
zc build main.zc --cc emcc -o main.html
- Use this if you want to just update the JS and WASM file, maintaining the provided HTML file
zc build main.zc --cc emcc -o main.js
- Use this if you want to use emscripten's html