GAMES // SURVIVAL FIRE
Fire effects for a survival game
In a survival game the player spends the night at the campfire, so you want a fire that loops for hours, lights the camp and holds up from a meter away. Use a 2 s fire loop scaled down to campfire size, compile it at a larger tile size, and pair it with a flickering light.
- Godot 4 Available
- Unity Manual setup
- Unreal Engine Manual setup
- Roblox Studio Manual setup
- three.js Available
A draft compile is from $0.05, and new accounts start with $5 of usage.
01 // SCALE
Scale the fire down to a campfire
The fire example is about 1.5 m across at the base, and its flames reach up to 7.0 m, the size of a burning wreck or a bonfire. A cooking fire is closer to 0.5 m. Scale the scene to about a third, or ask your agent to compile a smaller fire; the docs show how to scale the box, cell size, emitter size and position, speeds and turbulence size together.
The player sits a meter or two from a campfire. At 2 m, Godot's default 75 degree camera shows about 3 m top to bottom, so a third-scale fire fills much of the screen and a 256 px tile looks soft. Ask for export.tile_px = 512 for the campfire, the one fire the player sees this close.
02 // NIGHT
Light the camp at night
The shader adds the flame as HDR light, so with WorldEnvironment glow the fire blooms against a dark sky. The smoke is lit from your sun and ambient light, so at night it darkens with the scene while the flame stays bright.
An OmniLight3D just above the flames lights the ground, the tent and the player. Vary its energy a little every frame, and turn on its shadow so trees and the player cast flickering shadows.
extends OmniLight3D
@export var base_energy := 2.0
func _process(_delta: float) -> void:
light_energy = base_energy * randf_range(0.85, 1.15)
03 // HOW TO
Place a campfire and let it burn out in Godot 4
- Ask your agent to compile the
fireexample at final quality, scaled to your campfire, intores://fx/campfire/and callwire. - Instance the scene when the player places the campfire. Its origin sits on the ground under the fuel.
- Leave it on
autoplaywhile there is fuel. The 2 s loop blends its last 12 frames into its first, so it runs all night without a jump. - When the fuel runs out, scale the scene and the light's energy down over a few seconds, then free both.
How do I make a campfire effect for a survival game in Godot?
Ask your agent to compile the fire example scaled to campfire size, place the Godot scene and add a flickering OmniLight3D above it.
How do I make campfire flames rise and flicker instead of moving in a straight line?
Use a fire simulated with turbulence and swirl across 64 frames and pair it with an OmniLight3D whose energy flickers each frame.
How do I randomize the size and timing of many survival campfires?
Scale each campfire slightly differently and start each at a random point in the 2 s loop, while a single campfire needs neither.
How many frames should a close up survival campfire use?
64 frames for a 2 s loop at 32 frames per second keeps close up flicker smooth without stepped motion.
Compile your first effect
You pay per compile and see the price before it runs. New accounts start with $5 of usage.