Home › Guides › Two-player games from a prompt: one phone, two thumbs — and the step to online rooms

Two-player games from a prompt: one phone, two thumbs — and the step to online rooms

How to describe a same-phone two-player game (split touch zones, turns, a shared timer) so the controls come out right, how to test it in the preview, and what changes when the second player is on another phone.

Updated October 2, 2026 · 1051 words · Ready-made apps · more on this topic

For a game on one phone, describe who owns which part of the screen and what each touch does; the agent writes separate controls per player. For two phones, ask for rooms by code and say which state to share — the relay is built in and works in the preview and the APK.

Local first: the two layouts that work

Two people around one phone is the oldest multiplayer there is, and the easiest to build because nothing leaves the device. Two layouts cover almost every game:

  • Split screen. The phone lies flat or is held landscape; each player owns one half and taps, holds or drags on it. Air hockey, tug of war, reaction duels, a tiny football game. The controls must be mirrored so both players see "their" side the right way up.
  • Pass and play. One shared board and a turn indicator; the phone changes hands. Board games, drawing games, quizzes with a buzzer, anything turn-based.

A third, rarer layout is the shared control: both thumbs on one field, for example a co-op where one player steers and the other shoots. Describe it the same way — who owns which zone.

Describing a split-screen game

The agent needs three things: the orientation, the zones, and what a touch does in each zone. A reaction duel:

A two-player reaction duel on one phone in landscape. The screen is split in two halves, each half rotated to face its player. A shape appears in the middle at a random moment; the first player to tap their half scores a point, tapping early loses one. First to seven wins. Show each player's score on their side, mirrored, and a rematch button in the middle.

The agent builds two large press zones with separate handlers, keeps the shared timer in the game loop, and mirrors the second player's HUD with a rotation transform. In the emulator preview you can press one zone with the mouse — enough to see that the early-tap penalty works. The feel of simultaneous play needs two thumbs, so build the test APK and hand the phone to someone.

For games with movement — air hockey, a two-paddle pong — say "each player drags their paddle within their half". The agent writes a drag handler per zone that ignores touches from the other half, which is the detail that makes multi-touch work.

Describing pass and play

Turn-based games are about state, not input. Say what a turn consists of and what the phone shows while it changes hands:

A pass-and-play word game: a 5x5 letter grid, players alternate turns, a turn is selecting a path of adjacent letters that forms a word; found words are removed from both players' options. Between turns show a "Pass the phone to Maya" screen that hides the grid until the next player taps. Keep a running score and end after ten rounds.

The hand-over screen is the important part: without it, the next player sees the previous player's thinking. The agent adds it as an overlay and keeps names in state; "remember the players' names for the next game" turns them into stored settings.

What to watch in the preview

  • Both zones react independently — a press in one half never moves the other paddle.
  • Mirrored text reads correctly from each side; in the preview, rotate your head rather than the phone.
  • The turn indicator and hand-over screen appear every turn, including after a pause.
  • A rematch resets everything, including the random seed if the game has one.

Install the APK before tuning timings: tap latency on a real phone is lower than a mouse click in the preview, and reaction games feel different.

Going online: rooms by code

When the second player is on another phone, the game joins a room and shares state through the built-in realtime relay. No server to set up on your side; it works in the emulator preview (open two previews and join the same code) and in the installed APK. Describe the lobby and what is shared:

Add online two-player mode. A lobby screen creates a room with a four-letter code or joins one. Share each player's paddle position every frame and the ball's position from the host; the host decides goals. Show "waiting for a player" until both are in, and a rematch that both must accept.

Two decisions matter and the agent will ask if you leave them out. First, who is authoritative: for a physics game, one phone (the host) owns the ball and the other sends only input; for a turn-based game, the current player's move is the truth. Second, what to share: positions every frame for action, a single move per turn for board games. Sharing too much makes the game stutter on bad connections; sharing too little makes the two phones disagree.

Presence comes with the room — "show the other player's name and a green dot while connected, and pause when they drop" is one sentence. So is a spectator count for a party game.

Scores across two phones

A room is temporary; a leaderboard is not. If the online duel should rank players, the winner's result goes to the same scores collection described in the leaderboard guide, written by the host at the end of the match. Keep the match id with the row so a disputed result can be found.

Browser games with two players

A canvas game played on one laptop gives each player a set of keys — WASD for one, arrows for the other — and the agent writes both handlers when you say so. Online rooms work the same as on phones. Remember the published site keeps nothing between visits, so names and settings belong in the backend if the link is shared widely.

Checklist

  • Local: zones, orientation and the hand-over screen are described, not implied.
  • Test simultaneous play in the APK with two thumbs, not in the preview.
  • Online: name the host and the shared state in the request; add presence and a mutual rematch.
  • Match results go to the scores collection if the game has one; the level data is shared by both sides automatically.
  • Try a few games made here on a second device before designing the lobby — the simplest lobby is usually the right one.

Frequently asked

Can two people really play on one phone?

Yes. The classic layouts are split screen (each player owns half the glass) and turn-based (the phone passes hands). The agent writes separate touch zones for each player.

How do I test two players in the preview?

With a mouse you can press one zone at a time, which is enough for turn-based games. For simultaneous play, install the test APK and use two thumbs — or two fingers on a touch laptop.

What is needed for online play?

Nothing to install: the game joins a room by code on the built-in realtime relay, which works in the emulator preview and in the APK. You decide what gets shared each tick.

Does online play need accounts?

No. A room code and a chosen name are enough for a casual game; add sign-in only if you want persistent profiles.

Can a browser game be two-player?

Yes, on one keyboard (WASD and arrow keys) or online through the same rooms.

Build it now — free to start

Type the idea, sign in, and the agent builds it in your browser. Change anything by describing it.

Open the builder ›