D

Decentralized 3 Patti ( For Matic and Portis )

A decentralized, multiplayer, browser-based (without any sign-up or information sucking stuff) version of the game 3 Patti .✌🏻

D

Decentralized 3 Patti ( For Matic and Portis )

A decentralized, multiplayer, browser-based (without any sign-up or information sucking stuff) version of the game 3 Patti .✌🏻

The problem Decentralized 3 Patti ( For Matic and Portis ) solves

  1. Before the pandemic 3-patti used to be one of our favourite card games, and there is no web-based multi-player 3-patti application online currently(guess everyone likes poker after all).
    So we decided to make one ourselves modelling our application on the more popular skribble.io.

  2. There is no user sign-up required for playing in our application, the user only needs to connect using their wallet providing complete anonymity to the user.

  3. Trust and fraud-prevention being topmost priorities in any such application, we decided to go ahead with a blockchain based solution.

  4. Smart contract based solution ensure no-player bets more many than his/her account,
    Moreover all transactions are handled by smart contract to enforce rules of the game(such as transferring money to pot for placing bet).

  5. The smart contract handling game rules and transactions is deployed on MATIC Network for fast and cheaper transactions, since transactions are part of the game, slow transactions can impact the speed of game(we used MATIC testnet for demonstration).

  6. Portis as our wallet option ensures a simple to use interface for our users using just email and password, Portis also allows users the option of automatically confirming the transactions, thereby preventing popup's and confirmation for smoother game play.

  7. Metamask is other simple to use browser wallet in addition to portis which we have integrated giving another option for players to connect wallet.

Challenges we ran into

  1. Since we are using sockets for sharing gameplay data between client and server one major hurdle was a synchronization of these events among all clients of the same room.

  2. This synchronization further became difficult when we added smart contract interaction for which we added events in smart contracts and listened for these events and selectively sent this event to clients of the same room.

  3. There was also a version conflict of web3 when we tried to integrate both Metamask and Portis in our game which caused syntax problems in our code.

  4. Other challenges were specific to the game like implementing the side show functionality and many such things.

Discussion