And, you'll need to set your monitor to 8-bit (256) color mode, otherwise it will look
funny.
To view the demos, double click one of the applications. They have no interface so don't bother looking for one. When you want to quit, just click. A green number will appear in the upper left hand corner after you click, which is the average Frames Per Second that the flame was being rendered at. For best results of the FPS count, leave the application running for at least 20 seconds.
The three applications featured in this folder each display thier own size of the flame. They are 240X480, 240X320, and 100X300 versions. I've comiled each version using different averaging techniques to get a more realistic effect for that particular size,
so the speed increase in the smaller version is not as great as it would normaly be.
For reference.. our PowerMac7100/66Mhz (no L2 cache) does these speeds:
100X300 at 90FPS
240X320 at 85FPS
240X480 at 55FPS
How does Camp Fire work? I simply must know!
This is a very simple program. "How simple is it?" you ask. It is so simple that it produces an animated flame by simply drawing some simple random colors at the bottom of the image and then simply averaging the colors of every pixle in the image in this simply simple fashion:
*T*
*P*
PPP
Where pixles marked "P" are averaged together and the result is stored in the current pixle (or Target pixle) which is marked "T".
For a final touch, a number, usualy between 1 and 5, is subtracted from pixel "T"'s color to keep the flame down. Also, the pixels of the image are shifted Up three or more pixles to move the flame up faster, and make it more believable.
Now wasn't that simple?
I'm always looking for ways to speed up this algorithm. There are several obvious methods, and some not-so-obvious ones. But, for all my effort, I couldn't get the frame rate above 18 FPS for a 320x240x8-bit flame. Not only that, but the darn thing took up to 5 Megs of RAM to run.
Then I realized what a fool I've been, and re-coded the program to shoot the frame rate up to 28+ frames per second and dropped the RAM requirements down to only 400K Needless to say I was completely disgusted with my self for not seeing the solution sooner.
I was disgusted with my self, even more so, when I realized that I could shoot the frame rate up to 60+ frames per second with very little loss in quality from the previous version.
The program now pushes a very nice 640x480x8-bit flame at 22 FPS on my 7100-66 PowerMac.
Other Stuff.
Several months ago, I wrote a small demo called Flame Fest 1.3. It was my very first attempt at flame algorithms. Although it's kind of slow, and it crashes the system once in a while, it might be worth your time to download if you're into flame algorithm programs.
Flame Fest 1.3 features a camp fire, a volcanoe, and several other intersting effects. I plan on releasing a second version of Flame Fest sometime in the future. It will basicly be an enhanced version of Flame Fest 1.3 with a few extras and a much better interface... not to mention faster graphics, and fewer crashes. ; )
Camp Fire 1.1 is Copyrighted 1995 by Brian Stone
You may copy, modify, and use the code to Camp Fire 1.1 as you desire as long as you give me credit in any program using the Camp Fire 1.1 code or any part of the code.