Skip to content

Beginner Patterns

Foundational patterns for those starting their retro dev journey

32
Patterns
5
Platforms

Commodore 64

5 patterns

Sinclair ZX Spectrum

11 patterns
Sinclair ZX Spectrum Audio

Sound Beep

Generate a simple beep or tone by toggling the speaker bit. Rising or falling pitch for feedback sounds.

Sinclair ZX Spectrum Framework

Game Loop (HALT)

Frame-synchronised game loop using the HALT instruction. Locks to 50Hz for consistent timing across all Spectrums.

Sinclair ZX Spectrum Framework

Screen Frame (BASIC)

Draw a 1-cell border around the play area with title and footer bars. The standard game screen layout.

Sinclair ZX Spectrum Framework

Text Utilities (BASIC)

Centre text on any row and clear rows — two tiny subroutines used in every BASIC game.

Sinclair ZX Spectrum Input

Keyboard Reading

Read the ZX Spectrum keyboard matrix by polling I/O ports. Simple, efficient, and no ROM routines required.

Sinclair ZX Spectrum Physics

Grid Movement with Bounds

Move an entity on a grid with boundary checking. Prevents moving outside the play area.

Sinclair ZX Spectrum Rendering

Attribute Writing

Write colours directly to attribute memory for fast, flicker-free graphics without touching pixel data.

Sinclair ZX Spectrum Rendering

Character Printing

Print ASCII characters to the screen using the ROM character set. Direct display file access for fast text rendering.

Sinclair ZX Spectrum Rendering

Numeric Display

Convert a number (0-99) to two ASCII digits and print them. Essential for scores and counters.

Sinclair ZX Spectrum Rendering

Progress Bar (BASIC)

Horizontal progress bar with colour thresholds — blue through yellow, red, to white. Useful for health, temperature, or timers.

Sinclair ZX Spectrum Rendering

Seven-Segment Digits (BASIC)

Draw large seven-segment display digits using PLOT/DRAW. Cell-aligned with 1px outline. 10 DATA strings define all digits 0-9.

Nintendo Entertainment System

5 patterns

Commodore Amiga

7 patterns

Cross-Platform

4 patterns