CodeBase - 2D flame

Return to the CodeBase listing

Category: 2D Effects

Version: 1.0

0
0

Information

Uploaded: 3rd Mar 2007 07:07

Modified: 1st Jan 1970 01:00

Author:  Anonymous Coder

Summary

A simple but heavy 2D flame effect

Full Description

<br /> 1. Divide your screen in boxes (2x2 pixels, or more. your choice).<br /> 2. Set each box with an warmth intensity variable(initialize them to 0).<br /> 3. Put high intensity to bottom boxes and calculate the upper ones.<br /> 4. To calculate intensity for a box get a mean value from the intensity of the boxes around it.<br /> 5. Do not forget the decay of the flame. The higher the box is the weaker the flame. Add a decay value and associate it with the height position of the current box on the screen.<br /> <br /> optionally:<br /> 6. pick some boxes randomly and change manually their intensity values(--&gt; UNIQUE FLAMES)<br />

Comments

No comments yet.