Skip to content
/ go-boids Public

Boid flock implemented in Go with WebAssembly

Notifications You must be signed in to change notification settings

Ozzyz/go-boids

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

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

Watchers

Forks

Releases

No releases published

Packages

No packages published