GithubHelp home page GithubHelp logo

jimlynchcodes / room-walkers Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 1.0 8.28 MB

Simple JavaScript 2D Top-Down MMO with Phaser & Websockets

License: GNU General Public License v3.0

JavaScript 99.89% HTML 0.11%

room-walkers's Introduction

Room Walkers

Simple JavaScript 2D Top-Down MMO with Phaser & Websockets

Backstory

This is the second example in my NodeJs Websockets Online Multiplayer Game series. You can find the first example here.

What It Is

This project is made up of two parts: the server code and hte client code. The server code is sort of just a never-ending NodeJS process that you could run on any linux instance (or locally in a command line window to test it out).

The client, in this case, is an application that runs in the browser and is meant to be controlled by a desktop keyboard. When the client loads up, the map appears with no characters. The user can then type his or her name into the input box in the upper left corner and click the "Play!" button. This will create a character on the screen that the user can control. All users who connect to the server join the same room meaning that others can see this user walk around, and from the client you can see other users connected. There is no messaging or attacking in this simple example; you just walk around. ;)

Usage

Server

  1. Navigate into the server folder in your command shell.

cd server

  1. Install dependencies.

npm install

  1. Run Server File.

node room-walker-server.js

Client

  • Note: Make sure server is running before trying to connect from client.
  1. Navigate into client folder.

cd client

  1. Install dependencies.

npm install

  1. Run a local webserver to host the client.

For example, you could use the python simple server:

python -m SimpleHTTPServer [port]

Then navigate in your browser to *http://0.0.0.0:[port]

where you would replace "[port]" with the actual port number you used when starting the server (default is usually 8080).


This project became the basis for a game I created called Game of Ninja.

room-walkers's People

Contributors

homeboxjim avatar jimlynchcodes avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

krambambula

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.