Skip to main content

Migrate hypercasual game to Elympics with web3 and telegram features

info

Detailed steps and rough implementation details can be found in the asynchronous game guide.

Assumptions

  1. Skill-based
    The outcome of a gameplay mostly depends on player’s skill and any luck is eliminated
  2. Score Outcome
    The outcome of a gameplay can be summarised in a single number that can be used to sort the leaderboard
  3. Deterministic level generation
    If a level is pseudo-randomly generated, it can be done repeatedly via the same level seed
  4. Gameplay in Unity 2021.3.5f1 or higher
  5. Game compatible with WebGL on mobile and Telegram Web
  6. Mobile input
  7. Discreet input in realtime gameplay All player inputs can be represented by discreet values (on / off). Analog inputs (like digital joysticks) introduce more challenges
  8. Limited physics simulation Physics is difficult to synchronise online, and prediction needs to be used extensively. While certainly possible, it’s not best for the first integration as it’s a little more difficult to do right.

Requirements & Integration Steps

1. Elympics Gameplay Integration

The gameplay needs to be fully integrated with Elympics Unity SDK. This means that the game needs to have a server-authoritative approach, where the client only sends inputs and the server reads and applies the inputs. Finally, the game has to be run online in Elympics Cloud, in parallel to the player’s device (browser).

  • Learning Resources:
  • Rough Steps:
    • Download SDK, add it to Unity project and configure it
    • Configure matchmaking queues using Elympics CLI
    • Extract the input logic
    • Separate input gathering from applying input on game simulation
    • Configure synchronised Game Objects and Variables according to the game’s needs
    • Configure client-side and server-side handlers to correctly manage game server state and player’s result
    • Submit scores
    • If applies: setup level generation randomness based on server-side generated level seed
  • Estimated Effort: 70%

2. Build delivery and storage

Your game build (client side) should be done for webGL and support Google Chrome. Only files that are needed are actual brotli-compressed files (without any embedding html or js code). You should then host your game client builds via our PlayPad.

  • Materials:
  • Estimated Effort: 10%

3. Menu Scene + Elympics Leaderboard integration

The menu scene of your game needs to correctly handle Elympics Lobby Client session to authenticate players with Elympics. This is done automatically by introducing Elympics objects on menu-scene level.

On top of that, you’ll need to use Leaderboard API to fetch current daily leaderboard state (nicknames and high-scores).

  • Materials:
  • Rough Steps:
    • Setup lobby client on menu scene to log in and download player’s context (nickname).
    • Fetch and display the leaderboard from a correct matchmaking queue and timestamps after entering the menu scene
    • Your menu at this step should at least contain:
      • Current leaderboard state with player’s position marked
      • Play button that launches an online gameplay
      • Error handling (matchmaking, match allocation, connection, etc, provided by the SDK)
      • Live lobby web socket connection handling (handle connection information from the SDK)
  • Estimated Effort: 10%

4. Menu Scene + Handle web3 sign in

Elympics needs to sign in players using their web3 wallet or other sign in methods. This is handled by the PlayPad which the game should be embedded into.

  • Elympics Web App functionalities:
    • Sign in players (on request)
    • Handle web3 connection
    • Inform Unity SDK about session events (need to be handled by game Menu)
    • Embed webGL Unity build with appropriate layout for desktop and mobile browsers, including Telegram
  • Elympics Unity SDK functionalities:
    • Communicate with Elympics Web App using a custom protocol
    • Send user intents regarding session events (i.e. “sign in” button command)
    • Provide player’s nickname and ETH address after establishing a connection to the Web App
  • Your menu at this step should ALSO contain:
    • Player’s nickname (when signed in)
    • Player’s ETH address (when signed in)
  • Estimated Effort: 10%
tip

Detailed steps and rough implementation details can be found in the asynchronous game guide.

5. Finalizing game project steps within a contract with Elympics

  1. Upload the final build candidate to the PlayPad and let us know which version it is. Do not label the build as a final candidate if you are not confident it is finished.
  2. If the build is a final candidate, the game goes through the QA process to determine if all requirements are met and if it is of sufficient quality. QA team will receive requirements list from the supporting developer beforehand.
  3. QA states if the game should be accepted and provides list of feedbacks if it is not. Then the supporting developer forwards such list to the game developer. QA will test with the desktop, mobile (Android and IOS) browsers and on Telegram Web.
  4. If QA accepts the build, the code will be checked by the supporting developer for meeting basic networking requirements. It comprises but is not limited to: correct logging in flow with regions, no security issues, proper seed and randomization system, proper input handling and gameplay synchronization, synchronous game starting and correct finalizing it.
  5. If the code is accepted, we then ensure that the game repository is copied to our internal repository and then inform when it is done.

After that, the game development is completed!