Make a torch or candle flicker like fire instead of pulsing like a lamp
A light that brightens and dims on a sine wave looks like a breathing bulb, and one that jumps to a random brightness every frame looks like a fault. Real flames wander quickly with now and then a deeper dip. Here is a flicker that keeps the average brightness, can be set per torch and never goes dark by accident.
Why this works
A flame is restless in several ways at once: a slow drift, a nervous quiver and now and then a sudden dip. Layering these gives fire its character, while any single steady wave reads as a lamp. Keeping the average fixed leaves the scene's brightness as designed.
When not to use it
Wrong for light that should feel steady and safe, like a lantern in a quiet safe room, a lighthouse or a screen. It is also bad for players sensitive to flashing. Offer a setting to calm it, or keep the light constant.
In the full entry
- What to build, step by step
- Starting values and the reason for each
- 4 common mistakes and the fix
- 35 lines of example code with 4 checks that pass
- How your AI shows you that it works
Say this to your AI
Use the Spielerando entry "Make a torch or candle flicker like fire instead of pulsing like a lamp" (read_entry torch-light-flicker-that-does-not-pulse) in my game. Build it step by step, and show me how you checked that it works.Or skip this and connect the MCP: your AI then finds all of this by itself.Connect the MCP