Store art: posters
Store art made by the game's own code (game.poster), and pictures to look at (shot).
game.poster(name, setup) registers a staged scene for the game page. Opening the game with ?poster=cover draws that scene
instead of the game, at an exact size and a pixel ratio of 1, frozen and deterministic. npx @onceworlds/cli posters opens your
latest draft that way and saves a picture of each into store/<name>.png, naming icon and the 16:9 pictures in
onceworlds.json when it has none.
game.poster('cover', (p) => { // 1920 x 1080 by default; 'icon' is 512 x 512, 'badge-*' 256 x 256
p.camera({ height: 10, clear: '#203040' });
p.world.spawn([Transform(), Shape2D({ shape: 'circle', radius: 2, fill: '#ffd23f' })]);
feelOf(p.world).particles.burst('confetti', { x: 0, y: -4 });
p.settle(0.8); // simulate a little first, with the seed fixed
});
- Icon: one simple subject (the player, the main object) on a plain or softly shaded background, no words, nothing important in the outer 10%. Thumbnails: three to five, the first (the cover) the best picture of the game being played: real action with several things going on, the subject in the middle, any word short and large. Not the title screen, not a logo.
- Compose the scene on purpose: spawn the characters in a pose, set the camera, burst the particles,
settlea moment. Look at the result at 128 px wide: if you can't tell what the game is, redo it.
Pictures to look at: shot
npx @onceworlds/cli shot saves a PNG of the game for you to look at (the MCP tool screenshot returns it to the model directly):
shotalone: the first player's screen 8 seconds into a simulated match with bots (--at 20for later).--poster coverdraws a poster instead.--size 390x844is a phone held upright.- A 2D game draws without a browser, from the same draw list the game sends to the screen (text in the engine's font). A 3D game, or
--browser, is drawn by Chrome, Chromium or Edge on this computer from a local copy of the game, opened with?autoplay: a game on Flow presses Play and starts its match by itself, and the picture waits for a moment of play. - Look at it at the size a player sees it: can you tell what the game is, who you are, what to do and the score?