A study project for building a 2D engine

Delphi Blocks

Explore the rules, mathematics, and rendering behind a Breakout inspired by Arkanoid. Follow a small Delphi engine from player input through simulation to a complete Canvas frame.

Explore the API reference Read the study guide

Study the implementation

Architecture and time

State ownership, commands, detached snapshots, a 120 Hz fixed step, and bounded catch-up after delayed callbacks.

Read the architecture chapter

Trajectory and collision

Proportional paddle angles, circle sweeps against block faces and corners, capsule geometry, and remaining-time resolution.

Read the physics chapter

Rendering and measurement

Persistent buffering, cached sprites, HUD layers, viewport transforms, FPS calculations, and frame interval measurements.

Read the rendering chapter

A finite campaign

Keep the grid, twin gates, and diamond formations, with seeded classes weighted by formation height. Cheaper bricks favor lower rows; silver and gold favor upper rows and stay separated horizontally and vertically, with diagonals allowed. Follow explicit level transitions with preserved lives and score, an initial 5% speed increase, and a configurable cap.

Read about levels and progression

Navigate the engine API

The PasDoc reference describes public classes, records, functions, parameters, units, and ownership contracts directly from the Pascal interfaces.