Protect rendering performance
For a technical producer, this inventory delivery prototype should make every player action and result shown in the game easy to evaluate. Write how to connect successful purchase to a visible owned or quantity state. Map preview, confirmation, a cancelled choice, a Koin shortage, pending, success, delivery, owned, and reload. Give every failure a safe next action. Open and close the interface during GPU-heavy scenes, then monitor input, frame pacing, and canvas recovery. A commerce overlay should not leave the game loop paused or controls captured unexpectedly.
Coordinate DOM and canvas state
Make the selected item and outcome visible in both interface and gameplay context. Handle focus loss, pointer lock, fullscreen transitions, and a resized canvas around confirmation and return.
Exercise context recovery
Simulate refresh, background suspension, and a lost rendering context. The player-facing purchase result should reconcile separately from graphics recovery and must never duplicate an item.
Name every state and owner
Separate preview, confirmation, pending, success, delivery, owned, insufficient Koin, cancel, interrupted, and reopened states. Assign later production work for identity, persistence, native billing, security, refunds, policy, and monitoring.
Define idempotent recovery
Repeated confirmation, a slow response, navigation during delivery, and reopening must resolve to one result. Record which state is authoritative and how the player can safely retry without another grant or Koin deduction.
Turn the prototype into tickets
Capture the visible behavior first, then create implementation tasks with expected examples for each transition and platform boundary. Do not translate a working browser interaction into an unsupported claim that backend commerce is complete.
Connect success to the item
A success message is not delivery. Place the cosmetic, consumable, unlock, or upgrade in the screen where the player expects to use it. Test that behavior using WebGL games. WebGL rendering and commerce state need separate failure testing.
Show ownership and quantity
Use owned, equipped, unlocked, or remaining quantity as appropriate. The state should match the promise made on the offer card. Test that behavior using WebGL games. WebGL rendering and commerce state need separate failure testing.
Verify delivery after reload
Reload the prototype and return to inventory. The item should remain visible without subtracting Koin or granting a second copy. Test that behavior using WebGL games. WebGL rendering and commerce state need separate failure testing.