Four in a Row for two players

A 3D project by R3 team.

First published 27 November 2026, last updated 28 November 2026.

Play Four in a Row with a friend: send the invite link, take turns dropping pieces, and get four in a line to win. Works on phones and computers. Made with R3, and easy to remix.

Made with R3 using code.

How to play

Play with a friend

  1. Press Invite a friend and send the link (it is copied, and shown on the screen).
  2. Your friend opens the link and is in your game. You press Start.
  3. The room picks who starts: that player is Red.
  4. Tap or click a column to drop your piece. The floating piece above the board shows whose move it is.
  5. Four of your colour in a line (across, up or diagonal) wins. Play again starts a new game; the loser starts it.

Make your own version (Remix)

Open the Four in a Row script (game_script). The settings are at the top:

const COLS = 7;          // columns across
const ROWS = 6;          // rows up
const WIN_LENGTH = 4;    // how many in a line win
const PLAYER_COLOURS = [0xd8342c, 0xf2c230];   // first player, second player
const PLAYER_NAMES = ['Red', 'Yellow'];
const BOARD_COLOUR = 0x1f4fb5;
const HOLE_COLOUR = 0x0a1630;
  • A bigger board: COLS = 9, ROWS = 7. The camera fits any size by itself.
  • Five in a row: WIN_LENGTH = 5.
  • New colours: hex colours such as 0x2ecc71 (green). Change PLAYER_NAMES to match.

The rules (dropping a piece, finding a winning line) are in the code module four-in-a-row-rules. The tap is the script tap_a_column; the button is button.