DYSTOPIANPIXEL
PHASELOCK / NEXTBASIC / DYSTOPIAN PIXEL

Stage 1 — Define the PHASELOCK game model

Build a top-down phase puzzle game, one hardware-tested development stage at a time.

MILO in the Blue and Amber Phase Grid
Concept artwork · PHASELOCK development tutorial through v0.13.

Before writing movement or collision code, the project established the rules that make PHASELOCK distinct. This prevents low-level implementation choices from accidentally determining the game design.

Canonical story premise

The Phase Grid is an experimental energy network that powers a vast research complex. It can switch machinery, barriers and sections of the facility between two energy states: Blue Phase and Amber Phase.

Something has gone badly wrong. The Grid is unstable, whole sections of the complex are changing phase unpredictably, and the failure is spreading towards the central Phase Core. The affected areas are now too dangerous for humans to enter.

From the safety of a remote control station, the human player operates MILO, a small wheeled maintenance robot equipped with a phase stabiliser. Every successful move MILO makes changes the state of the Grid, opening some routes while closing others. In two-player operations, the second remote maintenance unit is RIVET.

The mission is to guide the remote units through unstable sectors, reach their control points and perform Phase Locks before the system collapses. As the operation moves deeper into the complex, it becomes increasingly difficult to believe that the failure was simply an accident.

Core idea

The human player remotely controls MILO and moves the robot one tile at a time around a single-screen puzzle. The entire level has a global phase: Blue or Amber. Tiles and objects can be neutral, Blue-specific or Amber-specific, so a route that is safe in one phase may be blocked or dangerous in the other.

The main mode, LOCKSTEP, is designed around a simple rule: every successful voluntary player move changes the global phase. Pressing against an invalid destination must not count as a move and therefore must not change the phase. This distinction becomes important later when collision and phase logic are connected to the movement system.

The grid decides whether a move is legal. The animation only performs a move that has already been approved.

Planned play modes

ModeDesign
LOCKSTEPEvery successful voluntary player move changes the global Blue/Amber phase.
FLUXSuccessful movement changes the phase, with additional automatic timed phase changes.
LINKEDTwo-player cooperative mode using a shared phase.
DUELTwo-player competitive mode using the shared phase system.

Teach the game through the opening levels

PHASELOCK should teach its rules through level design rather than a large instruction dump. Each early level introduces one new mechanic, makes the player demonstrate it, then allows later levels to combine already-understood ideas.

Early levelIntroducesWhat the player learns
Power OnMovement and exitQ/A/O/P, one tile per move, reach the control point.
Split CurrentPhase switchingEvery successful voluntary move changes Blue ↔ Amber.
Dual PathsPhase-specific floorSome routes exist only in their matching phase.
Phase GatesPhase barriersA move can open one route while closing another.
Data LoopVisited tiles and scoringProgress is rewarded; unnecessary backtracking is costly.
Phase HoldTemporary tile holdThe occupied phase tile can be held until MILO leaves it.
LockdownTimer / instabilitySome sectors must be solved before stability expires.
First ContactFirst deterministic enemyLearn one enemy behaviour before combinations appear.

Scoring and failure rules already agreed

  • Moving onto a new, unvisited tile: +10 points.
  • Moving back onto a previously visited tile: -20 points.
  • A score of exactly zero is legal.
  • If the score becomes negative, the player loses a life and the level restarts with the level score reset to zero.
  • The current failure state name is CIRCUIT OVERLOAD.
  • A countdown timer is planned. If it reaches zero, the floor beneath the robot opens, the robot falls, a life is lost and the level restarts.
  • Enemies are intended to be deterministic puzzle pieces rather than targets for shooting. There is no normal player-fire mechanic.

Why this stage matters to later code

The most important architectural consequence is that screen pixels cannot be the only representation of the player. Scoring, visited tiles, phase-sensitive floors, switches, exits and enemies all need a stable logical tile coordinate. That need is why Stage 6 introduces playerTileX and playerTileY instead of continuing to infer the game state from sprite x/y values.