All Projects â†’ healeycodes â†’ boids

healeycodes / boids

Licence: MIT license
ðŸĶĒ The boids flocking simulation in Wasm using Ebiten!

Programming Languages

go
31211 projects - #10 most used programming language
HTML
75241 projects
shell
77523 projects

Projects that are alternatives of or similar to boids

nvjob-boids
#NVJOB Simple Boids (Flocks of Birds, Fish and Insects). Flocking Simulation. Free Unity Asset.
Stars: ✭ 55 (-1.79%)
Mutual labels:  boids, flocking
parametric surfaces
Parametric surfaces drawn using the Rust + WASM toolchain with WebGL, React, and TypeScript.
Stars: ✭ 43 (-23.21%)
Mutual labels:  wasm
Swarm
Swarm movement simulation
Stars: ✭ 21 (-62.5%)
Mutual labels:  boids
vgg runtime
VGG Runtime for loading and running designs as apps.
Stars: ✭ 19 (-66.07%)
Mutual labels:  wasm
go-wasm
Run WASM built from Go in Go
Stars: ✭ 58 (+3.57%)
Mutual labels:  go-wasm
emscripten-webxr
WebXR library for use with Emscripten.
Stars: ✭ 21 (-62.5%)
Mutual labels:  wasm
ebiten-imgui
Dear ImGui renderer for Ebitengine
Stars: ✭ 82 (+46.43%)
Mutual labels:  ebiten
bounce
The uncomplicated Yew State management library
Stars: ✭ 43 (-23.21%)
Mutual labels:  wasm
wsPlayer
wsPlayer is a web video player based on WebSocket-fmp4.
Stars: ✭ 88 (+57.14%)
Mutual labels:  wasm
glicol
(Audio) graph-oriented live coding language and music DSP library written in Rust
Stars: ✭ 853 (+1423.21%)
Mutual labels:  wasm
hash-wasm
Lightning fast hash functions using hand-tuned WebAssembly binaries
Stars: ✭ 382 (+582.14%)
Mutual labels:  wasm
Compose-boids-flocking
Jetpack Compose Boids | Flocking Insect 🐜. bird or Fish simulation using Jetpack Compose Desktop 🚀, using Canvas API ðŸŽĻ
Stars: ✭ 36 (-35.71%)
Mutual labels:  boids
watpl
Create WebAssembly modules using template strings
Stars: ✭ 14 (-75%)
Mutual labels:  wasm
go-space-crane
Simple moonlander like game with some new mechanics
Stars: ✭ 15 (-73.21%)
Mutual labels:  ebiten
wasp
🐝 Wasp : Wasm programming (language)
Stars: ✭ 93 (+66.07%)
Mutual labels:  wasm
rusty-boids
Rust implementation of Boids simulation
Stars: ✭ 25 (-55.36%)
Mutual labels:  boids
python-wasm
Build scripts and configuration for building CPython for Emscripten
Stars: ✭ 606 (+982.14%)
Mutual labels:  wasm
aWsm
WebAssembly ahead-of-time compiler and runtime. Focuses on generating fast code, simplicity, and portability.
Stars: ✭ 177 (+216.07%)
Mutual labels:  wasm
fastlike
Run Fastly Compute@Edge Wasm programs on your own computer, powered by wasmtime
Stars: ✭ 36 (-35.71%)
Mutual labels:  wasm
rotation master
Provide conversion between the major representations of 3D rotation and visualize the orientation of a rigid body
Stars: ✭ 157 (+180.36%)
Mutual labels:  wasm

Boids with Go and Ebiten

My blog post: Boids in WebAssembly Using Go


👉ðŸŧ Demo link to the WASM version.

I wrote this program, an implementation of Craig Reynolds' Boids, in order to learn more about deploying Go on the web, and to tackle a problem that escaped me when I was learning to code!


Animated GIF of a flocking simulation

Possible improvements

  • Field of vision support (boids shouldn't look behind 👀)
  • QuadTree optimization
  • Different maxSpeed/maxForce for each boid
  • Graphical interface for live-editing of values
  • Use a snapshot for each 'generation'
  • ..

Run ðŸĶĒ

go run main.go

Build 🕊

GOOS=js GOARCH=wasm go build -o dist/boids.wasm github.com/healeycodes/boids

This compiles the program into WebAssembly in the dist folder.

The simulation can be viewed in a web browser via index.html. To get this working locally, you may need to serve the files from a web server.


License: MIT.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].