Features Overview
ShardKit generates a unified SDK with the features you select. All features are accessed through the ShardSDK autoload singleton.
Available Features
| Feature | Description | Access |
|---|---|---|
| Recording | Capture gameplay clips automatically | ShardSDK.recording |
| Error Tracking | Monitor crashes and errors | ShardSDK.errors |
| Multiplayer | Authoritative multiplayer servers | ShardSDK.multiplayer |
Feature Selection
When you run shardkit init, you choose which features to enable:
npx @shard-dev/shardkit init? Which features do you want to enable?
◉ Recording - Capture gameplay clips
◉ Error Tracking - Monitor crashes and errorsMultiplayer is automatically enabled when you select “Multiplayer” as your game type.
Recording
Automatically capture gameplay moments and let players share their best clips.
Use cases:
- Boss defeats
- Achievement unlocks
- Speedrun completions
- PvP victories
# Start recording when boss spawns
var id = await ShardSDK.recording.start_recording("myGame_e5f6g7h8")
# Stop 3 seconds after boss dies
await ShardSDK.recording.stop_recording(id, 3.0)Error Tracking
Track errors in production with stack traces, breadcrumbs, and context.
Use cases:
- Crash monitoring
- Error reporting
- Performance metrics
- Debug breadcrumbs
# Report an error
ShardSDK.errors.report_error("Connection failed")
# Add context breadcrumbs
ShardSDK.errors.add_breadcrumb("Entered dungeon", "navigation")→ Error Tracking Documentation
Multiplayer
Build competitive multiplayer games with authoritative servers.
Use cases:
- Competitive games
- Real-time multiplayer
- Lobby-based matchmaking
- State synchronization
# Connect and create lobby
ShardSDK.multiplayer.connect_to_server(session_token)
ShardSDK.multiplayer.create_lobby()
# Send player input
ShardSDK.multiplayer.send_input(input)Combining Features
You can enable multiple features together. For example, a multiplayer game with recording:
npx @shard-dev/shardkit init --name "My Game" --godot 4 --type multiplayer --features recording,errors -yThis generates an SDK with:
- Multiplayer (auto-enabled for multiplayer games)
- Recording
- Error Tracking
# Use all features together
func _ready():
ShardSDK.multiplayer.connect_to_server(token)
ShardSDK.errors.set_tag("version", "1.0.0")
func _on_match_won():
var id = await ShardSDK.recording.start_recording("myGame_matchWon")
await ShardSDK.recording.stop_recording(id, 5.0)Generated Structure
The SDK only includes the features you enable:
addons/shard_sdk/
├── plugin.cfg
├── plugin.gd
├── ShardSDK.gd # Main singleton
├── recording/ # Only if recording enabled
│ └── RecordingSDK.gd
├── error_tracking/ # Only if error tracking enabled
│ └── ErrorTrackingSDK.gd
└── multiplayer/ # Only if multiplayer enabled
├── ShardMultiplayer.gd
└── ...This keeps your addon lightweight - you only ship what you use.