This project was inspired by the Fabien Sanglard's article.
It generates a fire simulation in your terminal.
It uses the termloop library for the display.
If go
and make
are installed on your computer, you can simply run
make
in the project directory to build the binary file.
Run
make cross
to build the binary for the following architectures:
- linux/amd64
- linux/386
- windows/amd64
- windows/386
- darwin/amd64
- darwin/386
You can run the program with:
./doom-fire
You can set some parameters using the following flags:
-w <int>
to set the canvas width (default 100)-h <int>
to set the canvas height (default 37)-t <float>
to set a threshold value modifying the fire decay speed (it also influences the wind force) (default 4.5)
You can the keyboard arrows to increase or decrease the fire propagation force (UP
and DOWN
) and the wind direction (LEFT
and RIGHT
).
To run the project tests, you can use make
and run
make test
The tests coverage is displayed in .coverage.html
.
Godoc allows to deploy a local server exposing a package documentation.
If godoc
is installed on your computer, run
godoc -http <port>
and navigate to http://localhost:<port>/pkg/github.com/juliendoutre/doom-fire/
to see the project's documentation.
You can install godoc with
go get golang.org/x/tools/cmd/godoc