This repository contains a small example game written in Odin. It displays a ball bouncing around the window using vendor:raylib.
Make sure you have the Odin compiler available (see deps.sh if you need to download the nightly build). Run:
odin run ball_bounceThis compiles and launches the program for the host platform.
On macOS you can build and run the project directly. Odin will automatically use Metal via the system frameworks when available.
odin run ball_bounce -target:macos_arm64Adjust the target architecture (macos_arm64 or macos_amd64) depending on your machine. The resulting application will render using Metal.
To build the same project for the web you can target js_wasm32 and produce a .wasm file along with the runtime JavaScript helper:
odin build ball_bounce -target:js_wasm32 -out:ball_bounce.wasm -no-entry
cp $(odin root)/core/sys/wasm/js/odin.js .Then create a minimal HTML file that loads odin.js and your ball_bounce.wasm and open it with a web browser that supports WebGL.