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

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

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

See parameters
  • 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.

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

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

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

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

See parameters

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

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
  • Parameter 1 (string): Room id

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

Generate Xsolla token
Generate Xsolla token.

See parameters

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

Hide all banners
Hide all banners.

See parameters

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

Hide a banner
Hide a banner.

See parameters
  • Parameter 1 (string): Banner name

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

Hide invite button
Hide the invite button.

See parameters

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

Display invite button
Display an invite button.

See parameters
  • Parameter 1 (string): Room id

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

Show account link prompt
Show account link prompt.

See parameters

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

Load SDK
Load CrazyGames SDK.

See parameters

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

Save session data
Save the session data.

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

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

Scan for ad blockers
Scan for ad blockers.

See parameters

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

Gameplay started
Let CrazyGames know gameplay started.

See parameters

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

Gameplay stopped
Let CrazyGames know gameplay stopped.

See parameters

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

Loading started
Let CrazyGames know loading started.

See parameters

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

Loading stopped
Let CrazyGames know loading stopped.

See parameters

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

Show CrazyGames login window
Show CrazyGames login window.

See parameters

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

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

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

Conditions

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

See parameters

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

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

See parameters

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

CrazyGames User ID
Compare the CrazyGames User ID.

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

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

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

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

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

See parameters

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

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

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

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

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

See parameters

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

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

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

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

User changed
Check if the user changed.

See parameters

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

Username
Compare the username.

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

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

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

See parameters

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

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.