makepad/skills/makepad-image-generator/SKILL.md
Arena Agent fe21c07d84 skills: add Makepad game skills pack ported from threejs-game-skills
Nine agent skills for building Makepad/Rust games, ported from
majidmanzarpour/threejs-game-skills. Same director-routed workflow and
premium bar; runtime rewritten for this fork's game crates.

- makepad-game-director        entrypoint, routing, continuity, asset probe
- makepad-gameplay-systems     loop, movers vs rigid bodies, input, camera, netplay
- makepad-aaa-graphics-builder lighting, shaders, budget, visual scorecard
- makepad-game-ui-designer     HUD, menus, touch and XR UI
- makepad-debug-profiler       defect bisection and profiling
- makepad-qa-release           verification ladder, evidence, packaging
- makepad-3d-generator         CC0 model search, casts, procedural geometry
- makepad-image-generator      texgen textures, palettes, sky, icons
- makepad-audio-generator      sample bank, mixer, material impacts, 3D audio

Written against the real APIs in libs/game/*, libs/sim and apps/arcade:
the game.* verb table, GameRenderer adaptive quality, the packed 6-float
GameMeshVertex layout, script_mod! splash styling, makepad-test driving,
and the BUDGETS.md numbers. No paid generation API is required - the CC0
library plus seeded makepad-game-gen replaces them.

Includes install.sh (Codex/Claude), validate-skills.sh and a repo-aware
probe_assets.sh; both scripts verified against this checkout.
2026-09-05 21:18:58 +00:00

5.4 KiB

name description
makepad-image-generator Create and source 2D image content for Makepad games: procedural tiling textures with makepad-game-gen texgen, palettes and colour variety, skies and gradients, HUD icons and GUI art, and library texture sourcing. Use for texture, material map, sky, palette, icon, logo, splash art, and 'everything looks flat' requests.

Makepad Image Generator

Textures and 2D art, from two sources: procedural (makepad-game-gen::texgen) and the CC0 library. No paid image API is involved.

The most common reason a Makepad scene looks unfinished is that every surface is flat vertex colour. Texture is the fix, and procedural texture costs nothing to download and replicates from a seed.

Procedural textures — texgen

Deterministic from a seed (makepad-game-gen::rng + makepad-game-math), so the same texture regenerates identically on every device and replicates as a seed rather than as pixels. Uploaded through DrawGameTexture and referenced by ModelInstance::with_texture(idx).

Build textures in layers, exactly as you would paint them:

  1. Base value — the average tone. Get this right first; it dominates the read at distance.
  2. Large variation — low-frequency noise, patches, weathering. This is what stops tiling being visible.
  3. Structure — planks, bricks, tiles, grain. The thing that says what the material is.
  4. Small detail — grit, scratches, speckle. Only visible up close; skip it for distant surfaces.
  5. Edge wear — lighter or darker along structural edges. The single most convincing layer.

Recipes:

Material Layers
Ground / dirt brown base, large blotch noise, fine grit, sparse pebbles
Grass green base, two-tone patch noise, fine directional speckle
Stone grey base, large value patches, crack lines, edge highlights
Wood tan base, directional grain, plank seams, darker knots
Metal mid base, subtle brushed streaks, edge highlights, rust at edges
Sand pale base, ripple sine bands, fine speckle

Tiling discipline. Wrap noise so opposite edges match, or the seam shows on every repeat. Keep the base value low-contrast — a high-contrast tile reads as a grid the moment it repeats more than about four times. Break up remaining repetition with per-instance tint and yaw jitter, not with a bigger texture.

Texel density. Match the tiling scale to world units so density is consistent across surfaces. Inconsistent texel density — a crisp crate beside a blurry wall — is noticed by everyone and named by almost nobody.

Palettes

makepad-game-assets provides Palette, Spread, VarietyParams; the script route has find_palette.

Three dominant + two accent colours, decided once and written into artifacts/game-progress.md. Rules:

  • Reserve accents for gameplay meaning. If pickups are the only saturated orange, the player learns orange without a tutorial.
  • Separate by value, not only hue. Convert a screenshot to greyscale: foreground, midground and background must still read as distinct bands. This is the test most scenes fail.
  • Desaturate toward the fog colour with distance — free aerial perspective.
  • Generate variety with Spread / VarietyParams rather than hand-picking, so a crowd stays palette-consistent.

The CC0 library is shared, so untinted scenes look like every other Kenney project. Tint discipline is what makes it yours.

Sky

SkyConfig, DrawGameSky, sun.rs. A gradient plus a sun disc covers most needs. Two non-negotiables:

  • The fog colour must match the sky at the horizon, or distant geometry sits on a visibly different backdrop.
  • The sky must agree with the key light. A warm low sun with a bright midday blue sky reads as broken even to people who cannot say why.

Icons and GUI art

Small, flat, high-contrast. Draw them as geometry or SDF shapes in the widget layer rather than importing bitmaps where you can — they stay crisp at every DPI and cost nothing to download.

Rules: readable at 24 px; never encode meaning in hue alone (pair with shape); consistent stroke weight and corner radius across the set; and control glyphs that match the active device rather than a hardcoded keyboard key.

Library images

The CC0 packs include textures and UI atlases; search them with makepad-game-assets by description, the same as models (AssetKind filters kind). Prefer the library for anything with recognisable representational content, and procedural for anything tiling or bulk.

When to use each

Need Source
Tiling ground, wall, wood, metal procedural texgen
Bulk variation across many props procedural, seeded
Sky gradient SkyConfig
Recognisable representational art library
Icons, HUD glyphs drawn geometry / SDF in the widget layer
Anything needed at 20 variants procedural — a seed per variant

Verification

Look at it in-engine at the real distance and angle, not as a flat preview: tiling seams and texel-density mismatches are invisible in a texture viewer and obvious on a wall. Then check the greyscale value test on a gameplay screenshot, and score categories 3, 4, 6 and 9 of makepad-aaa-graphics-builder/references/visual-scorecard.md.

Textures are memory. Prefer resolution that matches on-screen size; a 2048² texture on a distant prop is wasted bandwidth on a device that is bandwidth-bound before it is ALU-bound.