Game assets
Sound effects, sprites and nine-slice UI from one build file, exported straight into the game.
What you get
One build file makes the audio and the art of a game. Re-cutting a sprite never pays for the image again, because the image is a separate item with its own key.
The build file
version: 1
name: ui
items:
- id: coin-pickup
task: sfx
provider: elevenlabs
input: { model: eleven_text_to_sound_v2, prompt: "coin pickup, bright 8-bit chime", durationMs: 600 }
- id: button-raw
task: image
provider: fal
input: { model: nano-banana-pro, prompt: "wooden game UI button, flat colour background", aspect: "1:1" }
- id: "button{nine=12,12,12,12}"
task: sprite
provider: fal
input: { source: { $ref: button-raw }, model: birefnet, size: { width: 128, height: 64 }, padding: 2 }
- id: menu-loop
task: music
provider: fal
input: { model: elevenlabs-music-v2.5, prompt: "calm looping menu theme", lengthMs: 30000 }sfxandmusicneedmodel. The artifact key hashes the input as written, so there is no provider default.- Name the
provideronmusicitems. Amusicitem with no provider goes to the first registered one,elevenlabs, whose model ids differ from fal's. - A sprite takes two items. The
imagemakes the picture, and thespritecuts it by$ref. - The
{nine=l,t,r,b}hint stays in the file name. The game engine reads it there.
Run it into the game
-
Estimate. No key needed.
estimate moku estimate ui.moku.yaml -
Run with a ceiling. This item set needs
ELEVENLABS_API_KEYandFAL_KEY.run moku run ui.moku.yaml --max-cost 2 --out assets/ui --flat -
Find the files.
--flatdrops the build folder:assets/ui/coin-pickup.mp3,assets/ui/button{nine=12,12,12,12}.png, the raw image and the music track. -
Tune and run again. Change
paddingorsize. Only the sprite is cut again.