game::SorobanGametrait — standardload_world/save_worldcontract pattern; implement once withimpl_soroban_game!(Contract, "key"), use in every entrypointimpl_soroban_game!macro — wiresSorobanGameto any#[contract]structSimpleWorld::load_from_instance— load world from Soroban instance storage, returning a fresh empty world on first callSimpleWorld::save_to_instance— persist world to Soroban instance storageSimpleWorld::set_rich_observed— store a rich component and emit aRichComponentChangedEventfor off-chain indexersSimpleWorld::remove_rich_observed— remove a rich component and emit adeleventRichComponentChangedEvent— new Soroban event type with topics("COUGR", "rich", component_type)for rich component change notificationsspawn_and_moveexample — canonical Cougr starter game demonstrating the complete idiomatic pattern:impl_component_observed!+SorobanGame+ typed ECS accessSorobanGamere-exported fromprelude— import fromcougr_core::prelude::*cougr_core::circuits— four pre-built ZK game builders (hidden cards, fog of war, fair dice, sealed bid) with pipeline-embedded verification keyscougr_core::session—SessionManager,SessionStatus, andActiveSession(Beta)cougr_core::test—GameHarness,Scenario, andReplayLogsandbox behind thetestutilsfeature- Circom pipeline —
internal/cougr-core-circuitswith CI workflow and on-chain Groth16 proof verification using real VKs - ZK examples —
hidden_hand,fog_explorer,dice_duel, andblind_auction - Workspace subcrates —
internal/cougr-core-{circuits,session,test}per ADR 0007
tic_tac_toeexample modernised: replaced ~200 lines of manual serialization withimpl_rich_component!forBoardandPlayers, andimpl_soroban_game!for load/save. Public API is unchanged; all existing tests pass- README rewritten with clean 30-line quick start and full feature documentation
game::SorobanGameis StableSimpleWorld::load_from_instance/save_to_instanceare Stableset_rich_observed/remove_rich_observedare StableRichComponentChangedEventis Stablecougr_core::sessionis Betacougr_core::circuitsand embedded test VKs are Experimentalcougr_core::testis Experimental (testutilsonly)
appas the default gameplay runtime surfaceauth,privacy, andopsas product-level domain namespacesRuntimeWorldandRuntimeWorldMutas shared Soroban-first backend contracts- stronger stage scheduling with ordering, sets, and validation
SimpleQueryBuilder, query state/cache improvements, and richerArchetypeWorldquery helpers- expanded benchmark coverage for backend comparisons and cache invalidation behavior
- the recommended onboarding path is now
app::GameApp+SimpleWorld+SimpleQueryBuilder - canonical examples now emphasize the curated runtime story and explicit maturity boundaries
battleshipnow uses stable privacy primitives fromzk::stable- documentation now treats
SimpleWorldandArchetypeWorldas the defended Soroban-first backends
- Stable: ECS onboarding/runtime contract,
app,ops,standards,privacy::stable,zk::stable - Beta:
auth,accounts,game_world - Experimental:
privacy::experimental,zk::experimental, hazmat cryptographic helpers
- Prefer
appover wiring scheduler/world primitives directly for new gameplay code - If you still have pre-1.0 code built around removed runtime abstractions, port directly to
GameApp,SimpleWorld, andSimpleQuery - Prefer
ops,privacy, andauthin application code when you want domain-oriented imports - Treat root-level advanced re-exports as compatibility/advanced surfaces rather than the default learning path
- See docs/MIGRATION_GUIDE.md for concrete migration mappings