Skip to content

Latest commit

 

History

History
21 lines (16 loc) · 1.01 KB

README.md

File metadata and controls

21 lines (16 loc) · 1.01 KB

go-boids

Boid flock implemented in Go with WebAssembly.

boids

Installation

  1. Clone this project
  2. Make sure you have Go installed. If not, install Go
  3. Install goexec by running go get -v -u github.com/shurcooL/goexec
  4. Copy the WASM-javascript glue code to the root of your cloned repository cp "$(go env GOROOT)/misc/wasm/wasm_exec.js" .

You're all set for running the program!

Running

  1. Spin up a web server by running goexec 'http.ListenAndServe(`:8080`, http.FileServer(http.Dir(`.`)))'
  2. Build the program by running build.sh
  3. Navigate to localhost:8080 to see the boids! 🐦

Notes

This is a quite bare-bones example of a boid flock. There is still a lot to do, and much fine tuning of parameters can be performed. If you want to experiment more with this yourself, this is a good start. Factors such as attractors/gravity, acceleration and interactivity is not present in this demo.