Phase 1 Complete
A complete, playable territory control game with AI opponents and full audio-visual polish.
Congratulations! You’ve completed Phase 1 of Ink War. Over sixteen units, you’ve built a complete, playable game from scratch. Let’s review what you’ve created and celebrate the milestone.
Run It
pasmonext --sna inkwar.asm inkwar.sna

Load the game and hear the startup jingle — that’s the sound of completion.
See It In Action
What You’ve Built
Phase 1 delivers a fully functional territory control game:
This code sample could not be loaded. The file may be missing or the path may be incorrect.
Every feature works together to create a polished experience.
The Journey
Here’s how Ink War grew over Phase 1:
| Units | Focus | What You Built |
|---|---|---|
| 1-3 | Foundation | Board display, cursor movement, cell claiming |
| 4-6 | Mechanics | Scores, move validation, game end detection |
| 7-8 | Flow | Title screen, complete two-player game |
| 9-12 | AI | Random, adjacent, defensive, positional strategies |
| 13-14 | Options | Difficulty levels, sound effects |
| 15-16 | Polish | Results screen, startup sound, final verification |
Each unit built on the previous, adding one clear feature at a time.
Final Polish: Startup Sound
The startup jingle gives immediate feedback that the game has loaded:
This code sample could not be loaded. The file may be missing or the path may be incorrect.
Three quick ascending notes — a small touch that makes the game feel finished.
Verification Checklist
Before moving to Phase 2, verify everything works:
Two-Player Mode:
- ✓ Both players can claim cells
- ✓ Turns alternate correctly
- ✓ Invalid moves show error feedback
- ✓ Game ends when board is full
- ✓ Winner displayed with margin
AI Easy:
- ✓ Makes random valid moves
- ✓ Easy to beat consistently
AI Medium:
- ✓ Builds connected territory
- ✓ Moderate challenge
AI Hard:
- ✓ Blocks opponent expansion
- ✓ Prioritises corners and edges
- ✓ Provides strong competition
Audio:
- ✓ Startup jingle plays on load
- ✓ Claim sounds on valid moves
- ✓ Error buzz on invalid moves
- ✓ Victory fanfare when winning
- ✓ Draw sound on tie
The Complete Code
This code sample could not be loaded. The file may be missing or the path may be incorrect.
Code Statistics
The complete Phase 1 game in numbers:
| Metric | Count |
|---|---|
| Lines of code | ~2,300 |
| Subroutines | ~40 |
| Sound effects | 6 |
| AI strategies | 3 |
| Game states | 3 |
All of this fits comfortably in the Spectrum’s memory.
What You’ve Learnt
Phase 1 covered fundamental skills:
ZX Spectrum Display:
- Attribute memory ($5800-$5AFF)
- FBPPPIII format (Flash, Bright, Paper, Ink)
- Screen memory organisation
- Border colour control
Z80 Assembly:
- Registers and addressing modes
- Arithmetic and logic operations
- Control flow (jumps, calls, loops)
- Keyboard input via ports
Game Development:
- Game loop structure
- State machine patterns
- Input handling and validation
- AI decision-making
Audio:
- Beeper sound generation
- Timing-based pitch control
- Musical sequences
What’s Next
Phase 2 transforms Ink War from functional to impressive:
- Custom character sets — Replace ROM characters with custom graphics
- Animations — Cursor pulsing, claim effects, screen transitions
- Title music — A proper musical introduction
- Options menu — Sound on/off, board size selection
- Board variations — 6×6 boards for quicker games
- Statistics — Track wins, losses, best margins
The foundation is solid. Phase 2 adds the polish that makes a game memorable.
Phase 1 Complete
You’ve built a real game. Not a tutorial example, not a code snippet — a complete, playable territory control game with multiple modes, intelligent AI, and audio feedback.
Hand the keyboard to a friend and play Ink War. You made this.
See you in Phase 2.