Welcome to my multiplayer game project repository! This project was a significant learning experience where I explored socket programming, server-client architecture, and multi-user environments. You can view a demo of this game here .
This project is a multiplayer game developed from scratch. It covers various aspects of game development, from setting up the game to adding unique player attributes, implementing player movement, handling projectiles and collisions, creating a leaderboard, and more. The project culminates in pushing the game live and setting up a domain name.
- Player Connection and Disconnection: Manages multiple players connecting and disconnecting seamlessly.
- Unique Attributes and Usernames: Assigns unique attributes and usernames to each player.
- Real-time Player Movement: Implements smooth player movement and interactions.
- Projectiles and Collision Detection: Handles shooting projectiles and detecting collisions.
- Leaderboard: Displays a leaderboard to track player scores.
- HTML5: For structuring the game interface.
- CSS3: For styling the game elements.
- JavaScript: For game logic and client-side interactions.
- Node.js: For the server-side logic.
- Socket.IO: For real-time communication between the server and clients.
To run this project locally, follow these steps:
-
Clone the repository:
git clone https://github.com/whispernet/multiplayer-game-with-js.git
-
Navigate to the project directory:
cd multiplayer-game-with-js
-
Install dependencies:
npm install
-
Start the server:
node backend.js
-
Open your browser and navigate to:
http://localhost:3000
Throughout this project, I gained valuable insights into:
- Socket Programming: Learned how to use Socket.IO for real-time communication.
- Server-Client Architecture: Understood how servers and clients interact in a multi-user environment.
- Game Logic: Developed logic for player movement, collisions, and score tracking.
- Project Deployment: Learned how to deploy a project live and set up a custom domain.
- Enhanced Interpolation: Improved the smoothness and responsiveness of gameplay.