This video shows how to make the fire that was used in the playstation version of Doom back in the days with python and the module pygame.
To install pygame
pip install pygame
If you have python 3.11, at the moment, you can install pygame like this
You run the class with the method run() of the istance app.
There is another class for the fire called DoomFire
Then create an istance of the DoomFire class into the __init__ of the class App and call the update method of this istance into the update method of the class App and call the method draw of doom_fire into the draw method of app.
These are the colors of the flames
This are the methods for the palette of colors
This method is called in the draw method of doom_fire
Launching the program you’ll see this
Now we create an array with the above shape to show the fire
This is for the fire size
Now we need to make the fire go up
The do_fire method is called by the update method
The frame rate is back to 62.5 fps
[hoop name=”all”]