Special Enemy Implementation
I used a simple isRed variable to generate a random number and apply red to the enemies to mark them as special if it rolls 2.

When the enemies move offscreen, I added a check for whether they’re special or not that either adds score or removes a life, then deletes them. Reusing old enemies by teleporting them back to the top of the spawn area could be more memory efficient than this method. The game will also auto exit if lives reach 0 inside this function.

Player Attack Collision
The player cubes move correctly, but are currently unable to attack the enemies. I added collision detection that only activates if the collided object is an enemy reference, then casts to the player and either adds score if the enemy is normal or removes a life if the enemy is special. If the player’s lives reach 0, it automatically exits the game.

Conclusions
I achieved all of the goals I had originally drafted for my project:
- life system (3 lives) ✓
score system: ✓
+1/sec ✓
+10/enemy ✓
- enemy spawns ✓
regular or special 50/50 ✓
spawn rate = 1000ms-score/3 ✓
on 1 of 4 evenly spaced lanes, random selection ✓
- when enemy reaches player, ✓
kill enemy, ✓
lose 1 life (if normal) ✓
+10 points (if special) ✓
- player is pawn – 4 action mappings ✓
each mapping spawns cube on one lane for .1 seconds ✓
if cube collides with enemy, ✓
destroy enemy, +10 points (if normal) ✓
destroy enemy, lose 1 life (if special) ✓
I had used this as a skeleton code example to ensure my code remains organised. Unfortunately my original GDD was lost, but the missing ideas included:
- Enemies gain new movement patterns based on score
- Pickups spawn that give extra score
- All additional stylistic graphics (player cat, enemy animals etc)
Based on player feedback, I lowered the maximum lives from 9 to 3 to increase the punishing feel of the game while lowering the difficulty curve. This makes progress more difficult while making high scores far more satisfying to achieve in the midst of a storm of enemies.
The music used for the final demo is Jun Kuroda – Coquette.