Play in the metaverse

Drop Four Arena runs in a browser, so it can sit inside any virtual world that lets you show a web page: a frame on the wall that really plays. Below are a live preview and a snippet to copy.

No platform has agreed to host or list Drop Four Arena, and nothing here is a partnership. The embed mode and message names follow the current contract and may change before launch.

Live preview

This is the game exactly as a world would show it. Pick a size and an optional room code, then load it. It starts a 3D scene, so it only loads when you ask.

Size

Four characters from A-H, J-N, P-Z and 2-9. Players who open the link land in that private room.

Labels tournaments run from your space. Letters, numbers, spaces and . _ ' -

play/?embed=world
A match in progress: gold discs against blue discs on a walnut frame, with the stands cheering.

Preview not loaded.

Copy-paste embed

Paste this wherever the platform lets you add a web page or an HTML block. It updates with the choices above.

HTML

Size presets

PresetSizeGood for
Screen1280 × 720Wall screens and stages
Cabinet1024 × 768Arcade-style frames
Square800 × 800Table tops and kiosks
Phone390 × 844Portrait panels, mobile worlds

Parameters

ParameterMeaning
embed=worldShows the game as a kiosk for a world: no store or account screens, no outbound links.
room=K7M2The app’s normal private-room link parameter. In world mode the join command is the documented way to join a room; test the parameter before relying on it. Check
world=NameNames your world. It is echoed in the ready event and labels tournaments you run from it.

Frames need WebGL 2 and, for sound, a click or tap first. Browsers can restrict storage in cross-site frames, so a guest’s saved progress may not persist inside a world; test in the target world. Online play needs the game servers, which are in early access.

Messages between the world and the game v1, may change

In world mode the game is a kiosk: a big Play button over the live board, no store or account screens, no outbound links, and larger touch targets. It talks to the page around it with postMessage. This follows the contract in the repository (docs/contracts.md, “World embed”); it can still change before launch.

MessageDirectionPayload
readyGame to worldworld (the name you passed, or null), online (whether the game server is reachable)
match_startGame to worldmode (ai, local or online), players (nicknames), spectator (online only), tournament (id, name, round) when it is a tournament match
match_overGame to worldmode, winner (0 draw, 1 or 2), winnerNick, score, youWon, plus spectator and tournament when they apply
tournament_resultGame to worldid, name, place (1 champion, 2 runner-up, 3 semifinal, 5 quarterfinal and so on), coins, items, aura
attractGame to worldThe kiosk went back to its idle screen
startWorld to game{ cmd: 'start', mode: 'ai' | 'local' | 'online', level?, firstTo?, clock? }
joinWorld to game{ cmd: 'join', code: 'K7M2' } joins a private room
quitWorld to game{ cmd: 'quit' } returns to the idle screen
JavaScript, in the world’s page
const frame = document.querySelector('iframe');
const GAME_ORIGIN = new URL(frame.src).origin;

window.addEventListener('message', (e) => {
  if (e.origin !== GAME_ORIGIN || e.source !== frame.contentWindow) return; // always check
  const m = e.data && e.data.d4world;           // every event is { d4world: { ev, v: 1, ... } }
  if (!m || m.v !== 1) return;
  if (m.ev === 'ready') { /* the kiosk has loaded */ }
  if (m.ev === 'match_over') { /* m.winnerNick, m.score, m.youWon */ }
  if (m.ev === 'tournament_result') { /* m.name, m.place, m.aura */ }
});

// commands: an object or a JSON string
frame.contentWindow.postMessage({ d4cmd: { cmd: 'start', mode: 'local' } }, GAME_ORIGIN);

The game accepts commands only from the window that embeds it, and ignores anything malformed. Events are sent to any parent origin, so check e.origin yourself and don’t put anything secret in your own messages. Online modes need the game servers, which are not live yet; ready.online tells you whether they are reachable.

Run a world?

If you build or manage a virtual world and want to try the game in it, tell us which platform and what it allows. Nothing here commits either of us to anything.