Repository navigation
OnlyWorlds SDK for Godot 0.8.0
What's new
- A world held in the game and kept current.
OWWorldCacheholds a world's elements as typed models and keeps itself in one file between launches;OWSyncfills it from the onlyworlds.com API, then applies only what changed through the API's change feed, with the server's resets, rewinds and deletes. It is the Unity SDK'sOWSync, ported with its tests.
var client := OWClient.new({"api_key": "ow_r_..."})
var world := OWWorldCache.read_file("user://world.owcache") # empty the first time
var r := await OWSync.incremental(client, world) # the first call walks the whole world, later ones the changes
if r.ok: world.write_file("user://world.owcache")
for c: OWCharacter in world.of_type("character"): print(c.name)The feed's rules are on the docs' changes page.
The zip
onlyworlds-godot-0.8.0.zip holds the addons/onlyworlds/ folder: copy it into your project's addons/ and enable the plugin. Built from the tag and proven by installing it into an empty Godot 4.7 project that reads a world through it.
sha256 3145748166156dd5bea9e10dbeddc645d48e186a6d2428a1fea04443e301efba