GithubHelp home page GithubHelp logo

simondiep / node-multiplayer-snake Goto Github PK

View Code? Open in Web Editor NEW
133.0 133.0 204.0 525 KB

A multiplayer snake game built on NodeJs, Express, socket.io. Minimal with no build process.

Home Page: https://node-multiplayer-snake.herokuapp.com/

License: MIT License

JavaScript 92.03% CSS 4.03% HTML 3.94%
canvas-game gamedev multiplayer preview snake-game

node-multiplayer-snake's People

Contributors

simondiep avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

node-multiplayer-snake's Issues

Crash after restarting while people are playing

Expected Behavior

When I turn off the server while people are playing, then turn it back on, things should run back to normal.

Current Behavior

Sometimes crashes when starting up when you already have people attempting to connect.

Steps to Reproduce (for bugs)

  1. Start up server initially
  2. Have people connect and play on it
  3. Turn off server while people are connected and playing
  4. Turn server back on.

Your Environment

Chrome Version: 53.0.2785.144, node.js 7.0

The error I came across goes:

Express server listening on port 3000 in development mode
/home/alento/snakegame/app/services/game-controls-service.js:42
const validNextDirections = this.getValidNextMove(player.directionBeforeMove);
^

TypeError: Cannot read property 'directionBeforeMove' of undefined
at Function.handleKeyDown (/home/alento/snakegame/app/services/game-controls-service.js:42:65)
at GameController._keyDown (/home/alento/snakegame/app/controllers/game-controller.js:146:29)
at emitOne (events.js:96:13)
at Socket.emit (events.js:188:7)
at Socket.onevent (/home/alento/snakegame/node_modules/socket.io/lib/socket.js:348:8)
at Socket.onpacket (/home/alento/snakegame/node_modules/socket.io/lib/socket.js:308:12)
at /home/alento/snakegame/node_modules/socket.io/lib/client.js:195:16
at _combinedTickCallback (internal/process/next_tick.js:67:7)
at process._tickCallback (internal/process/next_tick.js:98:9)

Note that playing normally works completely fine from what I can see, it's only when I'm restarting while people are playing that this occurs.

System.js missing

I tried to setup it on my local but it shows that system.js is missing. Any clue

Does not working for me

Expected Behavior

Working game

Current Behavior

Black screen

Possible Solution

Steps to Reproduce (for bugs)

  1. Downloaded latest windows nodejs
  2. npm install && npm test && npm run
  3. Go to localhost:3000
  4. PROFIT!

Context

Your Environment

  • Version used: latest? from github?
  • Environment name and version (e.g. Chrome 39, node.js 5.4): Firefox 44, node 8.11.4
  • Operating System and version (desktop or mobile): Windows 8.1
  • Link to your project:

Bots often run into themselves

Bots currently move after certain intervals. This sometimes results in them creating a perfect square, and running into themselves if they are long enough.

The website no longer works at all.

The website now says that it can't be served.

Expected Behavior

-Go to the website
-Loads directly into the game

Current Behavior

-Go to the website
-Loads into website and shows Application error
An error occurred in the application and your page could not be served. If you are the application owner, check your logs for details. You can do this from the Heroku CLI with the command
heroku logs --tail

Possible Solution

Go to herokuapp and see if you can check for a bug in the code

Steps to Reproduce (for bugs)

  1. Go to github page
  2. Click on snake website
  3. Page comes up

Context

-I wanted to play with some others however even after 3 hours it still does not work.

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.