Installing the Plugin
Add the Addon to Your Project
- Download the plugin from https://github.com/WarpWorld/GodotCrowdControl.
- Copy the
addons/godotcrowdcontrolfolder into theaddonsfolder of your project, so that you end up withres://addons/godotcrowdcontrol/godotcrowdcontrol.gdextension. - Restart the editor.
The plugin is a GDExtension, so there is nothing to enable under Project Settings > Plugins. After the restart, the CrowdControl singleton and the CCEffect classes are available in every script.
TIP
The repository also contains a demo game (project/demo) with a login screen, an overlay, and one effect of each type. It is a good reference while following this tutorial.
Project Settings
Open Project > Project Settings and find the Crowd Control section.
Required
| Setting | Use |
|---|---|
crowd_control/common/app_id | The Application ID shown on your game's page in the developer portal. |
crowd_control/common/game_id | The Game Pack ID shown under Game Packs on the same page. It starts with x_. Your first game pack has the same ID as the game. |
crowd_control/common/game_name | The name of the game. |
crowd_control/common/effects | Path to your CCEffectEntries resource, see Creating a Basic Effect. Defaults to res://effects.tres. |
Leave the game's Integration mode in the portal on Public client (PKCE), which is the default. There is no application secret to put in the game.
A game can have several game packs, for example a demo beside the full game. Each has its own ID; set game_id to the one that build should use.
Login
| Setting | Default | Use |
|---|---|---|
crowd_control/common/auth/auto_open_url | on | Open the login page in the browser as soon as a login code arrives. Turn it off if your UI opens the URL itself. |
crowd_control/common/auth/persist_token | on | Remember the login in user://crowd_control.cfg so the streamer does not log in on every launch. |
crowd_control/common/auth/scopes | empty | Limit the scopes requested for the login. Leave empty to get every scope of the Application, which is what you want in almost every case. |
Behavior
| Setting | Default | Use |
|---|---|---|
crowd_control/common/game_version | empty | The version of your game, such as 1.2.0. Crowd Control uses it to load the pack version made for that build, see Game Versions. Falls back to application/config/version. |
crowd_control/common/retry_count | -1 | How often to try to reconnect after the connection drops. -1 means forever, 0 never. |
crowd_control/common/retry_delay | 5 | Seconds between reconnect attempts. |
crowd_control/common/delay_between_effects | 0.5 | Minimum seconds between two effects starting. |
crowd_control/common/process/process_mode | Process | Whether effects are processed on the process frame, the physics frame, or an internal thread. |
crowd_control/common/process/use_scene_tree_pause | off | Pause Crowd Control (and the timers of timed effects) whenever the scene tree is paused. |
Debug
crowd_control/debug/log_info, log_warn, log_error, and log_exception control what the plugin prints. Everything it prints starts with [CC].
Next Step
Continue with Connection & Login.
