Skip to content

A simple and rough simulation of forest fires on the windows console. It would probably make for a cool screen-saver.

License

Notifications You must be signed in to change notification settings

blat-blatnik/Forest-Fires

Repository files navigation

Forest-Fires

A simple and rough simulation of forest fires on the windows console. It's mainly a demonstration of rendering and animating ASCII-art on the console, as well as responding to keyboard and mouse events. It would also probably make for a cool screen-saver.

This simulation is based on the forest-fire model cellular automata - although I've tweaked the rules a bit to make it look more interesting.

This is a console-application, although it responds to mouse and keyboard input, and it's animated without any flickering as you can see in the examples.

Requirements

The program uses the Windows API to manipulate the console - so this will definitely only work on Windows. It should work on Windows 2000+ however I could only test it on Windows 7 and 10. If you want to compile it yourself, you'll need a C99 compiler. If you just want to try the program I provided an executable.

Controls

key action
Left-click place trees
Right-click start fires
C clear everything
ESC quit

Trees have a random chance of growing on empty cells, and have a chance to spread to neighboring cells each turn. Every tree could randomly catch fire any turn, and the fire will quickly spread to all neighboring trees.

Licence

This is provided under the public domain - you can do whatever you want with the program and the source code :)

About

A simple and rough simulation of forest fires on the windows console. It would probably make for a cool screen-saver.

Topics

Resources

License

Stars

Watchers

Forks

Languages