Giter VIP home page Giter VIP logo

xonode's Introduction

what it is

multiplayer tic tac toe game using websockets to communicate between players

Technical Requirements

  • a web based game, meaning cross compatability

  • live games between players

  • able to change username

  • view list of players searching for a game

  • styling will be one of the last things to be done as functionalit is going to be the main focus

done

screen controller

script to select which screen is visible cycles throught gameView class objects and makes them invisible then makes sure the target is visible showscreen function now accepts a callback function making general use easier due to using display none

user connection

user is added to liveusers object on connection user is made using user template class; user can store a preferred username in their browser localstorage all users are updated on user count

user disconnection

user is removed from liveusers object on disconnection message is sent to everyone in game rooms when player is disconnecting any game the user is in is ended any live games containing user are disconnected all users are updated on user count

opponent disconnection

when opponent disconnects user is redirected to page to inform them that they have been removed from a room

searching / game creation

when a user wants to search for a game client makes a request to server server adds liveuser to searchingusers server then uses the clients id to cycle through searchingusers and find and id that doesnt match it then adds both to a room and emits the game initial state game is added to live games live games is counted then sent to all users server then removes both users from searching users

game loop

if userid matches whos turn allow play click otherwise give notification to tell them client modifies gamefield locally then changes last turn info and sends to server server checks if there is a winner, if so emits winner package server sends game to both clients on game update both clients update the grid based on lastmove

game winner

server detects winning conditions winner package is sent to both clients game is removed from livegames and all users are updated on the count clients redirect to winnerpage and display winners info with button to home screen

needs fixing/doing

fix css for options fix css for playerleft fix css for winnerpage

have server tell client what to call next

xonode's People

Contributors

saucedontsauce avatar

Watchers

 avatar

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.