This project was created as a learning exercise to understand Rust and Bevy's ECS paradigm. I have only been learning Rust and Bevy for two weeks, and this is my second application.
You will certainly find areas where the code could be improved. Please feel free to offer suggestions!
-
Tile-Based Scrolling: The camera remains fixed whilst the maps scrolls beneath it, with border artefacts hidden by sprite blocks.
-
Procedural Map Generation: Generates maps using a random walk algorithm to carve out paths.
-
Grid-Based Movement: Entities (player, enemies, projectiles) move 1 tile at a time, with players and enemies reserving that space in advance.
-
Collision Detection: Combines (AABB) collision detection and adjacency-based collision for performant player-enemy-projectile interactions.
-
Responsive Resizing: All game elements automatically resize in response to window size changes.
-
State Management: Manages different game states (Loading, Title, Playing, Victory) to control game flow.
W, A, S, D: Move the player up, left, down, or right on the grid.
Space or Left Mouse Click: Shoot a projectile in the player's current direction.
Escape: Quit game.
Navigate the procedurally generated map, avoid enemies, and shoot projectiles to destroy them.
Beware your bullet rebounds!
Clear all enemies to achieve level victory, which doubles the enemy count for the next round.
1 mistake and the game is over.
I'm actually surprised how something this simple can still be kind of fun.
The font "Press Start 2P" (cody@zone38.net) is licensed under the SIL OPEN FONT LICENSE Version 1.1
The color palette is Sweetie-16 by GrafxKid.
This project, with the exception of the font, is licensed under the MIT License. See the LICENSE file for details.
-
A binary release is available to PC users who don't want to compile the game themselves.
-
Clone this repository.
-
Run the game with cargo run.
Should go to Grok for holding my hand through all this. Grok assisted with the design, solved countless syntax issues and was in general, a great learning partner in the project. See collated_src.txt in the assets folder for how I streamlined this process.