Releases: colyseus/native-sdk
Releases · colyseus/native-sdk
Godot SDK v0.17.11
Colyseus Godot SDK v0.17.11
Fixed
- Android
wss://connections could fail with a TLS certificate-bundle load failure on release builds — working for some devices/users and failing for others against the same endpoint. The SDK runs its own mbedTLS handshake and was picking a single CA source in priority order (system store → bundled Mozilla → settings override), so a device's system trust store could shadow the comprehensive bundled roots and abort TLS entirely if it lacked the server's root or failed to parse — hence the device-dependence. All available CA sources are now merged into one trust chain (bundled Mozilla roots always loaded as a device-independent baseline, with the system store and any override layered on top); TLS init only fails if the chain ends up empty. Reported by @pierroo in #24. - HTTPS matchmaking (
join_or_create) used a separate trust store from thewss://socket and only trusted the OS system store — so it ignored both the bundled Mozilla roots andnetwork/tls/certificate_bundle_override, and had the same Android exposure before the WebSocket even connected. Matchmaking now shares the same merged trust roots as the WSS transport. - A failed TLS handshake (e.g. certificate verification failure) spun the connection state machine forever instead of erroring, so the failure surfaced as a silent hang. It now closes with code
1015and a specific reason ("TLS certificate verification failed"). network/tls/certificate_bundle_overrideset to ares://oruser://path is now honored: the native extension resolves Godot virtual paths viaProjectSettings.globalize_path()before reading (previously a rawfopen()couldn't open them, which is why auser://override silently fell back to the built-in roots on Android).
Tests
tests/test_tls.zig— drives the WebSocket transport directly against a self-signedwss://echo server (no matchmaking) and asserts a trusted CA supplied via settings is honored, a wrong/absent CA fails verification, andtls_skip_verificationconnects regardless.test_wss.gd— joins a room overwss://end-to-end through a self-signed TLS proxy, exercising the override loader, HTTPS matchmaking trust, and the WSS handshake together.
Installation
- Download the
colyseus-godot-0.17.11.zipfile - Extract the
addonsfolder into your Godot project root - macOS only: Remove the quarantine attribute by running in the project root:
xattr -cr addons/colyseus - Enable the plugin in Project Settings > Plugins
Supported Platforms
- Web
- macOS (arm64)
- iOS (arm64)
- Windows (x86_32, x86_64)
- Linux (x86_64)
- Android (arm32, arm64, x86_64)
Godot SDK v0.17.10
Colyseus Godot SDK v0.17.10
Fixed
- GDScript schema parsing:
Room.set_state_type()could crash (SIGTRAP/SIGSEGV) on Android release exports while readingFieldobjects.parse_field_from_variant()now readsname/type/child_typethrough a checkedObject.get()helper and bails cleanly instead of operating on an unchecked/uninitialized Variant; it also drops a dead zero-argumentget()call that built a Variant from a mismatched type. Reported by @pierroo in #23. PackedByteArraymessage payloads were silently corrupted to all-zero bytes (of the correct length) in both directions:- Encoding indexed a
Variantcast directly toPackedByteArray*, so every byte read back as0. The concretePackedByteArrayis now extracted from the Variant before indexing. - Decoding (
bin→PackedByteArray) calledresize()on a Variant copy but wrote the bytes into the original empty array, leaving every element0. Bytes are now written into the resized array, which is then returned.
- Encoding indexed a
Tests
test_gdscript_schema.gd— exercisesset_state_type()with a user-defined GDScript schema covering everyFieldbranch (STRING/NUMBER/BOOLEAN, MAP/ARRAY/REF + child types) and asserts the state decodes into the user's classes.test_msgpack_pba_roundtrip.gd— echoes aPackedByteArraythrough the server (top-level, dict-nested, array-nested) and asserts the bytes survive the encode → decode round-trip intact.
Installation
- Download the
colyseus-godot-0.17.10.zipfile - Extract the
addonsfolder into your Godot project root - macOS only: Remove the quarantine attribute by running in the project root:
xattr -cr addons/colyseus - Enable the plugin in Project Settings > Plugins
Supported Platforms
- Web
- macOS (arm64)
- iOS (arm64)
- Windows (x86_32, x86_64)
- Linux (x86_64)
- Android (arm32, arm64, x86_64)
Godot SDK v0.17.11-rc.1
Colyseus Godot SDK v0.17.11-rc.1
Fixed
- Android
wss://connections could fail with a TLS certificate-bundle load failure on release builds — working for some devices/users and failing for others against the same endpoint. The SDK runs its own mbedTLS handshake and was picking a single CA source in priority order (system store → bundled Mozilla → settings override), so a device's system trust store could shadow the comprehensive bundled roots and abort TLS entirely if it lacked the server's root or failed to parse — hence the device-dependence. All available CA sources are now merged into one trust chain (bundled Mozilla roots always loaded as a device-independent baseline, with the system store and any override layered on top); TLS init only fails if the chain ends up empty. Reported by @pierroo in #24. - HTTPS matchmaking (
join_or_create) used a separate trust store from thewss://socket and only trusted the OS system store — so it ignored both the bundled Mozilla roots andnetwork/tls/certificate_bundle_override, and had the same Android exposure before the WebSocket even connected. Matchmaking now shares the same merged trust roots as the WSS transport. - A failed TLS handshake (e.g. certificate verification failure) spun the connection state machine forever instead of erroring, so the failure surfaced as a silent hang. It now closes with code
1015and a specific reason ("TLS certificate verification failed"). network/tls/certificate_bundle_overrideset to ares://oruser://path is now honored: the native extension resolves Godot virtual paths viaProjectSettings.globalize_path()before reading (previously a rawfopen()couldn't open them, which is why auser://override silently fell back to the built-in roots on Android).
Tests
tests/test_tls.zig— drives the WebSocket transport directly against a self-signedwss://echo server (no matchmaking) and asserts a trusted CA supplied via settings is honored, a wrong/absent CA fails verification, andtls_skip_verificationconnects regardless.test_wss.gd— joins a room overwss://end-to-end through a self-signed TLS proxy, exercising the override loader, HTTPS matchmaking trust, and the WSS handshake together.
Installation
- Download the
colyseus-godot-0.17.11-rc.1.zipfile - Extract the
addonsfolder into your Godot project root - macOS only: Remove the quarantine attribute by running in the project root:
xattr -cr addons/colyseus - Enable the plugin in Project Settings > Plugins
Supported Platforms
- Web
- macOS (arm64)
- iOS (arm64)
- Windows (x86_32, x86_64)
- Linux (x86_64)
- Android (arm32, arm64, x86_64)
Colyseus Native SDK - Static Library v0.17.2
Pre-built Binaries
Download the appropriate archive for your platform:
| Platform | Architecture | File |
|---|---|---|
| macOS | arm64 (Apple Silicon) | colyseus-macos-arm64.tar.gz |
| macOS | x86_64 (Intel) | colyseus-macos-x86_64.tar.gz |
| Linux | x86_64 | colyseus-linux-x86_64.tar.gz |
| Linux | arm64 | colyseus-linux-arm64.tar.gz |
| Windows | x86_64 | colyseus-windows-x86_64.zip |
| iOS | arm64 | colyseus-ios-arm64.tar.gz |
| WebAssembly | wasm32 | colyseus-wasm32.tar.gz |
Usage
Extract the archive and link the library:
// Include headers
#include <colyseus/client.h>
#include <colyseus/room.h>
// Link: -L/path/to/lib -lcolyseus
// Include: -I/path/to/includeZig Build System
exe.addObjectFile(.{ .cwd_relative = "path/to/lib/libcolyseus.a" });
exe.addIncludePath(.{ .cwd_relative = "path/to/include" });Full Changelog: v0.17.1...v0.17.2
Godot SDK v0.17.9
Colyseus Godot SDK v0.17.9
Added
- Automatic reconnection. After a recoverable WebSocket close (codes 1001, 1005, 1006, 4010
MAY_TRY_RECONNECT), the room retries with exponential backoff and replays the originalreconnectionTokenagainst the same room URL. - New signals on
Colyseus.Room:dropped(code: int, reason: String)— fires once when the connection drops and reconnection begins.reconnected()— fires when reconnection succeeds; any messages buffered while disconnected have already been flushed by this point.
room.reconnecting: boolgetter — true while the worker is mid-retry.room.set_reconnection_options(options: Dictionary)— any subset ofenabled,max_retries,min_delay_ms,max_delay_ms,min_uptime_ms,delay_ms,max_enqueued_messages; omitted keys keep their current value. Defaults match the @colyseus/sdk TypeScript SDK (enabled, 15 retries, 100–5000 ms backoff, 5000 ms minimum uptime, 10-message queue cap).- Messages sent via
room.send_message(...)while the room is dropped are queued (capped atmax_enqueued_messages) and replayed once the new transport reaches JOIN_ROOM. Unreliable variants still drop when not connected, matching the TS SDK.
Fixed
Colyseus.Room.send_message(type)(single-argument form) no longer fails with an arity error against the native vararg method; the wrapper now always forwards bothtypeanddata(defaultingdatatonull).- Native build picks up the active macOS SDK via
xcrun --show-sdk-pathinstead of the hard-coded Command Line Tools path, which was producing_kSec*/_CF*undefined-symbol errors when only the full Xcode SDK was available. - Android: the GDExtension failed to load (
dlopen: "cannot locate symbol malloc") and matchmaking failed withTemporaryNameServerFailure. The Android.sonow links bionic libc via a generated NDK libc file, which gives it aNEEDED libc.so(fixing the loader) and routesstd.netDNS through bionicgetaddrinfoinstead of the nonexistent/etc/resolv.conf(fixing matchmaking). Minimum Android API is now 24. Reported in #22. - iOS: release build failed to link (
undefined symbol: _colyseus_monotonic_ms) becausesrc/utils/time.c, added for reconnection, was missing from the iOS build's source list.
Tests
- Added
test_reconnect.gdcovering drop → auto-reconnect, queued-message flush, and disabled-reconnection paths againstsdks-test-server.
Installation
- Download the
colyseus-godot-0.17.9.zipfile - Extract the
addonsfolder into your Godot project root - macOS only: Remove the quarantine attribute by running in the project root:
xattr -cr addons/colyseus - Enable the plugin in Project Settings > Plugins
Supported Platforms
- Web
- macOS (arm64)
- iOS (arm64)
- Windows (x86_32, x86_64)
- Linux (x86_64)
- Android (arm32, arm64, x86_64)
GameMaker SDK v0.17.23
Colyseus GameMaker SDK v0.17.23
Added
- Automatic reconnection. After a recoverable WebSocket close (codes 1001, 1005, 1006, 4010
MAY_TRY_RECONNECT), the SDK retries the room with exponential backoff and replays the originalreconnectionTokenagainst the same room URL. colyseus_on_drop(room, handler)— handler(code, reason)fires once when the connection drops and reconnection begins.colyseus_on_reconnect(room, handler)— handler()fires when reconnection succeeds; any messages buffered while disconnected have already been flushed by this point.colyseus_room_is_reconnecting(room)returns 1 while the worker is mid-retry.colyseus_room_set_reconnection_options(room, enabled, max_retries, min_delay_ms, max_delay_ms, min_uptime_ms, delay_ms, max_enqueued_messages)— pass-1for any int parameter to keep its current value;enabledaccepts0/1/-1. Defaults match the @colyseus/sdk TypeScript SDK (enabled, 15 retries, 100–5000 ms backoff, 5000 ms minimum uptime, 10-message queue cap).- Event types
COLYSEUS_EVENT_ROOM_DROP(14) andCOLYSEUS_EVENT_ROOM_RECONNECT(15) plus dispatch cases incolyseus_process(). - Messages sent via
colyseus_sendwhile the room is dropped are queued (capped atmax_enqueued_messages) and replayed once the new transport reaches JOIN_ROOM.sendUnreliablevariants still drop when not connected, matching the TS SDK. TestReconnectscript covering drop → auto-reconnect, queued-message flush, and disabled-reconnection paths againstsdks-test-server.
Installation
- Download
colyseus-gamemaker-0.17.23.yymps - In GameMaker, go to Tools → Import Local Package
- Select the
.yympsfile, select all resources, and click Import
Supported Platforms
- Windows (x86_64)
- macOS (arm64, x86_64)
- iOS (arm64)
- Linux (x86_64)
- Android (arm64, arm32, x86_64)
- HTML5 (WASM)
Colyseus Native SDK - Static Library v0.17.1
Pre-built Binaries
Download the appropriate archive for your platform:
| Platform | Architecture | File |
|---|---|---|
| macOS | arm64 (Apple Silicon) | colyseus-macos-arm64.tar.gz |
| macOS | x86_64 (Intel) | colyseus-macos-x86_64.tar.gz |
| Linux | x86_64 | colyseus-linux-x86_64.tar.gz |
| Linux | arm64 | colyseus-linux-arm64.tar.gz |
| Windows | x86_64 | colyseus-windows-x86_64.zip |
| iOS | arm64 | colyseus-ios-arm64.tar.gz |
| WebAssembly | wasm32 | colyseus-wasm32.tar.gz |
Usage
Extract the archive and link the library:
// Include headers
#include <colyseus/client.h>
#include <colyseus/room.h>
// Link: -L/path/to/lib -lcolyseus
// Include: -I/path/to/includeZig Build System
exe.addObjectFile(.{ .cwd_relative = "path/to/lib/libcolyseus.a" });
exe.addIncludePath(.{ .cwd_relative = "path/to/include" });What's Changed
Full Changelog: v0.17.0...v0.17.1
Godot SDK v0.17.7
Colyseus Godot SDK v0.17.7
Changed
- Renamed the native GDExtension classes to
_ColyseusClient,_ColyseusRoom, and_ColyseusCallbacksso they are hidden from Godot editor autocomplete. Continue using the publicColyseus.Client,Colyseus.Room, andColyseus.Callbacksentry points — they are unchanged.
Tests
- Added
test_schema_callbacks.gdcoveringCallbacks.on_changefor both instance and collection targets againsttest_room. Tests awaitget_tree().process_frameso deferred callback dispatch from the WebSocket thread is flushed in headless/GUT mode.
Installation
- Download the
colyseus-godot-0.17.7.zipfile - Extract the
addonsfolder into your Godot project root - macOS only: Remove the quarantine attribute by running in the project root:
xattr -cr addons/colyseus - Enable the plugin in Project Settings > Plugins
Supported Platforms
- Web
- macOS (arm64)
- iOS (arm64)
- Windows (x86_32, x86_64)
- Linux (x86_64)
- Android (arm32, arm64, x86_64)
GameMaker SDK v0.17.22
Colyseus GameMaker SDK v0.17.22
Added
colyseus_on_changeGML wrapper exposing instance and collectiononChangecallbacks, matching the TypeScript SDK'scallbacks.onChange(...)surface.colyseus_on_change(callbacks, instance, handler)— fires when any property on the schema instance changes.colyseus_on_change(callbacks, "field", handler)— collection change on root state; handler receives(key, value).colyseus_on_change(callbacks, instance, "field", handler)— collection change on a child instance.
- Native exports
colyseus_gm_callbacks_on_change_instanceandcolyseus_gm_callbacks_on_change_collection, wired through the extension's.yybindings for macOS and Android file entries. - Event types
COLYSEUS_EVENT_INSTANCE_CHANGE(12) andCOLYSEUS_EVENT_COLLECTION_CHANGE(13) plus dispatch cases incolyseus_process(). - Test coverage under
Schema onChange CallbacksinTestRoomApifor instance and collectiononChangeflows.
Installation
- Download
colyseus-gamemaker-0.17.22.yymps - In GameMaker, go to Tools → Import Local Package
- Select the
.yympsfile, select all resources, and click Import
Supported Platforms
- Windows (x86_64)
- macOS (arm64, x86_64)
- iOS (arm64)
- Linux (x86_64)
- Android (arm64, arm32, x86_64)
- HTML5 (WASM)
Godot SDK v0.17.5
Colyseus Godot SDK v0.17.5
Installation
- Download the
colyseus-godot-0.17.5.zipfile - Extract the
addonsfolder into your Godot project root - macOS only: Remove the quarantine attribute by running in the project root:
xattr -cr addons/colyseus - Enable the plugin in Project Settings > Plugins
Supported Platforms
- Web
- macOS (arm64)
- iOS (arm64)
- Windows (x86_32, x86_64)
- Linux (x86_64)
- Android (arm32, arm64, x86_64)