๐Ÿ—๏ธBuild a Game

This document covers everything you need to know to build and submit a game to the Ape Church platform, including what kinds of games are supported, how to use AI coding tools to build faster, and how to get your game reviewed.

What You're Building

All games on Ape Church are Player vs. House. The player places a bet, an on-chain random number is generated, and your game resolves that result into a payout multiplier. You build the game logic and the visual experience - we handle the blockchain, the liquidity pool, and the platform.

Think of it like this: the chain gives your game a random number, your game turns that into an outcome, and the player wins or loses based on what happens.

Supported Game Types

Single-Roll / Instant Resolution

The player sets their parameters, one action resolves the outcome immediately.

  • Dice - Pick an over/under threshold. Payout scales with win probability.

  • Limbo - Pick a target multiplier. Win if the result hits it.

  • Coin Flip - Binary. 2x or nothing.

  • Colors - Bet on a color from a weighted set.

  • Wheel - Weighted segments with fixed multiplier tiers.

Progressive / Cash-Out

A value builds over time. The player decides when to exit.

  • Crash - A multiplier climbs until a random bust point. Cash out before it crashes or lose everything.

Multi-Step / Decision-Based

Sequential decisions that affect the outcome.

  • Twenty-One - Hit, stand, double against a dealer hand.

  • Baccarat - Player, banker, or tie with standard rules.

  • Video Poker - Draw and hold mechanics with paytable payouts.

Grid Reveal / Mine-Style

The player reveals tiles, accumulating risk as they go.

  • Blocks (Mines) - Reveal tiles to find multipliers or busts. Cash out anytime.

  • Tower - Climb rows picking safe tiles. Higher rows, higher multiplier.

What We Can't Support Yet

  • PvP games (poker tables, head-to-head) - no peer matching infrastructure

  • Sports or event betting - requires external oracle feeds not yet integrated

  • Progressive jackpots - shared pool doesn't support cross-game jackpot accrual

If you have a game idea that doesn't fit neatly into the above categories, reach out before building; we may be able to support it.

Key Constraints

Before you start, keep these in mind:

  • Your game must accept a wager amount and return a payout multiplier (including 0x for a loss).

  • Randomness comes from the chain; your game consumes it and doesn't generate it.

  • All games settle against the house pool; maximum payout is bounded by pool liquidity.

  • House edge is configurable per game but must fall within protocol-defined bounds.

How to Build Your Game

We recommend using an AI coding agent to build your game. Claude Code, Cursor (Agent mode), and OpenAI Codex all work well. You do not need to be an experienced developer, but you do need to be hands-on with the tool and test your game as you go.

Step 1. Get the template

Go to the game template repository and click "Use this template" โ†’ "Create a new repository". This creates a clean copy in your own GitHub account.

Template repo: ape-church-game-templatearrow-up-right

Do not fork the repo - use the template button. Forking creates a link back to the template that will cause issues when submitting.

Step 2. Open the project in your AI coding tool

Claude Code

Cursor Open the folder in Cursor and switch to Agent mode (not Chat).

OpenAI Codex Open the folder in the Codex interface.

Step 3. Send your first prompt

This is the most important step. Before asking the agent to build anything, tell it to read the instructions first. Copy and send this prompt exactly:

Replace [game type] and the description with your actual game. Be specific: the more clearly you describe the game, the better the output.

Example:

Step 4. Test as you go

Run the game locally while you build:

Open http://localhost:3000 in your browser. You should see the game running. Test it continuously as the agent builds - don't wait until the end to check if things work.

Things to test as you go:

  • Does the game render correctly before any bet is placed?

  • Does playGame() start the game and show the result?

  • Does handleReset() return it to exactly the starting state?

  • Can you handleRewatch() the previous game without placing a new bet?

If something looks wrong, describe it to the agent and ask it to fix it.

Step 5. Ask the agent to run the checklist

When you think the game is done, send this prompt:

This catches most common issues before submission.

Step 6. Fill out metadata.json

The file is already in the root of the repo. You can ask the agent to fill it out:

Review what it fills in, and make sure gameName matches your folder name exactly and all fields are present.

Step 7. Submit

When your game is ready, submit it to the submissions repository. Follow the README there for exactly which files to include in your pull request and how the review process works.

Submissions repo: ape-church-game-submissionsarrow-up-right

Tips for Working with AI Agents

  • Ground the agent first. Always start with the prompt in Step 3. Agents that skip SKILL.md produce inconsistent code that fails review.

  • Be specific about your game. Vague prompts produce vague games. Describe exactly how the player interacts, what the win condition is, and what the visual experience should feel like.

  • Test frequently. Don't let the agent build for 30 minutes without checking the result. Test after each meaningful change.

  • Describe issues clearly. When something breaks, describe what you expected vs. what happened. Screenshots help. The more context you give, the faster it gets fixed.

  • Don't let the agent go off-script. If it starts modifying files outside components/my-game/ or public/my-game/, stop it and redirect. Those files are platform-managed and changes there will be rejected.

Questions or Issues

If you run into problems while building or have a game idea you want to discuss before starting, please contact us here [email protected], Telegramarrow-up-right or Discordarrow-up-right.

Include a description of your game idea or the issue you're running into, and we'll get back to you.

Last updated