Skip to content
C64 · BASIC · Game 01 BASIC ● 6 of 6 units live

Skyline

Your first C64 program: build a city by writing straight to the screen. POKE blocks into screen memory, light the windows from colour memory, randomise the towers, and set the hour with two registers — a cityscape that composes itself.

In Meet C64 BASIC you learned that the screen is memory — POKE a block into an address from 1024 onward and it appears, and the colour lives separately at 55296. Skyline turns that one idea into a picture: a city of towers that builds itself out of black, lights its own windows, and never looks the same twice.

A C64 cityscape at dusk: grey tower silhouettes of varied heights against a midnight-blue sky, scattered with yellow lit windows.
Where you're headed: a self-composing skyline at dusk — towers of random heights, windows lit at random, the whole sky set by two POKEs.

There's no input and no game loop here — Skyline is a canvas. It's the first program in Volume 1 because everything later (a rover you drive, a lander you fly) is drawn the same way: characters and colour POKEd to the screen by address. Learn to compose a still picture first, and motion is just doing it again, faster, in a loop.

What you'll build:

  • A single block placed by the 1024 + R*40 + C formula
  • A tower from a FOR loop, then a row of towers from a nested FOR
  • Lit windows, drawn from colour memory alongside the towers
  • Random heights and random windows, so no two cities match
  • A dusk sky and border set by two registers — the hour of the whole scene

6 units. About 5–6 hours. This builds straight on Meet C64 BASIC — start there if the screen-as-memory idea is new.

Unit roadmap

Phase 1

The grid

One block, placed by address — then a tower from a loop

Units 1–2 Complete
Phase 2

A skyline

Nested loops raise a row of towers, and colour lights the windows

Units 3–4 Complete
Phase 3

A city of its own

Randomness makes every city different; two registers set the hour

Units 5–6 Complete