abhiiii05 / Java_Script-2p-gamedev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Java_Script-2p-gamedev

Overview

This is a simple 2-player fighting game built with HTML, a bit of CSS, and JavaScript. It features basic movement, attacks, and health systems and a timer.

Controls

Player 1: Movement: WASD keysAttack: Spacebar Player 2: Movement: Arrow keys Attack: Down arrow key

Game Mechanics

Players can move around the screen and attack each other.Each player has a health bar that depletes when attacked.The first player to reduce their opponent's health to zero wins the game.

Files

1.index.html : Contains the HTML structure and links to the JavaScript file.

2.index.js : Contains the JavaScript code that handles game logic, events, and rendering.

3.classes.js : Contains classes for sprites and fighter objects.

4.util.js : Encompasses utility movement for the the players.

Additional Notes

This is a very basic implementation of a fighting game.Feel free to modify and extend the code to add more features, such as:

  1. Different characters with unique moves.
  2. Special attacks
  3. CombosSound effects and music
  4. Visual effectsGame modes (e.g., time attack, survival)

About


Languages

Language:JavaScript 86.4%Language:HTML 13.6%