The persistence system utilizes Pocketbase with a streamlined single-table architecture.
Currently using PocketHost.io for free hosting but might move to the a VPS in future due to reliability concerns.
Table: world
{
// System Fields
"id": "string (auto-generated)",
"created": "timestamp",
"updated": "timestamp",
// Position Fields (Integer)
"x": "integer",
"y": "integer",
"z": "integer",
// Rotation Fields (Float)
"rotX": "float",
"rotY": "float",
"rotZ": "float",
"rotW": "float",
// Metadata Fields
"owner": "string (required)",
"cloudModel": "string"
}
Indexes:
- Unique composite index on (x, y)
- Index on owner field
This could be any other database but I wanted to give Pocketbase a try since it's pretty niffy, it comes with a HTTP API which plays very nice with s&box. You can set rules for CRUD operations and much more.
In future, it might be worthwhile looking into the live-streaming functionality so when a player persists props, you can see it instantly.
User Comments