Coder Social home page Coder Social logo

verde's People

Contributors

aty1998 avatar denpang avatar dependabot[bot] avatar jakeisnt avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

tommy-mor denpang

verde's Issues

Improve provided hooks

"TODO: combination of useUser and useSocket hook that provides some user data"
Is this worthwhile?

update and enhance documentation

to onboard people onto the project and encourage greater participation, documentation has to be enhanced and updated to ensure that people new to javascript, react, whatever they want to work on in this repository is easy to use and well documented

Enable private user state

Currently, the state of each user is broadcast to every single user (or not at all). This is not ideal. Users need to be able to have some private state (for example, their hand in a game of cards), as well as a public state that is visible to everyone.

This requires:

  • A way to individually message users or a way to encrypt data that only one of the users can decrypt
  • A way to separately store public and private user state in the Game engine
  • API modifications to make it easy to work with. Explore existing ideas for this!

Worth considering:

  • More settings for the game API to enable/disable these behaviors

show network error to client when http requests fail

ie: client is loaded but the user doesn't have internet connection or the server isn't started, and the client isn't currently in a room

  • catch the http error rather than letting it silently fail and print to console
  • send the client back to the main page
  • show the client an error telling them that they've been disconnected from the network

games should specify min and max number of players

the 'game.js' configuration object should have two optional fields to specify the minimum and maximum number of players for a game. the max number of players is min(moderator declared max, server declared max).

  • the maximum number of players should be presented to the person creating the room while they choose the (optional) number of players
  • when the maximum number of players has been reached, the server should refuse to add any more players to the game. any spectators are stuck as spectators and cannot be made players by anyone.
  • when the minimum number of players is not met, the game cannot be started until there are at least that many users; the 'start game' button should be greyed out with a tooltip or other message on the client side until the minimum number of players constraint has been met.

upgrade backend to es6

it is currently a commonjs module and can likely be upgraded to use - at the least - consistent import and export syntax.

Enable private game state

Store private game logic that can be seen by the game configuration language on the server side but not by any client.

support chess

totally doable with the current game state, though may be annoying to implement the frontend
dependent on #34, as games can only have two players

improve logging

switch to using winston from morgan
replace all console logs with calls to winston
hide all logging on frontend in prod, minimal on backend

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.