GithubHelp home page GithubHelp logo

tiebreaker's Introduction

TieBreaker

A MERN stack application (with React Hooks) that contains useful tools for players to record scores and chat remotely. It utilizies Socket.io to let players make changes instantaneously.

TieBreaker

Features

  • Game unit counter ie: score/point/score display
  • Real-time chat
  • A real-time dice and coin flip feature.
  • A player chooser feature that picks connected players at random
  • Multiple game rooms for players to connect
  • The use of selenium for functional testing

Technologies

  • Socket.io
  • Node.js
  • React
  • React Hooks
  • Selenium

Data flow for app

* Any kind of update that happens on the client side should affect what the room will emit to server
    * The server has 2 main emits for client state: ['update player state', 'update game state']
    * An 'update player state'  emit should only emit to the client that changed it (this emit is mainly for identifying who the player and client is with server information... ideally we dont want to use player state to update game state).
    * Data flow for update game state (expect for player area inputs): 
        1. client updates state
        2. client calls 'update players' event
        3. server sends data back to clients (sender can be included or excluded based on noRender boolean)
    * 'update game state' should emit when anything happens that didn't originate from the local client (such as connected players or playerslist)
        * Client takes information on update game state to change the board
        * After any 'update game state' client should request server message

Backend objects

rooms {
    roomName:{
        roomID: '',
        roomName:""
        numUsers: 0,
        connectedPlayersList:[],
        broadcast: false,
        savedPlayers: {
            playerObj:{
                username: "",
                id: "",
                points: [['title','points']],
                password: "", 
                color: getUsernameColor(username),
                roomName: "",
                messages: [['Welcome To TieBreaker', undefined]]
            },
            ...
        },
        savedPlayersList:['playernames'],
        toBroadcast: {
            userJoined: "",
            userLeft: "",
            userRemoved: "",
        }

    }
}

Frontend State

    UserInfo {
        messages: [],
        Players: {},
        PlayersList: [],
        connectedPlayersList: [],
        username: "",
        score: 0,
        score2: 0,
        id: '',
        color: '',
        host: boolean,
    }

tiebreaker's People

Contributors

wolffles avatar felixalvarado avatar

Stargazers

 avatar

Watchers

James Cloos avatar  avatar  avatar

Forkers

felixalvarado

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.