GithubHelp home page GithubHelp logo

kunjkanani / multiplayer_tictactoe Goto Github PK

View Code? Open in Web Editor NEW

This project forked from aradhyanepal/multiplayer_tictactoe

0.0 0.0 0.0 410 KB

C++ 31.05% C 1.94% Objective-C 0.05% Kotlin 0.19% Dart 36.13% Swift 2.52% HTML 2.55% CMake 25.58%

multiplayer_tictactoe's Introduction

Credit:

First I want to thank OriginalRepo, from which I got the TicTacToe game code. The original game was single-user TicTacToe, from which I was inspired to make multi-user TicTacToe. The above repo contains many other exciting codings, so make sure to watch the repo, follow qubeena07, and give the repo a star.

Multiplayer TicTacToe

Flutter + Local Websocket + ❀️ = Multiplayer TicTacToe Game for Android and Windows

Unlike HTTP, Websocket allows developers to set up 2-way real-time data communication tunnel. Real-time means, whenever user 1 performs some action, user 2 gets notified, which is not possible in HTTP, except if you keep hitting the Get API every 1 second to refresh the latest data, which is very inefficient since it wastes lots of resources.

In this application, the host device runs ServerSocket on its IP address and on a specific port, and shares that with a QR. The client device needs to be connected to the same internet and needs to scan the QR to connect to the provided Server. And then you can start playing the game😊.

Not only that, while playing the game, to ensure that the data don't get lost in the middle, my application uses the Handshake mechanism (Handshake might not be its actual technical term), where one device sends the request to another and another device sends back a confirmation that it received the request.

So make sure to run the APK and review the code, and give me some feedback 😊.

Warning: Both devices must be connected to the same WIFI, else the client cannot connect to the server while scanning the QR.

APK: Touch Me!

LinkedIn Demonstration: Touch Me!

multiplayer_tictactoe's People

Contributors

aradhyanepal 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.