Phaser AE

Worker jobs

Pro packv3.0.0-42DLogic

Work yards for games about people who fetch, make and haul. Workers walk to a store for the inputs, work them at a site and carry the outputs on, and the yard makes sure nobody sets off for something another worker has already claimed.

This is a Pro pack. Upgrade to Phaser Pro to use it in your games.See Phaser Pro →

Released October 14, 2026 · updated October 19, 2026

Worker jobs: 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

A yard is plain data: a text map, stores with capacities, workers and repeatable jobs. A worker with nothing to do takes, among the jobs their role allows, the highest priority, then the nearest, that nothing blocks. They walk the map to the job's input store, carry the inputs to its site, work them for the job's time divided by their skill, and deliver the outputs to another store. Routes are planned over the map by nav.

The part that is hard to write by hand is reservation. Before a worker sets off, the inputs, room at the destination, a place at the site and any shared tool are all reserved, so two workers never walk to the same last log. If a worker is called off, stood down or dismissed, unworked inputs go back where they came from and finished outputs go on to where they were going. whyNot explains in plain words why a job is idle: paused, enough made, waiting for materials, the saw is in use, the site is busy, no room to deliver, a missing skill, too much to carry or no way there.

Goals turn the yard into a game. A job can stop once enough of its output is stored, and the yard can be won when a store holds an order, optionally before a deadline. A foreman sets priorities from wants that flow back down each production chain: if tools are wanted and the forge is short of iron, smelting becomes wanted too.

Features

  • Fetch, work, deliver — jobs with inputs, a site, a work time, outputs and a destination store.
  • Reservations — inputs, destination room, site places and tools claimed before anyone moves.
  • Roles and skills — workers limited to a role, faster with skill, unable to do jobs they lack the skill for.
  • Priorities and pauses — whole-number priorities per job, with 0 pausing it.
  • Shared tools — a count of each tool, shared by the jobs that need it while they are worked.
  • Goals and deadlines — per-job targets, and an order to fill in a store, against the clock or not.
  • A foreman — priorities planned from wants, flowing back down the chain, replanned on a timer.
  • Hiring and dismissal — workers come and go during play, a leaver's load put straight back.
  • Explanations and events — whyNot for idle jobs, and events for assignments, pickups, work, deliveries and results.
  • Two built-in yards — a lumber and smithy yard loading a wagon, and a quarry and brickworks across a river loading a barge.

Good for

  • Colony and settlement sims with hauling and production chains, in the style of The Settlers or Banished.
  • Production-chain strategy, where raw materials become goods through several workshops.
  • Order-against-the-clock games, where a crew must fill a wagon or a barge before a deadline.
  • Management games where the player sets roles and priorities and watches the crew work.
  • A labour layer inside a larger game, with your own map and art.

Make it yours

Everything is the yard's definition. The map's rows of characters decide where workers can walk, with blocked characters you choose, and letters can mark where stores and sites stand. Stores, workers (skills, speed, carrying capacity, role), jobs (inputs, outputs, time, tool, priority, goal, places at the site), tools, the win goal and the deadline are all data. Roles and priorities can change in play.

Two very different yards come built in, both plain data to copy and change: Oakshield, where workers do every job at normal pace and share one saw and one hammer to load a wagon with planks and tools; and Greystone, split by a river with one bridge, where only masons cut stone and porters carry more and walk faster.

A quick look

A built-in yard with five workers and a three-minute deadline, retuned and stepped:

const yard = game.jobs.create(game.jobs.presets.oakshield({ workers: 5, deadline: 180 }));
yard.role('w2', 'smith');
yard.priority('forge', 3);
yard.step(dt);
for (const w of yard.state.workers) drawWorker(w.x, w.y, w.task?.cargo);

Works with

  • nav — required; it plans the walking routes over the yard's map.
  • settlement — villagers who also eat, keep warm, rest, build houses and live through seasons, built on this pack.
  • walk-serve — for a waiter walking a restaurant floor rather than a crew hauling goods.
  • incremental — for an idle economy with no workers walking about.

Good to know

  • The map does not change: routes are planned once per pair of cells and kept, up to 8,192 pairs.
  • Workers pass through one another; there is no crowding.
  • Stock is whole numbers, a store's capacity counts everything in it, and tools are a shared count rather than objects that are carried.
  • Events keep the latest 512, so drain them each frame.

More Logic packs

Show all →