Publishing Games
G3Engine makes it effortless to publish your game across multiple platforms. With one click, export your creation to X/Twitter, Telegram Mini Apps, standalone web URLs, and more.Publishing Overview
When you publish a game, G3Engine:- Serializes your scene to JSON format
- Uploads to decentralized storage (Arweave via Irys)
- Generates a permanent URL for your game
- Creates platform-specific metadata (Twitter Player Cards, Telegram manifests, etc.)
- Returns a shareable link instantly
The Publish Button
- Your scene serializes to JSON
- Assets upload to Arweave (permanent, decentralized storage)
- Platform-specific metadata generates
- Permanent URL creates
Platform-Specific Publishing
X (Twitter) Player Cards
A Twitter Player Card embeds interactive content (like games) directly in tweets. When someone posts your game link:
<meta name="twitter:card" content="player" />
<meta name="twitter:title" content="My Awesome Game" />
<meta name="twitter:description" content="Play now!" />
<meta name="twitter:player" content="https://engine.gg/play/g_abc123" />
<meta name="twitter:player:width" content="800" />
<meta name="twitter:player:height" content="600" />
<meta name="twitter:image" content="https://engine.gg/thumbnails/g_abc123.png" />
Telegram Mini Apps
Telegram Mini Apps are web-based apps that run inside Telegram. They occupy the full chat window and feel like native apps.
100vw × 100vh viewport (fills the screen)Standalone Web URL
Farcaster Frames (Web3)
Farcaster Frames are interactive embeds on Farcaster (decentralized social network). Frames support:
Base App (Web3)
Scene Export Format
When you publish, your scene serializes to this JSON structure:- Uploads to Arweave (permanent, immutable storage)
- Generates a permanent URL (never expires, never changes)
- Loads client-side in the published game player
Decentralized Storage (Arweave)
https://engine.gg/play/[txID]- Example:
https://engine.gg/play/g_abc123→abc123
Updating Published Games
Embedding Games
<iframe
src="https://engine.gg/play/g_abc123"
width="800"
height="600"
frameborder="0"
allowfullscreen
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
></iframe>
<div style="position: relative; padding-bottom: 75%; height: 0; overflow: hidden;">
<iframe
src="https://engine.gg/play/g_abc123"
style="position: absolute; top: 0; left: 0; width: 100%; height: 100%;"
frameborder="0"
allowfullscreen
></iframe>
</div>
Publishing Best Practices
Test Before Publishing
Always test your game thoroughly in Play mode before publishing. Published games are immutable.
Optimize Asset Size
Keep your game under 10MB for fast loading. Use optimized materials and limit object count.
Add Instructions
Include in-game tutorials or “How to Play” text. Not all platforms show external descriptions.
Mobile-Friendly
Test on mobile devices. Use larger touch targets and simplified controls for touch screens.
Analytics and Tracking
- Plays - Total play count
- Unique Players - Distinct users
- Avg. Session - Average play time
- Platform Breakdown - Where players found your game
Troubleshooting
Publish button grayed out
Publish button grayed out
Twitter card not showing
Twitter card not showing
Wait 24-48 hours for Twitter to cache the metadata. Use Twitter Card Validator to debug.
Game loads but nothing appears
Game loads but nothing appears
Verify:
- Scene has a camera
- Objects are visible (visible: true)
- Scene has lighting (add Ambient + Directional Light)
- Camera is positioned correctly
Web3 features don't work in published game
Web3 features don't work in published game
Ensure:
- Web3 is enabled (toggle in Top Bar)
- Game published with web3Enabled: true
- Players connect wallet before using Web3 features
- Correct network (Devnet vs Mainnet)
Game too slow on mobile
Game too slow on mobile
Optimize:
- Reduce object count (< 100 objects)
- Limit lights (2-3 max)
- Disable expensive features (real-time shadows, etc.)
- Use simpler materials (higher roughness)
Example: Full Publishing Workflow
Advanced: Custom Deployment
For advanced users, you can self-host:import { G3Runtime } from '@g3engine/runtime';
const runtime = new G3Runtime({
sceneUrl: 'https://yourdomain.com/scene.json',
container: document.getElementById('game-container')
});
runtime.load();
runtime.play();
Next Steps
Congratulations! You’ve published your game to the world. What’s next:- Share your game on social media
- Gather player feedback
- Iterate on your design
- Build more complex games
- Explore Web3 monetization
- Join the G3Engine community
- Creating Your First Game - Build another game
- Web3 Wallet Setup - Monetize with crypto
- Adding Interactivity - Advanced visual scripting