sub.games

Publishing Games

How to upload and configure games on sub.games.

Games on sub.games are browser-based and run inside iframes. You host the game yourself (or use any static hosting) and provide the URL to the platform.

Adding a Game

From the creator dashboard (sub.games/publish/games):

  1. Click "Add Game"

  2. Fill in the game details:

    • Name — the title players see
    • Description — what the game is about
    • Game URL — the publicly accessible URL where your game is hosted
    • Cover Image — displayed on game cards across the platform
    • Video — optional gameplay preview
  3. Set the visibility (who can access it):

    • Public — anyone, no account needed
    • Free — requires a free account
    • Supporter — requires a Supporter subscription
    • Founder — requires a Founder subscription
  4. Publish when ready

Game Key

Every game gets a unique game key when created. This is a URL-friendly slug derived from your game name (e.g., a game named "My Platformer" gets the key my-platformer). The game key is permanent and cannot be changed.

You'll need this key if you integrate the Browser SDK.

Where to find it:

  • Right after creation — the game key is shown on the success screen with a copy button
  • Any time later — find it on the game's settings page in the dashboard

Game Hosting

sub.games doesn't host your game files — it embeds your game via iframe. You can host your game on any static hosting provider:

  • GitHub Pages — free, works well for static games
  • Vercel / Netlify — free tier available, good for more complex setups
  • itch.io — common for indie games, but check iframe embedding permissions
  • Your own server — any web server that serves HTML

Your game URL must be publicly accessible and serve over HTTPS.

SDK Integration (Optional)

Adding the Browser SDK to your game enables:

  • Tier-gating — lock features behind subscription tiers
  • Login prompts — let players sign in without leaving your game
  • Subscribe prompts — convert players to subscribers in-game
  • Game overlay — adds like, comment, share, and subscribe UI to your game
  • Pause/unpause — automatically pauses your game when SDK modals are open

SDK integration is optional. Games without the SDK still work on the platform — they just can't gate individual features or prompt subscriptions from within the game.

Quick Setup

Install the SDK in your game project:

npm install @subgames/sdk

Then initialize it with your game key:

import { SubGamesSDK } from '@subgames/sdk';

const sdk = SubGamesSDK.init({
  gameKey: 'my-platformer', // your game key from the dashboard
  overlay: true,            // adds social UI (like, comment, share)
});

// Pause your game loop when SDK modals open
sdk.on('pause', () => game.pause());
sdk.on('unpause', () => game.resume());

If you don't use a bundler, include the SDK via CDN:

<script src="https://cdn.sub.games/sdk/latest/index.js"></script>
<script>
  const sdk = SubGames.SubGamesSDK.init({
    gameKey: 'my-platformer',
    overlay: true,
  });
</script>

Once initialized, the SDK automatically handles session management and prompts unauthenticated players to subscribe after 30 seconds. See the full Browser SDK documentation for tier-gating, login prompts, and event handling.

Game Status

Games have three statuses:

  • Draft — only visible to you
  • Published — visible to players (based on the game's visibility setting)
  • Admin Draft — held for review by platform admins

Tips

  • Test your game URL in an iframe before publishing to make sure it loads correctly
  • Use a descriptive game key if you're integrating the SDK — it's permanent and used in API calls
  • Add a cover image — games without one don't show up well in feeds and search results

On this page