Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to simulate a fire in a flat and non flat* surface (fire spread modelling).

I've seen that cellular automata is one of the algorithms that can be used. Are there other algorithms that would be interesting to test?

*adding some barriers like walls

share|improve this question

closed as not constructive by Byte56, michael.bartnett, Jari Komppa, doppelgreener, Josh Petrie Oct 1 '12 at 15:34

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.If this question can be reworded to fit the rules in the help center, please edit the question.

This isn't the place for discussions. See the FAQ about what kinds of questions to ask here. – Byte56 Sep 24 '12 at 22:26
I would recommend rephrasing to something along the lines of "What methods for simulating fire in 2d exist other than cellular automata?" to make Byte happy. – ClassicThunder Sep 24 '12 at 22:34
I'm not sure that rephrasing would work. Since then the correct answer would need to include all the methods for simulating fire in 2D. It's still a discussion/polling for ideas. Just like asking what 2D engines exist for C++. @A.R. You should totally ask in chat though, discussions are welcome there. – Byte56 Sep 24 '12 at 23:01
up vote 2 down vote accepted

Easy. Particle system. Flammable objects have a constant boolean for flammability set to True, then another boolean which dictates if the object is on fire. If true spawn a particle system on them to give it an effect which makes it look like its on fire. If a flaming object collides with another, then set that object on fire. You may want to spread the flame only after the objects have made contact for a certain duration, or all connected flammable objects would light instantly.

I've done something similar with the Love2D Engine

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.