Skip to content

A good starting point if you want to create a simple web multiplayer game based on ReactJS and NodeJS.

Notifications You must be signed in to change notification settings

IgorBayerl/web-multiplayer-template-next-node

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Multiplayer Web Game

  • Using Colyseus for the server
  • NextJS for the client

Project Structure

This project is divided into two primary sections:

  • client: This is the frontend of the application powered by Next.js.
  • server: This is the backend of the application handling API and data-related operations.

Additionally, there's a types folder which contains shared types and utilities that both the client and server might need access to.

Pre requisites

Before starting, ensure you have the following installed:

  1. NodeJS (version 20 or higher)
  2. pnpm (Performance-focused package manager)

Setting up the Project

  1. Clone the Repository

    Use the following command to clone the repository:

    git clone https://github.com/IgorBayerl/multiplayer-template.git
  2. Install Dependencies

    After cloning, navigate to the project directory and install the dependencies using pnpm:

    pnpm install
  3. Start the Development Servers

    To start the development servers:

    • For both client and server:

      pnpm dev
    • For only the server:

      pnpm dev-server
    • For only the client:

      pnpm dev-client

Happy coding!