PlatformManager01 / 5

Choosing a game platform

Select a platform when building the game.

For Poki, set VITE_PLATFORM=poki when building. The game calls the same PlatformManager methods across platforms. For example, gameplayStart() signals that a session has started and gameplayStop() signals that it has ended.

For Playgama Bridge, select VITE_PLATFORM=playgama. Add playgama-bridge-config.json to game/public/; its minimal content is {}. The build tools load Bridge before the game. Game code continues to use engine.platform; Bridge detects the host platform.

Bridge saves are prepared before platform initialization finishes. With platform-exclusive, the engine uses them without substituting browser records. Set the namespace through system.persistence.

VITE_PLATFORM=pokiSelect the platform at build time
PlatformManagerThe game reports that a session has started
PokiReceives the signal