Gameplay on Joyride
Joyride Platform & Unity Game Engine Interaction
When the user initiates the Gameplay request below process takes place between Joyride Platform & Unity Game Engine.
Matchmaking Screen I
User lands on the matchmaking screen
Matchmaking can have the following outcomes based on whether the -
- Match is found - Game Starts
- Match is not found - Aysnc Game Starts
Matchmaking Screen II
After matchmaking and before the start of the game the below process takes place between Joyride Platform and the Unity Game Engine for the client ready state
initGame(scene, assetLoaction)
call is made to the Unity engine in order to load the GameSceneOnSceneLoaded()
acknowledges the Joyride platform about the GameScene actually loadedRestart call is made to the Unity engine by Joyride Platform
Unity game engine acknowledges the Joyride platform using OnRestartCompletion or OnMatchFailed. It is expected that before the OnRestartCompletion is called, the game is in a ready state
- Joyride platform verifies the game readiness of all players. post which the player is taken to the Game Screen
Game Screen (Mini Game)
Game Screen UI contains the Mini Game
StartGamePlay is called by Joyride platform to Unity engine immediately when the player lands on the game screen. Unity game is expected to start after the call
Unity game engine acknowledges with the OnGameplayStarted for a successful start
During the gameplay below calls are made between the Unity engine and Joyride platform multiple times (n >= 0) for score updation
JRUpdateScore call by Unity engine updates the score multiple times during the game. If the GameAI is implemented on the client side the JRUpdateGameAIScore method is called
OnPlayersStateUpdated call by Unity engine is made in certain end game where state managenment is required. This is an optional method
CalculateScore method is called by Joyride platform to get current score.
OnGameAIGamePlayEnded call is to be made from Unity engine to Joyride platform when every GameAI's game ends
When the player game ends (if the player submits the score or timer runs out), final score screen should be shown and simultaneously OnGamePlayEnded call should be made from Unity engine
On clicking the final CTA on the Score screen, ShowResultScreen method is called from Unity engine. Once the result is prepared player is taken to the Final Result Screen
Final Result Screen
- Player leaves the Mini game and lands back to the Joyride UI where the Result is shown