SDK Provider Profile¶
The Scorbit SDK requires specific device information for proper initialization and authentication. This information is provided through a Config object that establishes the identity and configuration of your game installation. Every unique manufacturer or developer of games is assigned a platform-wide identity string known as a provider. This identity tells Scorbit what it needs to know to properly authenticate. When combined with a machineId, we know everything required to pair the machine to the platform.
Provider
The provider is a unique identifier for your organization, and is assigned by Scorbit. For example, your provider may be "scorbitron", "vpin", or "sternpinball".
Device Configuration¶
Optional fields can be left empty or set to zero if not applicable. The SDK uses a Config builder pattern to set device information before creating the game state.
// Create a config object
sb_config_t config = sb_config_create();
// Set required parameters
sb_config_set_provider(config, "scorbitron");
sb_config_set_machine_id(config, 4419);
sb_config_set_game_code_version(config, "1.12.3");
// Set optional parameters
sb_config_set_hostname(config, "production"); // Default: "production"
sb_config_set_serial_number(config, 0);
sb_config_set_auto_download_player_pics(config, false);
sb_config_set_score_features(config, G_SCORE_FEATURES, G_SCORE_FEATURES_COUNT,
G_SCORE_FEATURES_VERSION);
// Set authentication (see Signing and Key Storage)
sb_config_set_encrypted_key(config, encrypted_key);
// Create game state from config
sb_game_handle_t gs = sb_create_game_state(config);
// Config can be destroyed after creating the game state (data is copied)
sb_config_destroy(config);
// Create Config with method chaining
scorbit::Config config;
config.setProvider("scorbitron")
.setMachineId(4419)
.setGameCodeVersion("1.12.3")
.setHostname("production") // Optional: default is "production"
.setAutoDownloadPlayerPics(true)
.setScoreFeatures(G_SCORE_FEATURES, G_SCORE_FEATURES_VERSION)
.setEncryptedKey(encrypted_key); // See Signing and Key Storage
// Create game state from config
auto gs = scorbit::createGameState(config);
from scorbit import scorbit
# Create Config with setter methods
config = scorbit.Config()
config.set_provider("scorbitron")
config.set_machine_id(4419)
config.set_game_code_version("1.12.3")
config.set_hostname("production") # Optional: default is "production"
config.set_auto_download_player_pics(True)
config.set_score_features(G_SCORE_FEATURES, G_SCORE_FEATURES_VERSION)
config.set_encrypted_key(encrypted_key) # See Signing and Key Storage
# Create game state from config
gs = scorbit.create_game_state(config)
Required Fields¶
| Config Setter | Type | Description | Example |
|---|---|---|---|
setProvider |
string | Identifies your platform | "scorbitron", "vpin" |
setMachineId |
integer | Scorbit-assigned unique identifier | 4419 |
setGameCodeVersion |
string | Your game's version string | "1.12.3" |
Optional Fields¶
For optional fields, the SDK will use default values if none are provided. To use the default values, you can omit the setter call or pass an empty string, NULL, or zero where appropriate.
| Config Setter | Type | Description | Default | Notes |
|---|---|---|---|---|
setHostname |
string | Server connection endpoint | "production" |
Options: "production", "staging", or custom URL |
setSerialNumber |
integer | Device's serial number | 0 |
Used for device tracking |
Required Fields
Provider name, machine ID, and game code version are mandatory. The SDK will not initialize properly without these fields.
Hostname Selection
Use "production" for release builds and "staging" for development and testing.
Best Practices¶
1. Version Management¶
- Use semantic versioning for game_code_version
- Update version number with each release
- Track version changes in logs
2. Environment Selection¶
- Use staging for development
- Test with production before release
- Log environment in debugging