Getting started¶
Requirements¶
- Godot 4.4+ (developed and CI-smoked on 4.7.x)
- No .NET for GDScript consumers
- A prebuilt GDExtension binary for your platform (or build from source)
Install from a release (recommended)¶
- Download the latest GitHub Release assets, or clone this repository.
- Copy
addons/manamesh_fairplay/into your Godot project (keep thebin/folder with platform binaries). - Open the project once so Godot registers GDExtensions (
Project → Reload Current Project, or run with--import). - Confirm the class exists:
Or use the thin facade:
var fair := FairPlay.new() # res://addons/manamesh_fairplay/facade/fair_play.gd
print(fair.version())
Commit–reveal in one minute¶
var api = ClassDB.instantiate("FairPlayApi")
var faces := PackedByteArray([1, 3, 3, 5, 6])
var c: Dictionary = api.commit_dice_hand(faces)
# PUBLIC: broadcast only the commitment
var commitment_hex: String = c["commitment_hex"]
# PRIVATE until reveal: faces + nonce
var nonce_hex: String = c["nonce_hex"]
# Later, open and let peers verify
var ok: bool = api.verify_commitment(commitment_hex, faces, nonce_hex)
assert(ok)
See Commit–reveal and the offline sample samples/dice_commit_reveal/.
Run this repo’s smoke scripts¶
With Godot on your PATH and a matching binary under addons/manamesh_fairplay/bin/:
godot --path . --import # once, generates .godot/
godot --headless --path . --script res://scripts/smoke_desktop.gd
# expect: SMOKE_DESKTOP_OK
Sample scenes:
| Path | Purpose |
|---|---|
samples/dice_commit_reveal/ |
Offline commit → open → verify |
samples/multiplayer_dice/ |
RPC-shaped public messages (no private keys on wire) |
Core tests (no Godot)¶
Next steps¶
- Wire multiplayer: Bring-your-own netcode
- Full method list: GDScript API
- Platform matrix: Platforms
- From-source / web builds: Building from source