Skip to content

Merge Cubes

A 2048-style merge puzzle with glowing cubes. Swipe to slide, merge matching numbers, and chase that 2048 tile.

By Daily AI Games Team Published Oct 10, 2026 Updated Oct 18, 2026 2,650 plays

2,650 plays · runs in a sandboxed frame

Share this game: X Facebook Reddit

How to Play

Desktop: arrow keys or WASD to slide the grid. Mobile: swipe in any direction. A move only counts if at least one tile moves or merges.

Game Preview

Merge Cubes gameplay screenshot
Merge Cubes in action — an AI-generated game you can play free in your browser.

About Merge Cubes

Merge Cubes is our AI-generated take on 2048, the merge puzzle that ate the world a decade ago — and still eats an afternoon now. You slide a 4x4 grid of glowing number cubes; matching values smash together and merge into their sum; after every successful move a new cube appears. The goal is simple to state and deceptively hard to achieve: build the 2048 cube without filling the board. If no merges are possible, the run ends and your final score — the sum of everything you merged — goes up on the board.

The genius of 2048 has always been that it is a spatial planning game wearing an arithmetic costume. Merge Cubes preserves that completely: veterans will immediately start corner strategies, keeping the big cubes pinned while routing small ones into them, while newcomers will pick up the core loop in about ten seconds. Tiles slide with smooth animation and merge with a satisfying pop, the board glows faintly in our neon house style, and a session-best score sits in the corner quietly judging your decision-making.

It plays everywhere with equal fluency. On desktop you use the arrow keys or WASD; on mobile you swipe in any direction. Games run a few minutes each, and thanks to instant restarts the pull of correcting "one bad move" is immediate. It is one of the most replayed games on the site per person — merge puzzles seem to invite just-one-more the way runners never quite do.

As an AI-generated game, Merge Cubes has an engineering story worth reading. 2048 seems simple but is famous for subtle logic bugs — triple tiles merging twice in one move, spawns after moves that changed nothing, edge pushes that eat tiles. We prompted Gemini in Google AI Studio to implement the slide-merge as a pure function, separate from all rendering code, and then to list the edge cases it handled. The first build passed every test we threw at it, which is the strongest result we have seen from a single generation pass. The exact prompt is in our library; if you want to learn how AI handles tricky state logic, this is the case study.

How This Game Was Generated

Generated with Gemini 3 in Google AI Studio using our merge-2048 prompt, which forces the slide-merge logic into a pure function. First build was correct across all edge cases we tested — the strongest single-pass result of any game on this site.

The Prompt Behind This Game

Show the prompt used to generate Merge Cubes
Build a 2048-style merge puzzle game as ONE self-contained HTML file (all CSS/JS inline, no libraries, works offline).

Rules to implement exactly:
- 4x4 grid. Swipe (touch) or arrow keys move all tiles. Optionally WASD.
- Tiles with the same value merge once per move into their sum. Spawns a 2 (90%) or 4 (10%) in a random empty cell after every successful move.
- Game over when no merges are possible; win banner at 2048 with a "keep going" option.
- Score = sum of merged values; best score kept for the session.

Implementation requirements:
- Implement slide-merge as a pure function of (grid, direction) returning the new grid, merges and gained score — so it is testable. NO DOM manipulation inside that function.
- Smooth tile slide animation (CSS transforms are fine) and a small pop animation on merge.
- Tiles must be positioned with transforms so animation is cheap; 60fps target.
- Handle rapid key input gracefully (queue or throttle).
- Responsive: canvas or DOM-based is fine, must scale to phone screens.

Then print: the merge function alone, followed by a list of edge cases you handled (corner pushes, triple tiles, spawn after no-move, etc.).
Open in the prompt library for tips and variations

Similar AI Games