Content-Length: 282332 | pFad | http://github.com/healeycodes/boids/#start-of-content

E1 GitHub - healeycodes/boids: 🦒 The boids flocking simulation in Wasm using Ebiten!
Skip to content

healeycodes/boids

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 Cannot retrieve latest commit at this time.

History

54 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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.









ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/healeycodes/boids/#start-of-content

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy