Game Integration
Midgard does not need its own game standard from scratch.
For Starknet-native games, the right starting point is Provable Games’ Embeddable Game Standard (EGS). They built the standard, and their docs should be treated as the source of truth for game-side integration.
Start with Provable’s docs
Section titled “Start with Provable’s docs”Those docs cover the standard itself, the contract patterns behind it, and the wider ecosystem around embeddable Starknet games.
What Midgard needs from a game
Section titled “What Midgard needs from a game”At the protocol level, Midgard needs three practical capabilities:
- mint the factory owner’s initial session
- mint each challenger session
- read the score for that session
- know whether the run is over
That is why Midgard works cleanly with score-driven games and why the EGS model is a strong fit.
How Midgard uses the game layer
Section titled “How Midgard uses the game layer”On factory creation
Section titled “On factory creation”Midgard mints a game session for the factory owner. That session becomes the source of the factory’s defense score when activated.
On challenge creation
Section titled “On challenge creation”Midgard mints a new game session for the challenger and sets the session expiry window.
On settlement
Section titled “On settlement”Midgard reads:
- the current or final score
- whether the run is complete
It can also accept current-score submission early from the score owner, which means a game does not need to expose a special “submit” hook to Midgard itself.
Current Starknet integration model
Section titled “Current Starknet integration model”Game support now uses a runtime game registry.
At launch, the default enabled games are:
- zKube
- Loot Survivor
Adding a new game means:
- the game should follow the EGS path described in Provable’s docs
- the runtime admin must enable the game in Midgard’s registry
- the game fee wallet must be configured for that game
Fee routing
Section titled “Fee routing”Each enabled game gets a game fee wallet.
From the 5% non-burn ticket fee:
- 70% goes to the game’s fee wallet
- 30% goes to the protocol fee wallet
That gives integrated games a direct economic reason to plug in.
What fits best today
Section titled “What fits best today”Games that fit Midgard best tend to have:
- high-score or survival-score loops
- short, repeatable sessions
- clear and legible “higher is better” scoring
- clean session finality
Midgard is strongest when the challenge line is obvious to the player at a glance.
Not fully on Starknet?
Section titled “Not fully on Starknet?”If your game is off-chain, semi-onchain, or not running on Starknet at all, the right path is not the pure EGS flow.
Read Oracle And Hybrid Games for that direction.