Skip to content

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 and custom AI behaviors.

License

Notifications You must be signed in to change notification settings

dimitarbez/battle-simulator

Repository files navigation

⚔️ Battle Simulator Game

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.

🚀 Getting Started

Prerequisites

Make sure you have the following tools installed on your machine:

  • Node.js (version 14 or higher recommended)
  • npm (or yarn as an alternative package manager)

Installation

  1. Clone the Repository:

    git clone https://github.com/dimitarbez/battle-simulator.git
    cd battle-simulator-game
  2. Install Dependencies:

    npm install
  3. 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.

🎮 Gameplay

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.

🛠️ Available Scripts

In the project directory, you can run:

npm start

Runs the game in development mode. Open http://localhost:3000 to view it in the browser.

npm run build

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!

npm test

Launches the test runner in interactive watch mode. This will help you ensure your game logic works correctly.

🖼️ Visuals and Customization

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.

🏗️ Contributing

We welcome contributions from the community to improve the game! Here's how you can get involved:

  1. Fork the Repository
  2. Create a New Branch for your feature or bug fix:
    git checkout -b feature-name
  3. Make Your Changes
  4. Commit Your Changes:
    git commit -m "Add feature/fix: description of what you did"
  5. Push to Your Fork:
    git push origin feature-name
  6. Create a Pull Request: Submit your PR through the GitHub interface, and we’ll review it as soon as possible.

Features to Add

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.

🌍 Deployment

Once you're ready to share your game, you can deploy it easily. Here are a few deployment options:

💡 Inspiration

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!

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

🙌 Acknowledgments

  • Built with React
  • Styling powered by Tailwind CSS
  • Inspired by classic strategy games and battle simulators.

About

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 and custom AI behaviors.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published