Starbraze · the code

Every step of the game

The sources and the programs, in folders named exactly as the book names them. The licence of this code has not been chosen yet: see the repository.

Build and play

You need 64tass (assembler), VICE (emulator (x64sc)), Windows PowerShell (the book's run.ps1 launchers) and Python 3 (optional build helper). Open a terminal in the folder and type:

.\run.ps1 -Mode Build
.\run.ps1 -Mode Play

Check everything

From the top folder of the full download, this assembles every source again and compares the result with the reference bytes:

python build.py --all --check-release
  • Download the whole repository and keep its folders: every milestone folder in Starbraze/ has its own run.ps1, and the launchers share the tools/ folder at the top.
  • Open PowerShell in the folder named by the chapter, for example Starbraze\01-first-screen, and type the commands printed in the book. If PowerShell refuses the script, run it for that one command: powershell -NoProfile -ExecutionPolicy Bypass -File .\run.ps1 -Mode Play
  • The latest game is Arcade Edition v1.1, in Starbraze/14-arcade-edition. From the top folder, .\run-game.ps1 -Project 14-arcade-edition -Mode Play builds and plays it.
  • Without PowerShell: python build.py <folder> builds a milestone and python build.py <folder> --play runs it. Without Python either, from Starbraze/14-arcade-edition: 64tass --cbm-prg -Wall --vice-labels -l build/starbraze.lbl -L build/starbraze.lst -o build/starbraze.prg src/main.asm
  • Use PAL mode and a joystick in port 2. On the menu: up = music, right = sound effects, down = silent; press and release Fire to start.
  • Every milestone folder has its own complete src/ tree, and the matching compiled program is in releases/<folder>/starbraze.prg.

Chapter by chapter

Ch.TitleFolderDownload
1Your C64 workshopStarbraze/01-first-screen/
2Building the first sceneStarbraze/01-first-screen/
3Taking the controlsStarbraze/02-player-movement/
4Firing the first shotsStarbraze/03-player-fire/
5Bringing in the first patrolStarbraze/04-enemy-patrol/
6Making shots hit their targetsStarbraze/05-shot-collisions/
7Making every hit countStarbraze/06-score/
8Giving the pilot three livesStarbraze/07-player-lives/
9Surviving three patrol wavesStarbraze/08-waves/
10Defeating the Helios GuardianStarbraze/09-boss/
11Adding music and sound effectsStarbraze/10-audio/
12Restarting the missionStarbraze/11-restart/
13Reading and checking the gameStarbraze/11-restart/
14Glossary and technical index—
15From complete to compellingStarbraze/13-advanced-game/
16Arcade graphics and screen flowStarbraze/14-arcade-edition/
17Four enemy classes and combat balanceStarbraze/14-arcade-edition/
18Banking the fighter and shaping SID effectsStarbraze/14-arcade-edition/