First online game? Start here

AI Prompts To Build Multi-Player Games

You do not need to understand game servers before you begin. Pick the description that sounds like your game, copy one complete prompt, and let your AI coding tool work through the right tasks in order.

multiplayer-plan.mdStart here

01Does the game end after a match?

02Should items still exist when the player returns tomorrow?

03How many players are together at one time?

04Copy one complete prompt and let the AI follow every stage.

Only two players? Start with “1v1 PvP / two-player game.”
Step 1 · Pick what sounds like your game

Which kind of online game are you making?

Do not worry about technical names yet. The biggest question is simple: does each game end, or are you building a world that players return to over and over?

Exactly 2 players

1v1 PvP / two-player game

This is the lightest online setup. The two players connect, play one match, and leave.

Typical requirements

  • An invite or simple room code
  • A direct or hosted connection
  • Clear rules for who controls the match
  • A simple disconnect rule
Keep it simple

Usually skip matchmaking, parties, public lobbies, server fleets, world areas, and MMO systems. Use the dedicated 1v1 prompt below.

Usually 3–12 players

Small group game

A small group joins a match or co-op session and leaves when it ends.

Typical requirements

  • A lobby or invite for the group
  • A player host or separate game server
  • Rules for joining and leaving
  • A plan for results or saved rewards
Keep it simple

Keep it match-based. Do not add MMO world systems just because more than two people are playing.

Many players in one match

Large online match

The game still ends after each round, but many players or objects are active at once. Think battle royale or a large battlefield.

Typical requirements

  • Everything in a small online game
  • A separate computer running the match in most cases
  • Only sending nearby information
  • Testing with many fake players
Keep it simple

A big match is not automatically an MMO. If the world resets after the match, keep the setup match-based.

Characters and the world stay

Online world (MMO)

Players come back later and expect their character, items, money, friends, and world changes to still be there.

Typical requirements

  • Everything needed for online play
  • Reliable character and item saves
  • Ways to split a large world into areas
  • Backups and recovery when something breaks
Keep it simple

MMOs are much harder. First prove that one player can log in, enter one area, save one change, and safely return.

Quick chooser

Compare the four choices.

Simple question1v1 gameSmall groupLarge matchOnline world (MMO)
Does the game end after each match?YesYesYesNo—the world keeps going
Do characters and items need to stay?Usually noOnly basic progress, if wantedOnly basic progress, if wantedYes
Can one player host the game?UsuallyOftenUsually notNo
Do you need a separate computer to run the game?Usually noOptionalUsuallyYes
Do you need matchmaking?Usually noMaybeUsuallyOften
How should you start?Connect two playersConnect one small groupBuild a small match firstBuild one small world area first
Step 2 · Tell the AI what you need

Choose one task. Copy one prompt.

The text inside the prompt is technical on purpose. You do not need to understand every word. Paste it into your AI coding tool and let it inspect your project before it changes anything.

Start here · First step

Choose the simplest online setup

Let the AI look at your game and decide whether it needs a small match, a large match, or an MMO setup.

Use this when

Anyone adding online play for the first time. Start here if you are unsure.

prompt.md
# Classify this multiplayer game before designing its backend

Act as a principal multiplayer game architect. Read the game design, repository, tests, and deployment setup. Do not implement yet.

## Inputs to establish
- Engine and client platforms
- Competitive, cooperative, social, or mixed play
- Players per match, room, zone, and region
- Whether sessions end and what state survives them
- Whether direct P2P, deterministic lockstep or rollback, a listen host, or dedicated servers fit the trust and scale requirements
- Tick rate, latency tolerance, movement speed, projectile speed, and physics needs
- Party, lobby, matchmaking, server browser, voice, chat, spectator, replay, and reconnect needs
- Character, inventory, economy, guild, quest, housing, world-state, and trading persistence
- Expected concurrency now, at launch, and at a realistic growth milestone

## Required decision
Classify the game as one of these, while noting any hybrid needs:
1. Session/PvP multiplayer: bounded matches or rooms that end.
2. Large-session multiplayer: bounded sessions with higher player counts or more aggressive interest management.
3. MMO/persistent world: durable identity and world systems across realms, shards, zones, and instances.

Produce a requirements table with Required now, Later, and Not justified columns. Include authority, direct P2P or listen-host feasibility, signaling, NAT traversal, relay fallback, host selection and migration, transport, prediction, reconciliation, interpolation, rollback or lockstep, lag compensation, lobby and party flow, matchmaking, server allocation, persistence, realms, zones, instances, interest management, economy safety, moderation, observability, load testing, disaster recovery, and estimated operational complexity.

Recommend the smallest architecture that satisfies the evidence. Explicitly list MMO systems that must not be added to a PvP-only game.
## Delivery rules
- Inspect the repository, current documentation, deployment configuration, tests, and existing networking code before proposing changes.
- Preserve working systems and explain every material tradeoff. Do not replace the engine, transport, database, cloud, or identity provider without evidence.
- Choose and document the authority model. A dedicated server or listen host validates client intent; deterministic lockstep or rollback peers exchange inputs, detect desync, and accept the stated peer-trust limits.
- Prefer provider-neutral interfaces around identity, sessions, persistence, realtime transport, matchmaking, hosting, and observability.
- Separate the smallest safe first milestone from later scale work. Do not design MMO infrastructure for a bounded PvP match.
- Add or update architecture documentation, sequence diagrams, failure behavior, security assumptions, tests, metrics, and rollback steps.
- End with changed files, commands run, measured evidence, unresolved risks, and a definition-of-done checklist.
Optional · You can use any provider

What Glitch can help with.

You do not have to use Glitch. If you choose it, Glitch can provide useful online building blocks. Your game still needs its own rules and some connecting code.

Glitch can help with

  • Help players find and join a game
  • Keep a list of available game servers and open spaces
  • Create short-lived passes that let a player join
  • Organize MMO worlds into realms, areas, and private copies
  • Host a web game, website, or supporting online service
  • Provide databases for accounts, progress, items, and other saved data

You still need to build or connect

  • The actual game rules, movement, combat, and what counts as a win
  • Direct player connections, backup connection services, and changing hosts when a player runs the match
  • The code that decides which waiting players should play together
  • The code that starts or chooses a dedicated game server
  • The rules for saving characters, items, money, quests, and world changes
  • Full voice chat, large game-server fleets, and other services not listed as complete features
Need help with the rest of your game?

Use the general guide for art, gameplay, testing, and release.

This page only covers online play. The general guide helps with the rest of the game.

Open general game prompts

See More of Glitch's Indie Tools