Skip to content

A simple multiplayer tank game built using Node.Js, JavaScript, Canvas, and WebSockets.

Notifications You must be signed in to change notification settings

JoshCap20/websocket-multiplayer-tank-game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

81 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Multiplayer Tank Game

A simple, fast-paced, multiplayer tank game built using Node.js and JavaScript that runs in your browser. The game employs the HTML5 Canvas API for smooth and responsive rendering of 2D graphics and utilizes WebSockets to establish real-time communication between clients and the server.

Screenshot 2023-04-06 at 6 12 25 AM

Features

  • Real-time multiplayer gameplay
  • Tank movement and rotation
  • Firing bullets with damage and cooldown
  • Health bars and tank destruction
  • Progression system (dual guns, etc)
  • Randomly generated sized maps with obstacles and spawning
  • Multiple types of tanks (light, medium, heavy, super heavy)
  • Computer-controlled tanks with simple path navigation
  • Mobile friendly navigation

Bugs

  • Incorrectly painted out of bounds on some size browsers

Installation

  1. Clone the repository: git clone https://github.com/JoshCap20/websocket-multiplayer-tank-game.git

  2. Change directory to the project folder: cd websocket-multiplayer-tank-game

  3. Install the dependencies: npm install

Running the game (Server)

Start the WebSocket and HTTP server (from project folder):
npm start

Playing the game (Client)

The server will give you the address that anyone on the same network can use to play with you, that is your IP address on the network + the port of the server.

This game is configured to run on port 8080 by default.

Controls

  • Arrow Up: Move forward
  • Arrow Down: Move backward
  • Arrow Left: Rotate left
  • Arrow Right: Rotate right
  • Space: Fire bullet

About

A simple multiplayer tank game built using Node.Js, JavaScript, Canvas, and WebSockets.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published