---
title: "Campfire effect for survival games | Spatial Compiler"
description: "A survival campfire loops for hours a meter from the player. Scale the 2 s fire loop down, compile it at a larger tile size and add a flickering light."
canonical: https://appliedmanifold.com/effects/survival-fire-effect/
site: "Applied Manifold: The spatial compute cloud for 3D reality"
---

1.  [Home](https://appliedmanifold.com/)
2.  [Effects](https://appliedmanifold.com/effects/)
3.  [VFX for games](https://appliedmanifold.com/effects/vfx-for-games/)
4.  Survival campfire

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.

[Get Free API Key](https://console.appliedmanifold.com/sign-in?next=/api-keys) [See the examples →](https://appliedmanifold.com/docs/pyrofx/examples/)

-   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.

**FIREFINAL**

![First frame of the fire bake](/bakes/fire/poster.webp)

Fire, 4.1 x 7.0 m, compiled with Spatial Compiler. [Spec →](https://appliedmanifold.com/docs/pyrofx/examples/#ex-fire)

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.

campfire\_light.gd

```
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

1.  Ask your agent to compile the `fire` example at final quality, scaled to your campfire, into `res://fx/campfire/` and call `wire`.
2.  Instance the scene when the player places the campfire. Its origin sits on the ground under the fuel.
3.  Leave it on `autoplay` while there is fuel. The 2 s loop blends its last 12 frames into its first, so it runs all night without a jump.
4.  When the fuel runs out, scale the scene and the light's energy down over a few seconds, then free both.

04 // RELATED

## Related pages

-   [Godot fire Godot 4A looping fire, from a burning wreck to a fire whirl or a window fire, dropped into a Godot 4 scene by your agent.](https://appliedmanifold.com/effects/godot-fire/)
-   [Strategy fireFire loops for strategy buildings that grow as health drops, precomputed for a camera that looks down from 60 m.](https://appliedmanifold.com/effects/strategy-fire-effect/)
-   [Platformer fireSide-on fire loops for platformer hazards, with hurt boxes that match the visible flame and jets on a timer.](https://appliedmanifold.com/effects/platformer-fire-effect/)
-   [Survival smokeScale the plume loop into landmark smoke a survival player can read from 300 m, relit by your sun through the day.](https://appliedmanifold.com/effects/survival-smoke-effect/)
-   [HDR emissive fireHDR emissive fire stores flame brightness above white, so bloom makes the core glow while the smoke stays lit by the scene.](https://appliedmanifold.com/learn/hdr-emissive-fire/)
-   [Godot steady fire Godot 4A steady fire about 1.5 m across that loops every 2 seconds, dropped into a Godot 4 scene by your agent.](https://appliedmanifold.com/effects/godot-steady-fire/)
-   [ExamplesThe hosted pyrofx recipes are fire, fireball, fire\_whirl, window\_fire, smoke\_column, smoke\_plume, dust\_ring, impact, kickup\_soil and kickup\_masonry. The rendered starter library retains its recorded compile version; each example links its report.](https://appliedmanifold.com/docs/pyrofx/examples/)

[All pages in VFX for games →](https://appliedmanifold.com/effects/vfx-for-games/)

[← Strategy impacts](https://appliedmanifold.com/effects/strategy-impact-effect/)[Survival smoke →](https://appliedmanifold.com/effects/survival-smoke-effect/)

05 // FAQ

## Survival fire questions

[All questions →](https://appliedmanifold.com/faq/)

**README.SURVIVAL\_FIRE\_EFFECT**

### 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.

[Get Free API Key](https://console.appliedmanifold.com/sign-in?next=/api-keys) [Examples →](https://appliedmanifold.com/docs/pyrofx/examples/)

[All effects, guides and explainers →](https://appliedmanifold.com/effects/)
