2. Development Requirements (SDK Application Guide)
A. Integrating Your Game with Our Platform
VersusNow is a streaming service platform. Using the provided VersusNow SDK (Software Development Kit), you can effortlessly offer your game on the VersusNow platform, regardless of the device. The VersusNow Software Development Kit (SDK) provides developers with the necessary tools and resources to integrate their games with our platform. By applying the SDK to your project, you can ensure that your game is compatible with the features of our platform. We have prepared a step-by-step guide to walk you through the integration process, covering two possible scenarios: one for using Unity and another for not using Unity.
- The game must be developed in the form of an executable file (.exe) that can run on PC environments.
- The game must be in full-screen mode and should not allow mode switching.
- The game's aspect ratio should be 9(horizontal):16(vertical) or 16(vertical):9(horizontal). (Currently, vertical aspect ratio is supported, with support for horizontal aspect ratio planned for the near future.)
- The game should not include tutorials or help screens.
- After calling the GameStart API, the game must wait for the player to tap before gameplay begins.
- The game should not be closed or restarted when submitting game results. The game will be terminated by the API. You may provide a screen such as "Thank you for playing."
- Strictly prohibit the integration of pause or extension features that allow users to interrupt or extend gameplay beyond the specified time limit (e.g., pausing the time limit through in-game menus or options is not allowed).
- Since VersusNow is a paid competitive platform, the game must not include any advertising modules.
B. Application Guide for Different Game Engines
The VersusNow Software Development Kit (SDK) supports both Unity Engine and other game development engines, and the guidance for each engine integration is as follows:
1) Scenario A : Using Unity
- Add the VersusApi.cs file: To initiate the integration process, download and add the VersusApi.cs file to your script folder. This file contains the necessary functionalities and methods for SDK integration.
- Call the GameStart() function: In your game client code, find the point where the execution has completed loading. At this stage, you should call the GameStart() function from VersusApi. This function sends a signal to start the streaming process.
- Report Game Results: When you have access to the game result scores, call the GameResult(score) function from VersusApi. Ensure that the score is provided in integer format. This step is to properly handle and process game results.
- Get Random Seed: The GetRandomKey() function provides a seed to ensure that all players in the same arena can play the same game.
2) Scenario B: For Engines Other Than Unity
- Obtain Input Values: In this scenario, the game client should receive command-line arguments to capture values such as "gameId," "entryFee," "jwtToken," "coinType," and "matchUuid." Ensure that your game client correctly captures these values before proceeding.
- Call the Game Start API: After the game client loading is complete, you must call the Game Start API. Send an HTTP POST request to the following URL: http://localhost:8000/start/game. Include the "game_id," "player_jwt," and "match_uuid" parameters in the request body. This API call signals that the game streaming is ready to begin.
- Reporting Game Results: Similarly, when the game client has completed execution and has access to the game result scores, you report the results through an API call. Send an HTTP POST request to the following URL: http://localhost:8000/result/game. The request body should include the parameters "game_id," "player_jwt," "match_uuid," and "score" (a number). By providing these values, the SDK can handle the results and process the required actions on the platform accordingly.
Following these step-by-step instructions will allow you to successfully integrate the SDK into your project.
C. Game Build Updates (Including SDK Updates)
If there are updates to the game (including applying the latest SDK build), you must resubmit the game with the update details specified.