o
odin.langpkg.dev
packages / library / boids

boids

4d7c532library

Odin implementation of boids

No license · updated 2 years ago

Odin Boids

A 140 LoC implementation of the boids algorithm, using odin and raylib.

First non-trivial program in odin and raylib.

Example

2D

3D - TODO

Goal is to recreate this in 3D with raylib.

Details

Odin: dev-2024-09-nightly

Raylib

Tested on MacBookPro 13-Inch (x86) : macOS Monterey v12.7.5

Usage

Assuming you have odin installed it's as simple as:

git clone https://github.com/alfiehiscox/boids.git
odin run boids 

Configuration

There are a number of constants at the top of main.odin.

You can control things like:

  • Amount of Boids
  • Alignment
  • Cohesion
  • Separtion
  • Velocity
  • etc.