happytime() method can be called on various player achievements (beating a boss, reaching a highscore, etc.). It makes the website celebrate (for example by launching some confetti). There is no need to call this when a level is completed, or an item is obtained.
We provide functions that enable us to track when and how users are playing your games. These can be used to ensure our site does not perform resource-intensive actions while a user is playing.
gameplayStart() function has to be called whenever the player starts playing or resumes playing after a break (menu/loading/achievement screen, game paused, etc.).
gameplayStop() function has to be called on every game break (entering a menu, switching levels, pausing the game, ...) don't forget to call
gameplayStart() when the gameplay resumes.
This feature lets you share the Crazygames version of your game with the players and invite them to join a multiplayer game. You can call
inviteLink with a map of parameters that correspond to your game or game room.
You can check for invite parameters with the
getInviteParameter() function as follows.