o
odinpkg.dev
packages / app / bestagon

bestagon

7bf09e0app

Keyboard only game in Odin using Raylib.

MIT · updated 1 week ago

Bestagon

Bestagon is a simple keyboard only game in Odin using the built-in Raylib vendor package.

The game is by design:

  • asset free (all raylib rendered)
  • heap allocation free (stack only)

Core mechanics

Bestagon the hexagon fights evil squares with three magic stars. He can only fight while star power lasts. Squares of a given color can only be damaged by a matching star color. Enemies get tougher over time, and defeating them earns currency for upgrades.

screenshot

upgrades

gameover

Run

Make sure Odin is installed, then run:

odin run src

nixOS

On nixOS the odin package does not bundle a precompiled libraylib.a, so instead we need raylib linked from the system. For this use the provided shell.nix:

nix-shell

and run as normal. To exit the shell use:

exit

WASM build

Other than odin, also emscripten (emcc) is needed on path. On macOS:

brew install emscripten

You can build the WASM version with:

bash build_web.sh

And serve it with an example simple python server (python3 required on path) with:

bash run_web.sh