Skip to content

Latest commit

 

History

8 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Boid flock implemented in Go with WebAssembly

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages