Skip to content

Design guidance

HyperToken is a CRDT-native state engine, not a complete game production stack. Design the state and conflict semantics before choosing containers. Every game should name its entities, invariants, visibility rules, authority model, and acceptable result when two peers act concurrently.

Use immutable tokens for identifiable entities, Stack/Source for ordered collections, Space for zones and placements, and game:setState for game-specific document keys. All mutations go through engine.dispatch(). Derived views should be rebuildable from canonical state.

The following pages cover common domains and include cases where a central authority or a different tool is the better choice.