Table of contents ๐Ÿ“š

August 1, 2021 ยท View on GitHub

๐Ÿ”ฅ Fire Doom Simulator ๐Ÿ”ฅ

by FranciscoCharles

An interactive Doom fire simulator with a simple options menu developed in Python + Pygame. In this project it is possible to change the amount of fps, flame decay, wind direction, wind force and make it possible to change the colors of the flames in the HSL(hue, saturation, lightness) color space, in addition to allowing to turn on/off the flames.

Table of contents ๐Ÿ“š

Options menu ๐Ÿงฐโš™๏ธ

back to indice

The program has 8 adjustable options and allows you to use the Q key to turn the fire on/off. The options currently available are:

  • FPS:
    • option to control the SPF, ranging from 10 to 60.
  • Decay:
    • option to control the intensity with which the flames lose strength, varying from 1 to (1-amount of colors available in the color palette).
  • Wind direction:
    • option to control the wind direction, having 3 modes: right, left and both.
  • Wind force:
    • option to control the wind force, ranging from 0 to 10.
  • Color intensity:
    • control option to change the color palette, varies from True to False.

The options below can only be changed if color intensity is True.

  • H:
    • option to control the H component (hue) of the color, ranging from 0 to 360.
  • S:
    • option to control the S component (saturation) of the color, ranging from 0.0 to 1.0.
  • L:
    • option to control the L component (brightness) of the color, ranging from 0.0 to 1.0

How to use the options menu ๐Ÿ•น๏ธ

back to indice
  • use ESC to exit/close the program.
  • use Q to turn the flames on/off ๐Ÿ”ฅ.
  • use W or: arrow_up: to select the menu above.
  • use Z or: arrow_down: to select the menu below.
  • use S or: arrow_right: to increase / change the value of the selected menu.
  • use A or: arrow_left: to decrement / change the value of the selected menu.

Example of possible colors for the flames ๐ŸŽจ

back to indice

The image below is a demonstration of the colors that are possible for the flames.

How can I run? ๐Ÿง ๐Ÿ’ญ

back to indice

Download the project, install the dependencies, enter the src folder and execute:

python main.py

Honorable mention ๐Ÿฅ‡

back to indice

This project is based on a video from @filipedeschamps , where he brings a doom fire algorithm that he implemented, in the video he explains how the algorithm works in a didactic, practical and simple way. My thanks for sharing your knowledge, diverse and fun content.

Dependencies

back to indice
  • Pygame == 1.9.6.
  • Python == 3.7 or higher.

Version

back to indice
  • current version of the project: 1.0.1.

License

back to indice

For more information on the license for this project read the LICENSE file.


Copyright ยฉ 2021 FranciscoCharles