PlayPad SDK
What is PlayPad SDK?
PlayPad SDK is a Unity package providing integration with PlayPad, which is a tool that hosts WebGL game builds, allowing cross-play between any mobile device, desktop and even Telegram. It also serves as an interface for Web3 integration, allowing players to authenticate with their Web3 Wallet, check its state, sign data and perform transactions.
Those features combined let us create competitive environment that gaming has never seen before!
Available uses of Web3 integration
Feature | Description |
---|---|
Web3 Wallet authentication | Regardless of played game or used device, players get to keep their identity and progress, allowing to identify themselves in the leaderboards. It also engages players in various other activities offered by Elympics, like achievements. |
Launching a game in Telegram | Reach vast Telegram community with built-in Telegram Bot integration, identify them using Telegram authentication and linked Web3 Wallet, use TON and provide even greater security for your game. |
Wallet & Elympics data fetching | Players are able to see their nickname, wallet address, balance and Trust in game. |
Battle wallet | Provides security to players' funds by ensuring no lost bet can be left unpaid. Players still own their deposits and can withdraw them at any time (except when in gameplay). |
Duels with bets | Allows players to play competitive matches with their friends or random opponents, with real cryptocurrency at stake. Both players bet equal amounts and the winner takes all. |
NFT checking | Customize your game using NFTs, be it cosmetic items or features impacting the gameplay! |
Managing tournaments | Organize tournaments with entry fee and leaderboards. After a tournament concludes, its top players share the prize pool. Note that randomization can be set to be the same for all the contestants to ensure fair competition. |
Target platforms
The PlayPad SDK package is meant to work only with WebGL builds hosted on PlayPad.
Although the build is made for WebGL, thanks to PlayPad, players can run the game not only in desktop browsers, but on mobile browsers and inside Telegram too!
Take note about WebGL limitations and be careful not to use WebGL-incompatible code or assets (for example some shaders won't work).
Setup
To use the package, import https://github.com/Elympics/playpad-sdk.git
using Unity Package Manager.
Note that this package's newest version in general requires the newest version of Elympics SDK to work correctly. With that in mind, when you update the package, update Elympics SDK too.
Implementation guide
For now, there are two generally-supported types of games you can create using the package: asynchronous and duel.
Authentication, identification and data fetching features are universal and can be used regardless of the game type.
Please note that some features, such as showing tournament rewards button, will not work in the Editor as they rely on communication with PlayPad, which handles the logic on its side.
To simulate some of PlayPad behaviours, you can adjust referenced Standalone Configs in PlayPadCommunicator
component, which are used only in the Editor.
You can read more about Standalone Configs in the integration guide.
Asynchronous game
Asynchronous games are meant to be playable solo, where players compete for the highest score in the leaderboards. Although such games are basically singleplayer in their nature, client-server architecture fills the role of an anti-cheat mechanism needed for secure and reliable match results gathering. With such confidence in the data, real competitiveness with the money on stake can be provided in the form of tournaments.
If you want to learn how to set up package integration for such a game, check out its scope and requirements and import the sample as per the integration guide.
Duel
Duels are games where two players compete with each other to determine a winner among them. Such matches can have money at stake in the form of bets that players place at the beginning of the game. For that they need to have a battle wallet set up first.
A great example you can check out is Clash of Orbs.