GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - healeycodes/boids: 🦢 The boids flocking simulation in Wasm using Ebiten!

BranchesTags
Open more actions menu

Latest commit

 

History

54 Commits
54 Commits

Folders and files

NameName
Last commit message
Last commit date
dist
dist
 
 
fish
fish
 
 
vector
vector
 
 
.gitattributes
.gitattributes
 
 
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
build.sh
build.sh
 
 
go.mod
go.mod
 
 
go.sum
go.sum
 
 
index.html
index.html
 
 
main.go
main.go
 
 

Repository files navigation

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.

About

🦢 The boids flocking simulation in Wasm using Ebiten!

healeycodes.com/boids-flocking-simulation/

Topics

boidsebitenflockinggogo-gamego-wasmwasm

Resources

Readme
MIT license
Activity

Stars

64 stars

Watchers

3 watching

Forks

5 forks
Report repository

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.