GS - Platform
A Godot asset that brings together user management, profiles, and authentication. This belongs to TMC's ecosystem of Godot open source assets.
Joins the TMC identity addons into one signed-in player: who they are (dot-auth), what we know about them (dot-user) and what they look like (dot-user-avatar). Each of those addons works alone; this one connects them.
Requires core and server. It finds dot-auth, dot-user and dot-user-avatar at runtime and works with any subset, including none.
Install
- Copy
addons/dot_platform/andaddons/dot_core/into your project, plus whichever of dot-auth, dot-user and dot-user-avatar you want. - Enable them in Project > Project Settings > Plugins.
Use
var hub := DotPlatformHub.new()
add_child(hub)
var admitted := await hub.admit(identity) # identity from dot-auth
var player: DotPlatformPlayer = admitted.value
player.key() # scoped id, what everything else uses
player.display_name() # from the profile, falling back to the identity
player.avatar # resolved and entitlement-checked
On a dot-server, load the module and it does this for every connection:
server.modules.load_module("res://addons/dot_platform/dot_platform_module.gd")
It finds the hub through DotRegistry, admits each authenticated client, stores the result in session.data["platform"], applies the profile's name, and cleans up when the client leaves. It adds the console commands platform_status and platform_name.
When the server has a site integration credential, a signed-in member's avatar and profile are read from and kept on the site, so they follow the member to every server using that credential. Guests and local accounts keep their profile on the server's disk.
Why a scoped key
identity.uid "backbone:acc-1" global; a server must never see this
-> profile.user_key "sWrM4ym4beWFH0Nx" scoped; what everything else keys on
-> avatar filed under the SAME scoped key
Keying data on the global account id would hand every server operator a global identifier for every player. DotPlatformHub is the only place that translation happens.
What happens when addons are missing
| Installed | Result |
|---|---|
| all three | profile, avatar, entitlements, onboarding flag |
| dot-user only | a profile and a scoped key, no avatar |
| none | a player with the identity's name and no scoped key |
| a broken store | the player still joins, nothing is saved |
Examples
Both exit non-zero on failure.
| Command | What it does |
|---|---|
godot --headless --path . res://examples/seam_selftest.tscn |
All four addons in one process with real keys, ticket and stores. |
godot --headless --path . res://examples/sandbox_server.tscn |
A real server and client over loopback, through the whole sign-on. |
More: docs/design.md, docs/history.md.
Status and licence
Part of the TMC dot-* family of Godot addons. Written with Claude Code and maintained by gamemann. Every addon has headless tests, but little of this has been played by real users yet, so expect rough edges and please open an issue when you hit one.
MIT licence, see LICENSE. The only closed part of the TMC platform is the web back end; you can use your own instead of TMC's.
Engagement Over Time
GS - Platform is a Godot asset. It has 1 download, 30 views, and 0 favorites. This item belongs to 1 collection and 3 tags.
Reviews
Log in to leave a review.
Comments (0)
Log in to comment.
