[Gametize Tech] API Knowledge: Minigame - Maze
FeaturedData for front-end
-
Challenge ID -
long
-
Challenge title -
String
-
Challenge description -
String
-
Image (to render as background) -
String
-
Difficulty level -
int
(1 for easy, 4 for extreme)
Front-end Rendering
We have found a script that:
1. Renders a random maze for the player each time the game loads
2. Supports 4 difficulty levels
Initial Render
Depending on the difficulty level returned for the challenge, the maze renders accordingly. In the example below, the maze renders with a difficulty level of 1
(Easy).
The maze is not interactable until the player clicks on “Start Now!”
Game Play
When the player clicks on “Start Now!”, the player may use the left/right/up/down keys to move the character around the maze.
The game continues, and the player is allowed to move the character until the character reaches the “End” point.
End of Game
The game ends only when the player has successfully moved the character to the “End” point.
At this point, an API call is made to indicate that the challenge has been completed for the player.
Input parameters: session_key
and challenge_id
.
https://gametize.com/api2/action/complete.json?session_key=[SESSION_KEY]&challenge_id=[CHALLENGE_ID]
Display Results
The player’s result will be displayed as follows. The points
are retrieved from the API call above, whereas the number of steps is determined by the maze script as it keep tracks of the players' movements.
The player may no longer interact with the maze at this point.
There is no relationship between the number of steps taken and the number of points earned for the game. The same points are awarded by the backend (determined by the challenge points
) regardless of the number of steps taken.
Note:
The article's technical specifications and details are subject to potential changes based on our discretion. It is important to note that the information presented in the article might have become outdated or lost its relevance in the present context.
If you are interested to learn more about this, please drop an email to support@gametize.com with your queries regarding the article!
Please sign in to leave a comment.
Comments
0 comments