Skip to content

Welcome to Battleground, an exciting fighting game built using JavaScript, HTML, and CSS. In this game, you'll control two powerful warriors who will engage in epic battles until one emerges as the ultimate champion!

Notifications You must be signed in to change notification settings

rjrahul08/Fighting-game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Fighting Game - Readme

Screenshot (158)

Description

Welcome to Battleground, an exciting fighting game built using JavaScript, HTML, and CSS. In this game, you'll control two powerful warriors who will engage in epic battles until one emerges as the ultimate champion!

Gameplay

The game screen consists of two fighters facing each other, each represented by an animated character. The player on the left side is Player 1, and the one on the right is Player 2.

![Gameplay](Screenshot (159) )

How to Play

  1. Player 1 Controls:

    • Q: Attack - Press the Q key to make Player 1 strike Player 2. Each attack inflicts random damage between 1 and the player's attack power (shown as AttackDmg).
    • A: Heal - Press the A key to make Player 1 heal. Healing restores a random amount of health between 1 and 5.
  2. Player 2 Controls:

    • P: Attack - Press the P key to make Player 2 strike Player 1. Similar to Player 1, each attack deals random damage between 1 and the player's attack power (AttackDmg).
    • L: Heal - Press the L key to make Player 2 heal. Healing restores a random amount of health between 1 and 5.
  3. Simulate Button: Click the Simulate button to let the AI control both players and watch them fight automatically.

  4. Reset Button: After a match is over, click the Reset button to start a new battle with both players' health restored to 100.

Winning the Game

The game continues until one of the players' health drops to 0 or below. The first player to reach 0 health loses, and the other player is declared the winner.

Sound Effects

The game features sound effects for attacking and healing actions, adding to the immersive experience.

Have Fun!

Enjoy the thrilling battles in Battleground! Challenge your friends and see who can emerge as the true fighting champion. Feel free to customize the game further, add more characters, or enhance the gameplay as you wish.

Getting Started

To run the game locally, follow these steps:

  1. Clone this repository to your local machine or download the project files as a ZIP archive.

  2. Open the index.html file in your web browser.

  3. Start playing the game using the player controls described above.

Customization

If you want to customize the game or add new features, you can modify the JavaScript code (script.js) and CSS code (style.css). Experiment with different characters, attacks, and sound effects to make the game your own.

Credits

License

This project is licensed under the MIT License.


Thank you for playing Battleground! If you have any questions or feedback, feel free to contact us. Have a great time battling it out!

About

Welcome to Battleground, an exciting fighting game built using JavaScript, HTML, and CSS. In this game, you'll control two powerful warriors who will engage in epic battles until one emerges as the ultimate champion!

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published