Skip to content

Phase 4 (Final) - Combat System, Enemies & File Save/Load Engine

Latest

Choose a tag to compare

@ArfaMariyam ArfaMariyam released this 05 Sep 10:37

What's Included in Phase 4

Phase 4 completes Slayie by adding enemy encounters, combat health checks, game-over conditions, and persistent game-state saving and loading using local text files!

Key Features Implemented

  • Enemy Encounters (E): Hostile goblins placed across the dungeon. Colliding with an enemy engages combat, dealing 25 damage to the player before eliminating the foe.
  • Game Over State: If playerHealth drops to 0 or below during combat, the dungeon run concludes with a game-over terminal screen.
  • Persistent Save Engine (saveGame): Pressing [K] saves your active coordinates, health, coins, and the exact remaining map layout into slayie_save.txt.
  • Save State Loader (loadGame): Start menu prompts to either launch a fresh run or restore your previous checkpoint directly from disk.

Live Gameplay Preview

Image

How to Test

  1. Download SLAYIE.exe from the assets below.
  2. Run the executable in your terminal.
  3. Choose 1 for a new game or 2 to load a previous save.
  4. Use W, A, S, D to navigate, K to save your game, and fight enemies (E) on your way to the exit door (D)!