Brawlers is a real-time 2D fighting game developed using Python and Pygame. The game features dynamic combat mechanics, three arenas, and engaging AI. Compete against an AI-controlled opponent, utilizing smooth animations, health tracking, and reactive controls. Developed by Oluwasegun Adewola and Ifeoluwa Areogun. Check out our Trailer.
- Real-Time Combat:
- Players can attack, jump, and perform special moves.
- Arenas:
- Choose from three visually distinct battlefields before starting the game.
- Dynamic Health Bars:
- Reflect real-time damage and provide visual feedback during combat.
- AI Opponent:
- Adaptive AI with randomized attacks and strategic movements.
- Select Your Arena:
- Use the mouse to choose from one of three backgrounds displayed on the selection screen.
- Combat:
- Player controls are as follows:
- Arrow Keys: Move left or right.
- Up Arrow: Jump.
- 1, 2, 3 Keys: Perform attacks (basic, special, etc.).
- The AI-controlled opponent automatically engages based on the player's position and actions.
- Player controls are as follows:
- Win/Loss Conditions:
- The round ends when a fighter's health reaches zero.
- A victory or defeat message is displayed based on the outcome.
- The game resets after a brief cooldown period.
The game is implemented using an object-oriented design to ensure modularity and scalability.
-
main.py:- Handles the game loop, background selection, and overall flow.
- Manages rendering of UI elements like health bars, victory messages, and the arena.
-
fighter.py:- Defines the
Fighterclass, encapsulating attributes and behaviors such as movement, attacks, animations, and health. - Includes the
AIsubclass, extending theFighterclass with adaptive decision-making for the AI-controlled opponent.
- Defines the
- Attributes:
- Health, velocity, position, and animation states.
- Methods:
move: Manages character movement and actions.attack: Handles collision detection and damage application.update: Updates animations and state transitions.draw: Renders the fighter on the screen.
- Extends the
Fighterclass with:- Randomized attacks.
- Strategic movements based on player actions.
- Python 3
- Pygame Library:
- Install via pip:
pip install pygame
- Install via pip:
- Clone or download the repository to your local machine.
- Ensure Python 3 and Pygame are installed.
- Run the game:
python main.py
- Add more fighters with unique abilities.
- Introduce combo systems for advanced gameplay.
- Implement online multiplayer functionality.
- Developed by Oluwasegun Adewola and Ifeoluwa Areogun.
- Special thanks to Professor Sarita Singh for guidance and support.