good library

Dimension-agnostic engine kernel: ECS, shared memory pool, ring buffers, scenes, fixed-tick loop, hierarchy, and the generic asset registry.

Classes

AnimationTypeDescriptor
Declares the timelines a struct owns - see Animations.describeAnimation.
ArchetypeField
ArchetypeQueryDescriptor
Concrete QueryDescriptor - built once per GameSystem.describeQuery call (see Game's system bootstrap, a later phase).
ArchetypeRegistry
Process-global table of every ArchetypeStorage, indexed by its archetypeId.
ArchetypeStorage
One archetype's bit-packed field layout plus its row storage.
Asset<T>
A declared asset: its identity, its address, and - on the copy that loaded it - its payload.
AssetDescriptor
Declares key and returns the handle to keep in a field - the third describe* hook alongside describeType/describeStruct, and the typed-handle rule applied to assets.
AssetInfo
A plain-data summary of a decoded asset - see AssetLoader.describe.
AssetKey<T>
One loadable asset's identity: which asset this is, and nothing else.
AssetLoader<T>
Turns an AssetKey's bytes into a T, and releases it again.
AssetLoaderRegistrar
What Game.describeAssetLoaders hands each layer to register into.
AssetLoaders
The registry AssetKey.loader falls back to: one AssetLoader per payload type.
AssetPack
A shipped asset pack: which chunk holds each asset, and the key to open one.
Assets
One game's assets: which keys have been declared, the Asset handle each one produced, and whether that handle's payload has been decoded yet.
AssetSource
Where an asset's bytes come from - a bundle path, a packed chunk, an in-memory blob in a test. Deliberately knows nothing about what the bytes mean; decoding is AssetLoader's job, and decryption or decompression happen here, below load, so a loader never learns the game shipped encrypted.
AudioClip
An audio file's bytes, loaded and addressed like any other asset.
AudioInfo
What decoding discovered about a clip, replicated to every isolate copy.
AudioLoader
Reads an audio file's bytes.
BufferDescriptor
Declares the auxiliary ring buffers a game (or one of its systems) needs
BufferHandle
A declared auxiliary ring buffer: the thing BufferDescriptor.has hands back and the declarer keeps in a late final field.
BundleSource
Bytes named by a logical asset path - the ordinary way a shipped game names its content.
CameraDescriptor
Declares a game's camera views - one has call per view, each returning the handle to keep in a late final field.
CameraView
One addressable place a game is drawn - what a GameView shows and what a camera entity is pointed at.
CameraViewTable
A game's camera views, numbered from zero.
CommandBatch
A batch of command calls, sent to the other isolate as one message.
CommandDescriptor
Declares a game's commands, and who handles them.
CommandKey<R>
A place in a batch, and the type of what will come back from it.
CommandResults
Proof that a batch has been sent and its replies are back.
Component
ComponentDescriptor
Declares which component types an archetype carries - one has<T>() per type, each ORing that type's bit into the archetype's signature, which is the whole of what a query matches on.
ComponentTypeRegistry
Assigns every distinct Component type (a concrete EntityStruct subclass, or a mixin like Transform2D/Child) one stable bit, the first time ComponentDescriptor.has<T>() sees it.
CoroutineFuture
A started coroutine: something to await, and something to stop.
CoroutineScheduler
Runs every live coroutine, once per fixed step, inside the tick window.
DataArrayPointer<T>
A fixed-length array of length values stored inline in every entity's row - data.hasFloat32Array(4) reserves four floats per entity, not a pointer to a shared list.
DataBinding<T>
DataDescriptor
DataPointer<T>
DefaultPointer<T>
A column whose declared default a prefab can still change while the archetype is being described.
EntityStruct
EventDescriptor
Declares the event dispatchers an EventBus owns - see EventBus.describeEvents.
EventDispatcher<L extends GameListener, E>
A pre-resolved set of listeners for one event type.
Field
Declares one column on the struct currently being constructed, from the field that holds it:
Game
The main-isolate half of a game: declarations live here.
GameCommand<P, R>
A call with parameters and a result: R Function(P), across an isolate.
GameCommandBase
What every command shape has in common: an identity on the wire, a record layout, and somewhere to send to.
GameListener
Names the set of framework types that can receive events.
GameListenerBase
The default GameListener implementation the framework's own listener types extend.
GamepadButton
One button on a gamepad, in the standard Xbox-style layout every platform is normalised onto.
GamepadCollector
Turns connected gamepads into bits in the raw input block.
GamepadKey
A button on a gamepad, on a player slot rather than on a particular physical device.
GameSceneDescriptor
Declares the scenes a game can load - see Game.describeScenes.
GameState<T extends Game>
The game-isolate half of a game: mutations happen here.
GameSystem
Systems run in declaration order by default. A subclass wanting to run relative to specific other systems overrides compareTo and type-checks other (if (other is PhysicsSystem) return -1; to sort before it, 1 to sort after). compareTo is invoked once per pair, during Game's boot pass - never on the tick hot path.
GameView
Displays a running Game - and knows nothing whatsoever about how it is drawn.
HandoffBuffer
Shared memory for a value where only the newest copy matters - a rendered frame - handed between one writing isolate and one reading isolate with neither ever blocking the other.
HandoffHandle
A declared HandoffBuffer - what BufferDescriptor.hasHandoff hands back and the declarer keeps in a late final field.
HeapArchetypeField
A field that knows how to stamp its declared default into a raw row.
HeapObjectRegistry
Process-global table backing DataDescriptor.hasHeapObject/ optHeapObject: it hands an arbitrary Dart object a plain integer address so a component row - which is native memory and cannot hold a Dart heap pointer (the no-allocation rule) - can refer to it as a Uint32.
Input<T>
One declared action: a named thing the player can do, its current value, its edges, and the binding that produces them.
InputBinding<T>
How raw held-or-not key bits become one action's value.
InputDescriptor
Declares a game's input actions - see Game.describeInputs and GameSystem.describeInputs. Same one-pass declarative shape as SystemDescriptor/BufferDescriptor/StateDescriptor.
InputDevice
The write end of InputState: where raw device events become bits.
InputEvent<T>
What a pressed/released listener is handed: the action's value at the moment the edge landed.
InputEventStream<T>
The subscribable half of Input.pressed/Input.released.
InputKey
One thing a human can hold down: a key on the keyboard, a button on the mouse, or a button on a gamepad.
InputState
The raw device state for one moment: one bit per InputKey, nothing else.
IntRepresentable
A thing that can be reduced to the integer a component row stores, and nothing more.
IntRepresentation<T extends IntRepresentable>
The other direction: turns the int in a row back into a T.
KeyboardKey
A key on the keyboard, named by physical position rather than by the character it produces.
ListenerCollector
Collects the listeners a dispatcher will deliver to.
MemoryPage
MemoryPool
MemorySource
Bytes already in memory - a procedurally generated asset, something that arrived over the network, a fixture in a test. Carries no I/O of its own.
MouseBinding
Binds an action to the pointer's position.
MouseButtonKey
A button on the mouse.
MousePosition
Where the pointer is, in every space the engine can answer for.
MultiComponent
A stricter Component: opts a mixin into declaring several named, independently-addressable instances of itself on one entity (several sprites, several colliders) instead of exactly one. Dart disallows mixing in the same mixin twice (with Renderable2D, Renderable2D), so a multi-instance mixin doesn't declare its fields directly the way a single-instance one does - it declares its own dedicated hook (see Renderable2D.describeSprites/Collider2D.describeCollider, goo2d/ goo2d_render), called once from its own describeStruct override, and every has()-style call inside that hook allocates one more instance's worth of fields. Both markers are pure - no members of their own beyond what Component already declares.
PackedPointer<T extends IntRepresentable>
A DataPointer over an IntRepresentable, which can additionally hand back the raw packed int without unpacking it.
ParamBatch
Several records - calls, messages - packed back to back in one buffer.
ParamBuffer
A single command invocation: the bytes one call's parameters and results live in.
ParamDescriptor
Declares one command's parameter and result fields.
ParamLayout
Builds one command's layout, then serves as the accessor for it.
ParamLayouts
What a batch needs to know about the declarations in it to walk received bytes: how wide each record is, and how many fields its mask covers.
ParamPointer<T>
One field of one command's parameter block - the command-side twin of DataPointer, and deliberately the same shape: one pointer object per field, never per call, with the call passed in as the index.
Query
QueryBuilder
Builds one query out of three constraints over the archetype signature bitset (ArchetypeStorage.componentSignature, see archetype.dart): every type in withAll present, every type in withNone absent, and at least one type from each withAny group present.
QueryDescriptor
QueryGroup
One matching archetype inside a Query, and the rows it holds.
RandomDescriptor
Declares a game's random streams - see Game.describeRandom.
RandomStream
A seeded stream of random numbers that replays identically.
RingBuffer
A wait-free single-producer/single-consumer ring buffer over a fixed-size native memory region, shared across isolates by raw address (the same handoff pattern as TripleBuffer/bin/ffi_shared_memory_poc.dart).
RingBufferRecord
A decoded record handed back by RingBuffer.drain. payload is a zero-copy view directly over the ring's backing bytes, valid only until the next RingBuffer.drain call (which may recycle that region) - copy it out if you need to keep it longer.
SceneDescriptor
SceneLoadProgress
One progress report from GameState.loadScene - what is being brought up and how far along the transition as a whole is.
SceneRegistry
The process-global table of loaded scenes - what a Scene handle resolves through.
SceneStruct
SignalCommand
A call that takes and returns nothing: void Function().
SignalDispatcher<L extends GameListener>
An EventDispatcher for an event that carries nothing.
SingleQuery<T extends Component>
A query over exactly one component type, from QueryDescriptor.has.
SinkCommand<P>
A call that takes something and returns nothing: void Function(P).
StateChannel<T>
A typed, cross-isolate published value: written by the game isolate, readable on both, backed by a TripleBuffer so a reader always sees a whole, self-consistent snapshot and the writer never blocks.
StateDescriptor
Declares published state - see Game.describeState. Same one-pass declarative shape as SystemDescriptor/BufferDescriptor/ CommandDescriptor/SceneDescriptor, and deliberately the same width vocabulary as DataDescriptor: a state channel is a fixed-width slot in shared memory exactly as a component field is a fixed-width slice of a row, so it is declared the same way and needs no codec.
SupplierCommand<R>
A call that takes nothing and returns something: R Function().
SystemDescriptor
TimelineAnimation
One animation clip: a set of tracks with keyframes, and a length.
TimelineAnimationDescriptor
Declares a timeline's clips - see TimelineStruct.describeAnimation.
TimelineDescriptor
Declares a timeline's tracks - see TimelineStruct.describeTrack.
TimelineStruct
A set of tracks and the clips that animate them.
Track<T>
A curve of values over time, sampled by operator[].
TrackAnimator<T>
Builds one track's keyframes inside one clip. Chainable.
TrackBinding<T>
A Track paired with the data it should be written into.
TriggerBinding
One key, one bool: the action is true exactly while key is held.
TripleBuffer
A wait-free single-writer / multi-reader triple buffer over a fixed-size native memory region: slotBytes bytes, allocated 3x (one per slot).
Vec2Binding
Four keys composed into one vector: the classic WASD / arrow-keys pair of axes.
Vector2
2D column vector.
WaitForFuture
Waits for a real Future - an asset load, a network reply.
WaitUntil
Waits until condition first returns true, checked once per fixed step.
WaitWhile
Waits while condition keeps returning true - the mirror of WaitUntil, spelled out rather than left to the caller to negate, because WaitUntil(() => !busy) reads worse than WaitWhile(() => busy).
YieldInstruction
Something a coroutine waits on, polled once per fixed step.

Enums

AssetAvailability
What a AssetSource.check found, and what it did not.
AudioContainer
The audio containers the pipeline recognises.
WrapMode
What happens once an animation runs past its own length.

Mixins

Animations
Timelines, on every EntityStruct.
AppVisibilityListener
Hears the app becoming hidden and visible again.
Child
Coroutines
Opts an owner into starting and stopping coroutines.
EntityLifecycleListener
Hears the entities of one entity struct coming into being or going away.
EntitySpawnListener
Hears every entity spawning and despawning, anywhere in the game.
EnumAssetKey<T>
Lets an enum be an AssetKey outright.
EventBus
Opts a GameListener into declaring and dispatching its own events.
FixedTickable
Opts a GameListener into the fixed-tick loop.
GameLifecycleListener
Hears the game itself coming up and going down.
GameSystemLifecycleListener
LocalEnumAssetKey<T>
An EnumAssetKey whose bytes come from the asset bundle under path - what good_cli's codegen emits.
Parent
SceneLifecycleListener
Hears an instance of one scene struct being loaded or unloaded, and is told which instance.
SceneLoadListener
Hears every scene loading and unloading, anywhere in the game.
Tickable
Opts a GameListener into the presentation phase - the pass that runs after a fixed tick has committed.

Extension Types

Accessor
One entity seen as its T component - what entity<Transform3D>() returns, and where a component's helper methods live.
Entity
A handle to one row of component data, packed into a single 64-bit int:
Scene
A handle to one loaded instance of a SceneStruct, packed into a single 64-bit int:
TimelineSample
One instant of one animation: which clip, and how far into it.

Extensions

ChildAccessor on Accessor<Child>
What an entity can do about the parent it hangs off.
CommandBatchCalls on CommandBatch
Building calls into a batch - one message, whatever mix of commands.
EntityLifetime on Entity
Destroying an entity, which is a property of the entity and not a choice of scene.
ParentAccessor on Accessor<Parent>
The hierarchy's structural edits, on the entity they are about.

Constants

chunkFlagCompressed → const int
chunkFlagEncrypted → const int
chunkHeaderBytes → const int
Header: magic(4) version(1) flags(1) nonce(12) tag(16).
chunkMagic → const List<int>
GOOC.
chunkVersion → const int

Functions

openChunk({required Uint8List sealed, required List<int> key}) Future<Uint8List>
Unseals one chunk: authenticates, decrypts, decompresses.
readChunkBody(Uint8List body) Map<String, Uint8List>
Splits an unsealed chunk body into its members.

Typedefs

AudioAsset = Asset<AudioClip>
The handle a component field points at.
AudioKey = AssetKey<AudioClip>
An audio clip's identity: where its bytes come from, and nothing else.
Coroutine = Iterable Function()
A resumable piece of gameplay logic, written as a sync* generator.
CoroutineWithParam<T> = Iterable Function(T param)
A Coroutine that takes one argument, so a caller can start the same body for several entities without a closure per start.
InputListener<T> = void Function(InputEvent<T> event)
A listener on one edge of one action.
TimelineLerp<T> = T Function(T a, T b, double t)
How two keyframe values are blended.