o

odin

v718b3d8library

No description provided.

0 stars0 forksMITupdated 1 year ago
Open repo

Odin Ball Bounce Example

This repository contains a small example game written in Odin. It displays a ball bouncing around the window using vendor:raylib.

Building on Linux

Make sure you have the Odin compiler available (see deps.sh if you need to download the nightly build). Run:

odin run ball_bounce

This compiles and launches the program for the host platform.

Building and running on macOS (Metal)

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_arm64

Adjust the target architecture (macos_arm64 or macos_amd64) depending on your machine. The resulting application will render using Metal.

Building for Web (WASM + WebGL)

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.

Package Info
Version
v718b3d8
License
MIT
Author
@mtklein
Type
library
Forks
0
Created
1 year ago
Updated
1 year ago
Health
maintained
has releases
has readme
has license
Activity
last 56 weeks