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.
- 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
- Incorrectly painted out of bounds on some size browsers
-
Clone the repository:
git clone https://github.com/JoshCap20/websocket-multiplayer-tank-game.git
-
Change directory to the project folder:
cd websocket-multiplayer-tank-game
-
Install the dependencies:
npm install
Start the WebSocket and HTTP server (from project folder):
npm start
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.
- Arrow Up: Move forward
- Arrow Down: Move backward
- Arrow Left: Rotate left
- Arrow Right: Rotate right
- Space: Fire bullet