Read, build, and verify FlatBuffers in pure GDScript — with typed
accessors generated from your .fbs schema. Byte-identical output to
the official implementation, running on every platform Godot
exports to, including Web.
FlatBuffers is the right wire format for games — zero-copy reads,
no parsing pass, tiny payloads — but GDScript was never a supported
target. This module closes that gap without a GDExtension to
compile per platform.
Point the generator at a compiled .bfbs schema and it emits typed
table accessors and builders. The runtime underneath is a faithful
port of the official builder: same layout, same bytes.
The whole wire format
Small surface. Real FlatBuffers.
Everything your packets need — tables, unions, vectors, strings, defaults — verified against official output.
01
Read, build, verify
Three small classes cover the lifecycle: FlatBuffer for zero-allocation reads, FlatBufferBuilder for wire-identical writes, FlatBufferVerifier for bounds-checked untrusted input.
Vtable + scalar reads
Back-to-front builder
Structural verifier
02
Generated accessors
A Python tool walks the binary reflection schema (.bfbs) and emits typed GDScript wrappers — no flatc fork required.
03
Unions and envelopes
First-class support for union member tables and envelope patterns — the shapes real network protocols actually use.
04
Runs everywhere Godot does
Pure GDScript means desktop, mobile, consoles, and Web exports all work — no per-platform native builds, no export drama.
05
Proven byte-for-byte
The test suite builds golden vectors with the official JavaScript implementation and compares GDScript output byte-for-byte — scalars, strings, vectors, nested tables, defaults, and corrupt-buffer handling.
Golden vector tests
Corrupt input rejection
Headless CI suite
Predictable by design
A pipeline you can reason about.
Write your schema once, compile it with stock flatc to a binary
reflection schema, and generate typed GDScript. At runtime the same
three classes read and write the wire bytes directly — nothing
hidden, nothing native.
The live demo is the module itself compiled to WebGL: pick a message
type, fill in fields, and build a real FlatBuffer. Inspect the hex,
verify the buffer, decode it back through the generated accessors,
and benchmark throughput — all in GDScript.