← Back to games
Brick Breaker
Arcade brick breaker with trajectory-preview aiming and pre-pooled ball volleys
Unity 2021.3 LTSC#Object PoolingSingletonRigidbody2DLevel State Machine

A modern take on the arcade classic: aim the striker with the mouse, preview the shot arc, then launch a volley of balls that ricochets around the arena chipping away at multi-hit bricks. Clear every brick to unlock the next level layout.
Tech stack
Unity 2021.3 LTS · C# · 2D physics (Rigidbody2D bounce resolution) · uGUI (score, pause, level select) · WebGL build target
Architecture & design patterns
- Pre-allocated object pools —
Strikerbuilds fixed arrays of 50 balls and 20 trajectory markers up front, then reuses them for every shot, so a volley of dozens of balls never triggers runtimeInstantiateor GC pressure - Trajectory preview system — the same pooled marker objects are repositioned along the projected launch arc each frame, giving the player a live aim guide before committing to a shot
- Level state machine — each
Levelscomponent owns alevelStatus(locked / unlocked / completed) plus its brick count, and aLevelManagerdrives selection, activation and completion across aLevels[]roster - Multi-hit brick model —
Brickcarries its own hit points and renders the remaining count as a live label, so difficulty is expressed as data on the prefab rather than branching logic - Singleton audio service with cross-scene persistence —
SoundManagerguards a staticInstance, callsDontDestroyOnLoad, and resolves aSoundEventsenum against a serializedSoundType[]table, keeping call sites free of directAudioClipreferences
Shooting staggers each ball by a short delay so a single input fires a readable stream rather than one indistinguishable burst, with bounce angles clamped to keep rebounds playable.
Gallery


