What it does
Every effect is soft puffs that swell as they rise, cool from pale to sooty grey, thin to nothing and waver on curl
noise. Only the glow and bubbles of poisonGas are additive.
Spawn one with game.particles.effect(name, opts). Loops such as smoke and chimney stay until kill(); one-shots
such as puff and dustCloud remove themselves, so you fire one per event. smokeTrail lays puffs per unit travelled
behind whatever it follows, and its smoke stays in the air when the missile dies. scale sizes everything, and angle
aims the exhaust and the skid and turns the drift of the dust and mist; the smoke still rises whatever the angle.
Features
- Columns — a heavy billowing
smoke, thinchimneywisps and whitesteamfrom a vent. - Ground effects — drifting
dust, amistbank about 220 units wide, and greenpoisonGaswith bubbles. - Event one-shots — a landing
puff, asmokeRing, askidDustkick and a bigdustCloud. - Trails and jets —
smokeTrailbehind a moving object, and an aimedexhaust. - Light on particles — the biggest loop holds about 90 live particles, a fast trail a few hundred.
- Data you can copy — a black smoke or a purple gas is a copied definition.
Good for
- Action games and shooters — wrecks smouldering after a fight, missiles trailing smoke.
- Platformers — landing puffs, dash dust and steam vents in a factory level.
- Racing and driving games — exhaust from the tailpipe and dust on every skid.
- Villages, swamps and traps — chimneys, mist banks and poison gas.
Make it yours
Size with scale: dustCloud at 0.4 is a small landing and mist at 3 fills a valley. A racing game puts exhaust on
each car, aimed backwards, and fires skidDust on every slide; a village gives every house a chimney and the bakery
a steam vent.
A quick look
A chimney, an exhaust that follows a car, a missile's smoke trail and a puff on every landing:
game.particles.effect('chimney', { x: house.x + 24, y: house.y - 40 });
const pipe = game.particles.effect('exhaust', { follow: car, offset: { x: -30, y: 6 }, angle: 180 });
game.particles.effect('smokeTrail', { follow: missile });
const land = (x: number, y: number) => game.particles.effect('puff', { x, y, scale: 0.6 });
Works with
particles-2dandparticle-textures— required;core-2dincludes both.feel— a camera shake behind a puff or a dust cloud.vfx-fireandvfx-explosion— the flames and the bangs themselves.vfx3d-smoke— smoke and dust in 3D.
Good to know
- Pale smoke fades into a white sky; copy an effect with darker colour stops for a bright level.
- Nothing collides or does harm: a damaging gas is game logic, and dust falls past its spawn point with no floor.
smokeTraildraws only while what it follows moves; usesmokefor a fixed source.






