Realtime Fire Demo
Once upon a Friday night with nothing to do, I began a quest to generate holy flames in realtime within the computer realm. In more traditional prose, I wrote a program to simulate realtime fire. After about an hour or two of programming and tweaking the color palette, I was finally satisfied with my efforts. The demo uses an averaging technique to generate the flame, and the color palette goes from white->yellow->red->black in a smooth transition. It runs in 320x200 resolution with 256 colors (Mode-13h). It was actually pretty simple to code this demo; however, tweaking it so that it looked nice was a bit more difficult. I am very satisfied with the current look of it. It is not very fast, but it runs at 35 frames/sec on my Pentium75 which is not too shabby considering that I did no optimization. Also, the fire is quite large which also eats up more processing time. The demo also has a wind factor. This means that you can press the arrow keys to blow the flames right or left!
Anyway, if you have any questions or comments on this demo please e-mail me at
email@example.com. Also, note that the demo only works on Pentium computers. I compiled it to use Pentium specific calling conventions, but if you want I will recompile it for a 486 computer. It will be very slow on a 486 though... Anyhow, you may download the demo below.
There is one note about the source code. I used some calls to my game library for keyboard functions. You should replace those with your own keyboard functions. Of course, if you remove all keyboard stuff from the code the demo will still run fine; you just won't have any wind effects.
Back to Main Page