HTML5Canvas 2DWeb AudioMRAIDPlayable ad
Керування
- Drag a piece from the tray onto the board (it floats above your finger and snaps to the grid); the first touch starts the ad clock
- Keyboard: Tab to pick a piece, arrow keys to move it, Enter to place
- Fill a whole row or column to clear it; clearing several at once or in a row builds the combo
- Reach the goal bar to win; the ad also ends if no piece fits
- The Install button is always on screen and calls the exit API of the chosen network; the end card comes up after the goal or at 30 seconds of play
- Pick AppLovin, Unity, Google Ads, Meta or Browser to change the mock SDK the ad runs against
- Rotate switches the phone between portrait and landscape; Hide ad simulates the ad leaving the screen so it pauses and mutes; Backup shows the static image
- The mute button in the corner silences everything; sound starts only after your first touch
Works in current Chrome, Safari and Firefox on phones and desktops; Canvas 2D and Web Audio in a sandboxed frame, no WebGL and no external requests, one small HTML file. Sound needs a tap to start, as every browser requires. Respects the reduced-motion setting: no screen shake, shorter bursts and a still tutorial hand. The ad-network SDKs on the page are mocks with the real names and call shapes. Block Bloom is a fictional game made for this example.
Питання
Is Block Bloom a real game?
No. It is a fictional game in the style of block-puzzle ads.
Can every player win?
Yes. The pieces come from a fixed seeded sequence, so every run is the same and winnable; the goal is 500 points.
How does it teach the first move?
The board starts pre-filled so the first tray clears three rows, and a hint hand shows the first drag.
Does it load any images or sounds?
No. Everything is in one HTML file with no image or audio file and no external request.
Як це зроблено
A block-puzzle playable, the puzzle pattern behind Tetris Block Party, Shape Escape and Block Blast ads (one of the biggest themes among the 67 playables 24Play lists on its playable-ads page). It is built the way ad networks take playables: one self-contained HTML file that starts when the network says it is ready, is playable at once and ends on an install card. The page runs it inside a phone on a mock ad network, so every rule a network checks is visible while it plays. Block Bloom is a fictional game made for this example.
The playable
- Source in
src/playables/block-bloom/, built by node scripts/build-playable.mjs block-bloom into public/lab/ads/block-bloom/index.html: one file with the script and styles inlined, no image or audio file, no external request. backup.jpg is a frame of the ad itself. - Flow: an 8x8 board starts pre-filled, so the first tray (a 3-wide, a 3-wide and a 5-wide piece) clears three rows; a hint hand shows the first drag. Full rows and columns burst and build a combo multiplier. Later trays come from a fixed seeded sequence, so every run is the same and winnable. The goal is 500 points; the ad ends on the goal, when no tray piece fits, or 30 s after the first touch.
- All rules are in
logic.ts (unit-tested): placement, clear detection, scoring and combo, the piece sequence, the ghost snap and the stars. A test plays a greedy bot through the fixed sequence and it reaches 500 points in 17 moves. - Dragging uses pointer events with a finger offset, so the piece floats above the thumb, snaps a ghost to the grid and tints red when it does not fit. Keyboard: Tab or 1 to 3 picks a piece, arrows move it, Enter places it.
- Sound is Web Audio only (
src/playables/shared/sfx.ts), started by the first gesture, with a mute button. Reduced motion: no shake, shorter bursts, a still hint.
Network behaviour
- Shared with the other 2D playables in
src/playables/shared/host.ts: the ad waits for the SDK (MRAID ready, then viewable), pauses when it is not viewable, and the Install button calls mraid.open(url), ExitApi.exit(), FbPlayableAd.onCTAClick() and finally window.open(clickTag). - It reports each placement, the outcome, the end card and install taps with
postMessage; the preview lists the numbers carried in detail.stats.
The preview page
- The phone, mock SDKs, ad clock, session counters and ad-ops checklist are the shared
PlayablePreview component (src/components/lab/playable-preview/); this folder only passes the copy, the theme and the four counters.
Honest limits
- The SDKs are mocks with the real names and call shapes, not the networks' own code. Check each network's current size limit and review rules before trafficking.
- The store link is a placeholder search on Google Play, because the game does not exist.
- The sound could not be judged by ear in an automated run; the layout was checked at 320x480 only.