Game 5 Unit 31 of 128 1 hr learning time
Attract Mode
Add AI vs AI demonstration mode that plays when the title screen is idle.
24% of Ink War
Attract mode showcases gameplay without interaction—like a shop window demonstration.
Run It
pasmonext --sna inkwar.asm inkwar.sna

Version shows “PHASE 2 V0.15”.
Implementation
- Count idle frames on title screen
- After threshold (e.g., 500 frames / 10 seconds), start demo
- AI plays both sides
- Any key returns to title
idle_timer: defw 0
ATTRACT_DELAY equ 500
; In title state:
; Check for attract mode
ld hl, (idle_timer)
inc hl
ld (idle_timer), hl
ld de, ATTRACT_DELAY
or a
sbc hl, de
jr nc, .start_attract
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
- Idle detection - Counting frames without input
- Demo mode - AI controlling both players
- Attract design - Showcasing game features
What’s Next
Unit 32 completes Phase 2 with final integration and polish.
What Changed
Unit 30 → Unit 31