Welcome to the Battle Simulator, a real-time strategy game where two armies clash on a battlefield. Customize your soldiers, manage resources, and watch the action unfold as your troops battle for victory. This game is built using React, featuring dynamic animations, custom AI behaviors, and a visually immersive battlefield UI.
Make sure you have the following tools installed on your machine:
-
Clone the Repository:
git clone https://github.com/dimitarbez/battle-simulator.git cd battle-simulator-game
-
Install Dependencies:
npm install
-
Run the Development Server:
npm start
This will start the application in development mode. Open http://localhost:3000 to view it in your browser.
The page will automatically reload if you make edits, and you will see lint errors (if any) in the console.
In Battle Simulator, two armies are generated with customizable stats like health, damage, speed, and morale. Watch them fight in real-time on a battlefield!
- Blue Army vs Red Army: Both teams have a set number of soldiers. The goal is to defeat the enemy army by either eliminating all soldiers or forcing them to retreat by lowering their morale.
- Control Soldiers' Stats: Adjust health, speed, and damage values for each army to change the tide of battle.
- Victory Conditions: Victory is declared when one side completely defeats the other.
In the project directory, you can run:
Runs the game in development mode. Open http://localhost:3000 to view it in the browser.
Builds the app for production into the build
folder. The build is optimized and minified for the best performance. The production-ready app is now ready to be deployed!
Launches the test runner in interactive watch mode. This will help you ensure your game logic works correctly.
The game is styled using Tailwind CSS, which gives the game a sleek, modern look while keeping the codebase modular and easy to customize. If you’d like to adjust the game’s UI or add new features, feel free to modify the existing components or add new ones.
- Battlefield Background: The battlefield is rendered with a dynamic background image to simulate a realistic battle environment.
- Soldier Animations: Soldiers react to different states (attacking, retreating, celebrating victory) with smooth animations.
- Victory Screen: Displays a dramatic victory screen when one army wins the battle.
We welcome contributions from the community to improve the game! Here's how you can get involved:
- Fork the Repository
- Create a New Branch for your feature or bug fix:
git checkout -b feature-name
- Make Your Changes
- Commit Your Changes:
git commit -m "Add feature/fix: description of what you did"
- Push to Your Fork:
git push origin feature-name
- Create a Pull Request: Submit your PR through the GitHub interface, and we’ll review it as soon as possible.
We are actively looking for contributors to help with:
- Adding multiplayer or AI-controlled armies.
- Improving soldier AI behaviors (e.g., formations, advanced tactics).
- Implementing different battle scenarios (e.g., cavalry, archers, terrain).
- Adding sound effects and music for a more immersive experience.
Once you're ready to share your game, you can deploy it easily. Here are a few deployment options:
- GitHub Pages: How to Deploy React App to GitHub Pages
- Netlify: Free and easy static site hosting.
- Vercel: Great for deploying React apps.
This game was inspired by classic strategy and simulation games, where players can tweak variables and watch the battlefield come to life. Whether you're a fan of real-time strategy or looking to learn more about AI and simulations in games, this project is for you!
This project is licensed under the MIT License - see the LICENSE file for details.
- Built with React
- Styling powered by Tailwind CSS
- Inspired by classic strategy games and battle simulators.