What it does
Every fire is built the same way: additive soft puffs that rise, swell, shrink and cool from white through orange to ember red, pushed sideways by curl noise so the flames lick, with embers spat out above. Larger fires add smoke, glowing beds, higher tongues or a halo.
Spawn one with game.particles.effect(name, opts) at a point or on an object. Standing fires loop until kill(); the
one-shot ignite removes itself. scale multiplies every distance, speed and size, so an inferno at half scale is a
burning hut and a candle at three times is a lantern. angle aims the jets but does not turn gravity, so an aimed
flamethrower still curls upward.
Features
- Standing fires —
candle,torch,fire, acampfirewith its smoke column, and aninferno180 units wide. - Shapes of fire —
burningGround, a low strip over a glowing bed, andfireRing, 88 units across. - Coloured fires — a steady blue gas
blueFlameand a greenwitchFirewith ghostly wisps. - Catching light —
ignite, a one-shot flash and billow with embers and smoke. - Moving fire — a
fireballthat trails flame behind what it follows, and aflamethrowerjet that curls into smoke. - Data you can copy — retune a definition and register it under a name of your own.
Good for
- Dungeon crawlers and RPGs — torches on walls, candles on altars, fireball spells.
- Survival and camp scenes — a campfire with smoke rising behind it.
- Action games and platformers — burning traps, rings of fire, a dragon's breath.
- Shooters and tank games — flamethrowers and burning wrecks.
Make it yours
Every fire takes scale, follow and offset, and the jets take angle. A dungeon gives every sconce a torch, lets
the player carry one at an offset, and plays ignite as each brazier is lit; a tank game puts the flamethrower on the
turret, aims it with the stick and kills it when the trigger is released. For a bigger fire, raise scale rather than
stacking copies.
A quick look
A campfire, a torch carried by the player, and a flamethrower aimed and released:
const camp = game.particles.effect('campfire', { x: 320, y: 300, layer: 'fx' });
const torch = game.particles.effect('torch', { follow: player, offset: { x: 6, y: -14 } });
const jet = game.particles.effect('flamethrower', { follow: tank, offset: { x: 20, y: -4 }, angle: aimDegrees });
jet.kill(); // released the trigger
Works with
particles-2dandparticle-textures— required;core-2dincludes both.lighting-2d— for the light a fire throws.audio— for the crackle.vfx-explosionandvfx-smoke— a fireball's impact, and a separate smoke column.vfx3d-fire— the same twelve names in 3D.
Good to know
- Fire lights nothing and burns nothing: the light is
lighting-2d, and the damage is game logic. - Additive flames wash out on white backgrounds; tune
alphaon a copy for a bright level. fireballdraws its tail only while what it follows moves.- The biggest,
inferno, holds about 550 live particles.






