Game Authoring Examples
Use this hub to choose the example and tutorial path that matches how you want to build a TPG game. Start with the SDK guide when you need the runtime contract, then use one of these framework tracks for concrete structure, packaging, and registry workflow guidance.
Start Here
- Start with the SDK guide for lifecycle events, shell controls, shared state, player state, and runtime messages.
- Use the authoring guide when you are ready to package, upload, review, publish, and verify a bundle.
- Use the registry API reference when you want CI to upload and publish through service endpoints instead of the creator portal.
- Use the external repo workflow when you need a detached repository flow that runs
npm run bundleandnpm run registeroutside the monorepo path.
Framework and Engine Tracks
React
React is the most direct path for web authors who want component-driven host and controller surfaces, explicit cleanup through hooks, and familiar state composition around TPG shared state.
Phaser
Choose Phaser for scene-based 2D games with sprite, camera, and arcade-style input needs. Keep Phaser scene state inside the scene and use TPG shared state only for synchronized room facts.
Kaplay
Choose Kaplay for lightweight 2D games that benefit from a small canvas-first API and quick iteration. It is best for simple action, timing, and physics toys.
Pixi.js
Choose Pixi.js when you want high-performance 2D rendering but prefer to own your gameplay loop and state model instead of adopting a full scene framework.
p5.js
Choose p5.js for creative-coding sketches, drawing prompts, generative visuals, and teaching-oriented games where the sketch loop is the main authoring model.
Three.js
Choose Three.js for 3D scenes, cameras, lighting, and spatial interactions. Keep the 3D render loop local to each surface and synchronize only the game facts players must share.
Godot
Choose Godot when your team wants to build gameplay in an engine and export a web surface that talks to TPG through the browser bridge layer. The tutorial now walks from a Godot 4.x Web export through manifest generation, registry registration, and shell launch verification.
Unity WebGL
Choose Unity WebGL when your game depends on Unity tooling, asset workflows, or existing Unity gameplay code. The tutorial walks from WebGL plug-in setup through manifest generation, registry registration, and shell launch verification against the CI-friendly checked-in example.
Complete Tutorials
Each tutorial includes copyable source, manifest setup, packaging, registration, and launch verification guidance:
- External repo workflow
- React Prompt Relay
- Phaser Rocket Tap
- Kaplay Bounce Rally
- Pixi Crowd Catch
- p5 Signal Garden
- Three Signal Orbit
- Godot Signal Toss
- Unity Bounce Relay
- Game authoring guide
- Registry API reference
The tutorials keep prose and code together so authors can follow the complete path without requiring access to the platform repository.