Skip to content

thomas-gg/SocketIOSpaceInvaders

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

socket-io p5jsgame

1. Getting Started

An understanding of JavaScript and NodeJS will be helpful, but this is a simple implementation showing simple characteristics of the technologies so this makes for a great beginning to understanding multiplayer gameplay. This project provides a template for chat communication and gameplay with socket rooms (of strictly 2 people, the number of people is editable).

2. Install/Run

Prerequisites:

Installed NPM and NodeJS

Install:

cd <Your Chosen Directory>
git clone https://github.com/thomas-gg/SocketIOSpaceInvaders.git
npm install (to install express and other dependencies)

Run:

npm run dev
OR
node index

3. Details

In order to begin the game you must have two clients connected. One way to do this is to have two Chrome windows open and both connect to the same room id (which can be any word you choose). If you have a mobile device which has chrome and is connected to the same wifi as what is running localhost, then you can connect to the game as well by typing "<your ipaddress>:3000"

EnterRoom

GamePlay

Author:

Resources:

About

This is a simple implementation of Socket.io to create rooms, limit room capacity, and send data over the server to enable two person gameplay for a p5.js game Simple for newcomers to learn Express/Node/p5.js.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors