[Gametize Tech] API Knowledge: Minigame - “Space Shooter: Shoot the Asteroids!”
FeaturedInitial Render
The minigame renders with the Start button rendered on top of it. The game is not interactable until the player clicks on “Start Now!”
Game Play
When the player clicks on “Start Now!”, asteroids start to fall down the screen. The player will move the rocket using the left/right arrows and shoot using the spacebar.
(For mobile devices, a left/right button and a “shoot” button must be rendered on the screen to perform these actions.)
Each time an asteroid collides with the rocket, one life is deducted.
End of Game
The game continues and only ends when the player runs out of lives.
At this point, an API call is made to indicate that the challenge has been completed for the player, with the number of successful actions taken.
Input parameters: session_key
, challenge_id
and actions
.
https://gametize.com/api2/action/complete.json?session_key=[SESSION_KEY]&challenge_id=[CHALLENGE_ID]&actions=[ACTION_COUNT]
Display Results
The player’s result will be displayed as follows (points
are retrieved from the API call above).
The player may no longer interact with the minigame at this point.
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