Title Screen Animation
Add colour cycling to the title screen for a professional, eye-catching first impression.
First impressions matter. An animated title screen says “this is a polished game” before the player even starts.
Run It
Assemble and run:
pasmonext --sna inkwar.asm inkwar.sna

Version shows “PHASE 2 V0.4”. Watch the “INK WAR” title cycle through colours.
Colour Cycling
The Spectrum’s attribute system makes colour cycling easy—just change the paper colour:
animate_title:
; Get colour from frame counter
ld a, (frame_counter)
and %01110000 ; Use bits 4-6 for slower cycling
rrca
rrca
rrca
rrca ; Now 0-7 in low bits
; Map to colour attributes
cp 0
jr z, .red
cp 1
jr z, .yellow
; ... etc
Using bits 4-6 means the colour changes every 16 frames (about 3 times per second).
The Colour Sequence
We cycle through the Spectrum’s bright colours:
| Step | Colour | Attribute |
|---|---|---|
| 0 | Red | %01010111 |
| 1 | Yellow | %01110111 |
| 2 | Green | %01100111 |
| 3 | Cyan | %01101111 |
| 4 | Blue | %01001111 |
| 5 | Magenta | %01011111 |
| 6 | White | %01111000 |
| 7 | Red | (cycle repeats) |
White uses black ink for contrast; others use white ink.
Calling Every Frame
The animation runs during the title state:
state_title:
; Animate title colours
call animate_title
; Check for key presses...
This ensures smooth animation while waiting for input.
The Complete Code
This code sample could not be loaded. The file may be missing or the path may be incorrect.
What You’ve Learnt
- Title animation - Makes the game feel alive before play
- Colour cycling - Simple but effective visual effect
- Frame-based timing - Using counter bits for different speeds
- First impressions - Professional presentation matters
What’s Next
Unit 21 adds title music—a simple beeper melody that plays while waiting.