Phaser AE

Parallax starfield

Free packv3.0.0-42D and 3DBackdrop

A star field in three layers that parallax with the camera, endless in every direction and identical every run. It is transparent between the stars, so it goes over a sky gradient or a nebula, and it is already in every core bundle.

This is a Free pack. Every phaser.io account can use it in their games.

Released October 14, 2026 · updated October 20, 2026

Parallax starfield: a screenshot of its demo
A note about these graphics

Expansion packs don't come with graphics. This screenshot is one way of drawing what the pack does, made for its demo: none of the sprites, tiles or backgrounds in it are in the pack.

That's by design. A pack is a game's logic, mechanics and effects, and it works with whatever art you give it. Some packs draw effects, backdrops or 3D scenes of their own, but none carries a game's sprites.

So the look is yours. Make the art on phaser.io, bring your own, or let your agent draw it in code: the same pack can look like anything.

What it does

Each layer is a grid of cells, and a cell may hold one star. A hash of the cell decides whether it does, where the star sits, how bright it is and when it twinkles, so nothing is stored and the field goes on for ever. The layers move at 0.15, 0.40 and 0.65 of the camera's movement, so far stars barely shift while near ones slide past.

Most stars hold steady with a faint shimmer and a few glint, each on its own phase, so the sky never pulses in unison. drift adds a constant sideways scroll, faster for nearer layers, for a screen whose camera never moves. Stars keep their size and density on a high-density display.

Features

  • Three depth layers — each with its own cell size, star size and parallax rate.
  • Endless and repeatable — placed by a hash, so it never runs out and looks the same every run.
  • Natural twinkle — a steady shimmer with occasional glints; 0 is still, higher is faster and stronger.
  • Density — from sparse (0.3) to busy (2), or empty at 0.
  • Drift — a constant sideways scroll, either way, for a still camera.
  • One tint — the star colour, whose alpha fades the whole field.

Good for

  • Space shooters — horizontal and vertical scrollers where depth comes from parallax.
  • Fixed-screen shooters and menus — drift keeps the stars moving when the camera does not.
  • Night skies — over a sky gradient above a platformer.
  • Cockpits and starship bridges — a field behind the window.

Make it yours

A busy, fast-twinkling white field drifting left behind a menu is one setting; a sparse, steady, warm field over a navy sky for a platformer's night is another. For warm and cool stars together, stack two fields with different tints and densities.

A quick look

const stars = game.backdrop.add('stars', { density: 1, twinkle: 1, drift: 0.2 }, { tint: '#cfe6ff' });
stars.set('twinkle', 3);              // live
stars.setColor('tint', '#ffe9c4');    // live

Works with

Good to know

  • Parallax follows the camera only: with a still camera and drift at 0 the field is a still image.
  • All stars share one colour; stack two fields for a mix.
  • Each layer checks a cell's neighbours for every pixel: cheap, but not free on a phone at high resolution.

More Backdrop packs

Show all →