Skip to content

Real-time multiplayer game engine using Node.js and Socket.IO, featuring a customizable player class and movement mechanics.

Notifications You must be signed in to change notification settings

meteoncu/nodejs-socketio-multiplayer-realtime-game-engine

Repository files navigation

Multiplayer Real-Time Browser Game

This is a Node.js-based game engine for a multiplayer real-time browser game. Players can join the game, move around the game area, collect feeds, avoid traps, and attack other players.

Getting Started

Prerequisites

Node.js (version 14 or higher recommended) npm (usually comes with Node.js)

Installation

Clone the repository:

Install the required dependencies:

  • npm install

Start the game server:

node server.js The server will start running on the specified port (default is 3000).

Game Mechanics

  • Joining the Game: Players can join the game by connecting to the server. They will be assigned a random position in the game area.
  • Moving: Players can move around the game area by setting a destination. The server will update their position based on their speed.
  • Feeds: Feeds are randomly placed in the game area. Players can collect feeds to increase their energy.
  • Traps: Traps are also randomly placed in the game area. Players should avoid traps, as they can reduce their speed and energy.
  • Attacking: Players can attack other players within a certain range. Successful attacks can reduce the health of the target player.
  • Scoring: Players earn points by collecting feeds and attacking other players. The game maintains a leaderboard based on the players' scores.

Configuration

The game's configuration can be found in the config.js file. You can modify the game settings such as the game area size, player speed, feed interval, and more.

Contributing

Contributions are welcome! Feel free to fork the repository, make changes, and submit pull requests.

About

Real-time multiplayer game engine using Node.js and Socket.IO, featuring a customizable player class and movement mechanics.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published