The basic loop
A simpler high/mid/low attack-and-defense game. This is the foundation: player choice, NPC choice, comparison, damage, repeat.
A stupid little fighting game I wrote to teach my son how code turns into behavior.
This was never supposed to be a polished game. I built it with my son as a programming exercise, constructing it in the order the logic made sense rather than simply typing a finished program from top to bottom.
The game is small enough that the entire system can be understood: the player chooses an attack or defense, the computer makes a decision, the program compares the two, applies damage, changes the graphics, updates the interface, switches phases, and does it again.
That made it a useful way to teach state, conditionals, random numbers, functions, UI updates, and the relationship between a decision in code and something immediately visible on screen.
Every combat sound is my voice. They are the same wonderfully sophisticated vocal sound effects I used in Treason.
The progression is small but visible. Version 1 establishes the basic attack/defend idea. Version 2 turns it into the fuller little combat system. Version 3 adds interface guidance and comments, while also preserving one slightly questionable logic change.
A simpler high/mid/low attack-and-defense game. This is the foundation: player choice, NPC choice, comparison, damage, repeat.
Adds explicit attack and defense phases, fast stabs, slow slashes, different damage values, changing button roles, and smarter NPC behavior.
Adds clearer phase guidance and some comments. A later annotated copy documents the original logic without refactoring or fixing it.