From 201b4589b38fb7a7aa41f210131bcfad848c6c6b Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Sat, 29 Mar 2025 13:49:42 +0100 Subject: [PATCH] fixup! feat: Implement player lives, destruction, and respawn Signed-off-by: Harald Hoyer --- README.md | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 4fae563..46668f9 100644 --- a/README.md +++ b/README.md @@ -1,20 +1,26 @@ -# bglga +# bglga This project is a simple Galaga-like space shooter game built using the Bevy engine. ## Current State The game features: -- A player ship at the bottom of the screen that can move left and right -- Shooting bullets upward using the spacebar or up arrow key -- Enemy ships that spawn at the top and move downward -- Collision detection between bullets and enemies + +* A player ship at the bottom of the screen that can move left and right. +* Shooting bullets upward using the spacebar or up arrow key. +* Enemy ships that spawn at the top and move downward. +* Collision detection between bullets and enemies. +* **Collision detection between the player and enemies.** +* **A player lives system (starting with 3 lives).** +* **Player destruction upon collision.** +* **Player respawn after a short delay with temporary invincibility.** +* **Remaining lives displayed in the window title.** ## Controls -- Move Left: A key or Left Arrow -- Move Right: D key or Right Arrow -- Shoot: Spacebar or Up Arrow +* Move Left: A key or Left Arrow +* Move Right: D key or Right Arrow +* Shoot: Spacebar or Up Arrow ## How to Compile @@ -33,10 +39,10 @@ nix develop --command bash -c "cargo build" **1. Core Gameplay Loop & State Management:** -* **Player Lives:** - * Add a `PlayerLives` resource (e.g., starting with 3). - * Modify `check_player_enemy_collisions`: Instead of just printing, decrement the lives count. - * Implement player destruction (despawn the player sprite) and respawn logic (maybe after a short delay, with temporary invincibility). +* ~~**Player Lives:**~~ **(DONE)** + * ~~Add a `PlayerLives` resource (e.g., starting with 3).~~ + * ~~Modify `check_player_enemy_collisions`: Instead of just printing, decrement the lives count.~~ + * ~~Implement player destruction (despawn the player sprite) and respawn logic (maybe after a short delay, with temporary invincibility).~~ * **Game Over State:** * Use Bevy's `States` (e.g., `Playing`, `GameOver`). * Transition to `GameOver` when `PlayerLives` reaches zero.