[Gametize Tech] API Knowledge: Minigame - “Whack a Mole”
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!”, the moles start to pop out of the holes randomly. The player will click on the moles (or tap on the moles on mobile devices) to whack them. Every successful whack on the mole will constitute one successful action.
Important: Spam Click/Tap Prevention
The player must not be allowed to click/tap on the same mole multiple times (spamming clicks/taps) for multiple successful actions.
The same mole can only be click/tapped again when it has disappeared back into the hole and pops out again in a different instance.
Every time a mole is missed (i.e. the mole has popped out but the player didn’t whack it on time), 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