Phaser AE

2D core

Free packv3.0.0-42DCore

The start of every 2D game: one pack that brings the renderer, a world, text, sound, input, tweens, particles, collisions and a camera, configured to work together, so you write the game from the first line.

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

Released October 14, 2026 · updated October 20, 2026

2D core: 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.

The pack

core2d

function core2d(): Pack<Core2dApi>

The 2D core. No options: everything it composes is configured by its defaults, or by naming that pack in the manifest.

Types

Core2dApi

interface Core2dApi

What core-2d puts on the game.

  • text(text: string | number, x: number, y: number, style?: TextStyle): Text — Text on screen, centered on x, y by default: game.text('Score 0', 640, 40, { size: 32, stroke: { color: '#000', width: 2 } }).
  • readonly background: Background — What is behind everything: a color, a gradient, stars, a picture.
  • graphics(spec?: GraphicsSpec): Graphics — A picture to draw on while the game runs; with no size it covers the screen.

Graphics

type Graphics = TextureHandle

A picture you draw on while the game runs: trails, glows, meters, lines between things. Draw with the verbs or with the ordinary 2D context in draw(ctx => …); what you draw shows from the next frame. It keeps what was drawn until clear(). Coordinates are its own pixels, origin top-left (for a screen-sized one, screen pixels).

GraphicsSpec

interface GraphicsSpec

Where game.graphics goes and how big it is. With no size it covers the screen.

  • id?: string — Its id, for inspect. Default 'graphics'.
  • width?: number — Width in pixels. Default the screen's width.
  • height?: number — Height in pixels. Default the screen's height.
  • x?: number — Its center. Default the screen's center when it covers the screen, else 0.
  • y?: number — Its center. Default the screen's center when it covers the screen, else 0.
  • layer?: string — The layer. Default the world's, so it moves with the camera; 'hud' keeps it on screen.