Skip to content

CrazyGames SDK v3

Allow games to be hosted on CrazyGames website, display ads and interact with CrazyGames user accounts.

Authors and contributors to this experimental extension: planktonfun, Bouh, ZachjuKamashi, lhphr, Jurfix.


Refer to the CrazyGames guide for a full overview of the CrazyGames SDK, and to this guide for using this SDK inside your GDevelop game.

Read more...

Tip

Learn how to install new extensions by following a step-by-step guide.

Actions

Retrieve user data
Retrieve user data.

See parameters & details

There are no parameters to set for this action.

Technical note: parameters 0, 1 are internal parameters handled by GDevelop.

Technical note: this action internal type (in GDevelop JSON) is CrazyGamesAdApi::AuthenticateUser.

Display a banner
Display a banner that can be called once per 60 seconds.

See parameters & details
  • Parameter 1 (string): Banner name
  • Parameter 2 (🔤 String): Ad size (one of: "970x90", "320x50", "160x600", "336x280", "728x90", "300x600", "468x60", "970x250", "300x250", "250x250", "120x600")
  • Parameter 3 (🔢 Number): Position X
  • Parameter 4 (🔢 Number): Position Y

Technical note: parameters 0, 5 are internal parameters handled by GDevelop.

Technical note: this action internal type (in GDevelop JSON) is CrazyGamesAdApi::DisplayBanner.

Display video ad
Display a video ad. The game is automatically muted while the video is playing.

See parameters & details
  • Parameter 1 (🔤 String): Ad Type (one of: "midgame", "rewarded")

Technical note: parameters 0, 2 are internal parameters handled by GDevelop.

Technical note: this action internal type (in GDevelop JSON) is CrazyGamesAdApi::DisplayCrazyGamesAd.

Display happy time
Display an happy time by emitting sparkling confetti. The celebration should remain a special moment.

See parameters & details

There are no parameters to set for this action.

Technical note: parameters 0, 1 are internal parameters handled by GDevelop.

Technical note: this action internal type (in GDevelop JSON) is CrazyGamesAdApi::DisplayHappyTime.

Generate an invite link
Generate an invite link to invite friends to join your game sessions. This URL can be added to the clipboard or displayed in the game to let the user select it.

See parameters & details
  • Parameter 1 (string): Room id

Technical note: parameters 0, 2 are internal parameters handled by GDevelop.

Technical note: this action internal type (in GDevelop JSON) is CrazyGamesAdApi::GenerateInviteLink.

Generate Xsolla token
Generate Xsolla token.

See parameters & details

There are no parameters to set for this action.

Technical note: parameters 0, 1 are internal parameters handled by GDevelop.

Technical note: this action internal type (in GDevelop JSON) is CrazyGamesAdApi::GenerateXsollaToken.

Hide all banners
Hide all banners.

See parameters & details

There are no parameters to set for this action.

Technical note: parameters 0, 1 are internal parameters handled by GDevelop.

Technical note: this action internal type (in GDevelop JSON) is CrazyGamesAdApi::HideAllBanners.

Hide a banner
Hide a banner.

See parameters & details
  • Parameter 1 (string): Banner name

Technical note: parameters 0, 2 are internal parameters handled by GDevelop.

Technical note: this action internal type (in GDevelop JSON) is CrazyGamesAdApi::HideBanner.

Hide invite button
Hide the invite button.

See parameters & details

There are no parameters to set for this action.

Technical note: parameters 0, 1 are internal parameters handled by GDevelop.

Technical note: this action internal type (in GDevelop JSON) is CrazyGamesAdApi::HideInviteButton.

Display invite button
Display an invite button.

See parameters & details
  • Parameter 1 (string): Room id

Technical note: parameters 0, 2 are internal parameters handled by GDevelop.

Technical note: this action internal type (in GDevelop JSON) is CrazyGamesAdApi::InviteButton.

Show account link prompt
Show account link prompt.

See parameters & details

There are no parameters to set for this action.

Technical note: parameters 0, 1 are internal parameters handled by GDevelop.

Technical note: this action internal type (in GDevelop JSON) is CrazyGamesAdApi::LinkAccount.

Load SDK
Load CrazyGames SDK.

See parameters & details

There are no parameters to set for this action.

Technical note: parameters 0, 1 are internal parameters handled by GDevelop.

Technical note: this action internal type (in GDevelop JSON) is CrazyGamesAdApi::LoadSDK.

Save session data
Save the session data.

See parameters & details
  • Parameter 1 (string): Id
  • Parameter 2 (string): Value

Technical note: parameters 0, 3 are internal parameters handled by GDevelop.

Technical note: this action internal type (in GDevelop JSON) is CrazyGamesAdApi::SaveSessionData.

Scan for ad blockers
Scan for ad blockers.

See parameters & details

There are no parameters to set for this action.

Technical note: parameters 0, 1 are internal parameters handled by GDevelop.

Technical note: this action internal type (in GDevelop JSON) is CrazyGamesAdApi::ScanForAdBlockers.

Gameplay started
Let CrazyGames know gameplay started.

See parameters & details

There are no parameters to set for this action.

Technical note: parameters 0, 1 are internal parameters handled by GDevelop.

Technical note: this action internal type (in GDevelop JSON) is CrazyGamesAdApi::SetGameplayStarted.

Gameplay stopped
Let CrazyGames know gameplay stopped.

See parameters & details

There are no parameters to set for this action.

Technical note: parameters 0, 1 are internal parameters handled by GDevelop.

Technical note: this action internal type (in GDevelop JSON) is CrazyGamesAdApi::SetGameplayStopped.

Loading started
Let CrazyGames know loading started.

See parameters & details

There are no parameters to set for this action.

Technical note: parameters 0, 1 are internal parameters handled by GDevelop.

Technical note: this action internal type (in GDevelop JSON) is CrazyGamesAdApi::SetLoadingStarted.

Loading stopped
Let CrazyGames know loading stopped.

See parameters & details

There are no parameters to set for this action.

Technical note: parameters 0, 1 are internal parameters handled by GDevelop.

Technical note: this action internal type (in GDevelop JSON) is CrazyGamesAdApi::SetLoadingStopped.

Show CrazyGames login window
Show CrazyGames login window.

See parameters & details

There are no parameters to set for this action.

Technical note: parameters 0, 1 are internal parameters handled by GDevelop.

Technical note: this action internal type (in GDevelop JSON) is CrazyGamesAdApi::ShowAuthWindow.

Check and load if an user is signed in CrazyGames
Check if an user is signed into CrazyGames. If signed in, retrieves username and profile picture.

See parameters & details

There are no parameters to set for this action.

Technical note: parameters 0, 1 are internal parameters handled by GDevelop.

Technical note: this action internal type (in GDevelop JSON) is CrazyGamesAdApi::UserSignIn.

Conditions

Video ad just finished playing
Checks if a video ad just finished playing successfully.

See parameters & details

There are no parameters to set for this condition.

Technical note: parameters 0, 1 are internal parameters handled by GDevelop.

Technical note: this condition internal type (in GDevelop JSON) is CrazyGamesAdApi::AdFinishedPlaying.

Video ad had an error
Check if a video ad had an error.

See parameters & details

There are no parameters to set for this condition.

Technical note: parameters 0, 1 are internal parameters handled by GDevelop.

Technical note: this condition internal type (in GDevelop JSON) is CrazyGamesAdApi::AdHadAnError.

CrazyGames User ID
Compare the CrazyGames User ID.

See parameters & details
  • Parameter 1: 🟰 Relational operator
  • Parameter 2 (string): Value to compare

Technical note: parameters 0, 3 are internal parameters handled by GDevelop.

Technical note: this condition internal type (in GDevelop JSON) is CrazyGamesAdApi::CrazyGamesUserID.

Ad blocker is detected
Check if user is using an ad blocker. This condition is always false before the "Scan for ad blockers" is called.

See parameters & details

There are no parameters to set for this condition.

Technical note: parameters 0, 1 are internal parameters handled by GDevelop.

Technical note: this condition internal type (in GDevelop JSON) is CrazyGamesAdApi::IsAdBlocked.

CrazyGames SDK is ready
Check if the CrazyGames SDK is ready to be used.

See parameters & details

There are no parameters to set for this condition.

Technical note: parameters 0, 1 are internal parameters handled by GDevelop.

Technical note: this condition internal type (in GDevelop JSON) is CrazyGamesAdApi::IsSDKLoaded.

Is user account available
Compare the availability of the user's account.

See parameters & details
  • Parameter 1: 🟰 Relational operator
  • Parameter 2 (string): Value to compare

Technical note: parameters 0, 3 are internal parameters handled by GDevelop.

Technical note: this condition internal type (in GDevelop JSON) is CrazyGamesAdApi::IsUserAccountAvailable.

Video ad is playing
Checks if a video ad is playing.

See parameters & details

There are no parameters to set for this condition.

Technical note: parameters 0, 1 are internal parameters handled by GDevelop.

Technical note: this condition internal type (in GDevelop JSON) is CrazyGamesAdApi::IsVideoAdPlaying.

Get last error
Compare the last error from the CrazyGames API.

See parameters & details
  • Parameter 1: 🟰 Relational operator
  • Parameter 2 (string): Value to compare

Technical note: parameters 0, 3 are internal parameters handled by GDevelop.

Technical note: this condition internal type (in GDevelop JSON) is CrazyGamesAdApi::LastError.

User changed
Check if the user changed.

See parameters & details

There are no parameters to set for this condition.

Technical note: parameters 0, 1 are internal parameters handled by GDevelop.

Technical note: this condition internal type (in GDevelop JSON) is CrazyGamesAdApi::UserChanged.

Username
Compare the username.

See parameters & details
  • Parameter 1: 🟰 Relational operator
  • Parameter 2 (string): Value to compare

Technical note: parameters 0, 3 are internal parameters handled by GDevelop.

Technical note: this condition internal type (in GDevelop JSON) is CrazyGamesAdApi::UserName.

User is signed in
Check if the user is signed in.

See parameters & details

There are no parameters to set for this condition.

Technical note: parameters 0, 1 are internal parameters handled by GDevelop.

Technical note: this condition internal type (in GDevelop JSON) is CrazyGamesAdApi::UserSignedIn.

Expressions

Expression Description
CrazyGamesAdApi::CrazyGamesUserID() Return the CrazyGames User ID.
CrazyGamesAdApi::Environment() Get the environment.
CrazyGamesAdApi::InviteLink(string) Return an invite link.
string Room id
CrazyGamesAdApi::InviteParam(string) Get invite parameters if user is invited to this game.
string Param
CrazyGamesAdApi::IsDisableChat() Return true if the user prefers the chat disabled.
CrazyGamesAdApi::IsInstantMultiplayer() Return true when the user prefers to instantly join a lobby.
CrazyGamesAdApi::IsUserAccountAvailable() Return the availability of the user's account.
CrazyGamesAdApi::LastError() Return the last error from the CrazyGames API.
CrazyGamesAdApi::LinkAccountResponse() Get link account response.
CrazyGamesAdApi::ProfilePic() Gets the signed-in user's profile picture URL.
CrazyGamesAdApi::SessionData(string) Get user session data, if there is no saved data, "null" will be returned.
string Id
CrazyGamesAdApi::SystemInfo() Retrieves user system info, browser, version and device.
CrazyGamesAdApi::UserName() Return the username.
CrazyGamesAdApi::UserToken() Retrieve the user's session token for authentication.
CrazyGamesAdApi::XsollaToken() Retrieve the authentication token from Xsolla.

This page is an auto-generated reference page about the CrazyGames SDK v3 extension, made by the community of GDevelop, the open-source, cross-platform game engine designed for everyone. Learn more about all GDevelop community-made extensions here.