C64 Workshop Part 5
Final Project
You’ve learned input/output, graphics, sprites, joystick control, collision detection, and sound. Time to combine everything into a complete game.
Objective
Create a complete, playable game using skills from the workshop series.
Requirements
- User input (joystick or keyboard)
- Graphics (sprites and/or characters)
- At least one sound effect
- Win/lose conditions
Bonus
- Multiple sound effects or music
- High score tracking
- Title screen
- Multi-colour sprites
Project Options
Option A: Maze Explorer
✓ Recommended — Tile-based movement works perfectly with BASIC.
Navigate a maze collecting items while avoiding enemies.
- Draw maze with character graphics (Part 2)
- Player sprite moves tile-by-tile
- Collectible items in maze
- Enemy sprites patrol
- Sound on collect/hit
Win: Collect all items. Lose: Run out of 3 lives.
Option B: Card Game
✓ Recommended — Turn-based gameplay is ideal for BASIC.
Create a card game using character graphics for cards.
Suggested games: War, Blackjack, High/Low, Memory Match
Example (High/Low):
- Display card, guess if next is higher or lower
- Reveal with sound effect
- Track score and streak
- Use RND for shuffling
Win: 20 correct guesses. Lose: 3 wrong in a row.
Option C: Catch & Avoid
⚠️ Moderate — BASIC’s loop speed limits responsiveness.
Move left/right to catch good items and dodge bad ones falling from above.
- Player sprite at bottom
- Good/bad items fall randomly (use sprites)
- Speed increases with score
- Sound on catch/hit
Win: Reach 50 points. Lose: Run out of 3 lives.
Option D: Your Own Design
Have another idea? Go for it—just include all requirements. Turn-based or discrete-movement games work best.
Ideas: Snake, Whack-a-mole, Simon Says, quiz game, reaction timer
Development Tips
Build in Stages
- Display sprite/characters
- Add input
- Add one mechanic at a time
- Add collision
- Add scoring
- Add sound
- Polish
Test Often
Run after each change. Save frequently: SAVE "@:MYPROJECT",8
Use Subroutines
GOSUB jumps to a line number, runs code until RETURN, then continues where it left off. Unlike GOTO, it remembers where you came from.
10 GOSUB 100: REM PLAY SOUND
20 PRINT "DONE"
30 END
100 POKE 54296,15: POKE 54276,17
110 FOR D=1 TO 50: NEXT D
120 POKE 54276,16
130 RETURN
Organize your game with subroutines:
- 100-200: Main loop
- 300-400: Player movement
- 500-600: Enemy movement
- 700-800: Collisions
- 900-1000: Drawing
- 2000+: DATA statements
Plan on Paper
Sketch your 40×25 screen layout first. Design sprites with the editor from Part 3 before coding.
Quick Reference
Part 1: Basics
PRINT, INPUT, IF/THEN, GOTO, RND, CHR$
Part 2: Screen Memory
POKE 1024+pos, char— characterPOKE 55296+pos, colour— colourPOKE 53280/53281, colour— border/background- Position =
(ROW × 40) + COL
Part 3: Sprites & Joystick
POKE 2040, 128— pointerPOKE 53269, 1— enablePOKE 53248/53249, X/Y— positionPOKE 53287, colour— colourJ=PEEK(56320)— read joystickIF (J AND 1)=0— UP,IF (J AND 16)=0— FIRE
Part 4: Collision & Sound
C=PEEK(53278)— background collisionC=PEEK(53279)— sprite collisionPOKE 54296, 15— volumePOKE 54272/54273, freq— pitchPOKE 54276, waveform+1— gate on- Waveforms: 17=triangle, 33=sawtooth, 65=pulse, 129=noise
Advanced: Sprites Behind Background
POKE 53275, value sets sprite priority. Set bit N to put sprite N behind background colours 1-15.
10 POKE 53275, 1: REM SPRITE 0 BEHIND BG
Multiple sprites: add bit values (sprites 0+1 = 1+2 = 3, sprites 0+1+2 = 1+2+4 = 7).
Advanced: Scrolling
VIC-II can scroll 0-7 pixels before you shift screen memory.
POKE 53270, value— horizontal scroll (bits 0-2), 40-col mode (bit 3). Default: 8POKE 53265, value— vertical scroll (bits 0-2), 25-row mode (bit 3), screen on (bit 4). Default: 27
Warning: If bit 4 of 53265 is cleared, the screen goes blank!
10 POKE 53270,0: REM 38 COLUMNS, SCROLL=0
20 FOR I=0 TO 7
30 POKE 53270,I: REM SCROLL RIGHT
40 FOR D=1 TO 50: NEXT D
50 NEXT I
Note: True smooth scrolling requires shifting screen memory each character—difficult in BASIC. Consider static screens or room transitions instead.
Good luck!
Previous: Part 4 - Collision Detection and Sound | Back to Home