No description
Move the App setup and module declarations from src/main.rs into a new src/lib.rs that exposes a single pub fn run(). src/main.rs becomes a three-line entry point that calls bglga::run(). This is the standard Bevy-book pattern and lets the game logic be consumed as a library (e.g. for integration tests, headless tooling, or alternate entry points) without duplicating the App wiring. Also gate update_tractor_beam_visual with run_if(any_with_component::<TractorBeam>) so the system only runs while a boss has an active tractor beam, instead of every Update tick. |
||
|---|---|---|
| .opencode | ||
| .roo | ||
| .vscode | ||
| src | ||
| .envrc | ||
| .gitignore | ||
| AGENTS.md | ||
| Cargo.lock | ||
| Cargo.toml | ||
| flake.lock | ||
| flake.nix | ||
| GEMINI.md | ||
| opencode.json | ||
| README.md | ||
| TODO.md | ||
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.
- 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
How to Compile
nix develop --command bash -c "cargo build"
How to Run
- Make sure you have Rust and Nix installed.
- Clone the repository.
- Navigate to the project directory.
- Run the game using the command:
nix develop --command bash -c "cargo run"