A game icon generator that draws a whole set at once
Icons drawn one by one drift apart: the sword outlined thicker than the shield, the potion lit from the other side. asset icons never draws one alone. Every call is a single picture of 64 icons, so the set shares one hand, one light and one material. Each icon is cut to its own file and added to ui/ui-icons.json, the one record of your game’s icons, which every later sheet is drawn to match.
npm install -g @tyrbo/assetMake a key in the Tyrbo app, then run asset login. Add --mock to try any command free first.
The commands
asset ui "warm carved wood and brass" --vertical-phone
asset icons "pirate treasure" --names doubloon,parrot,compass
asset icons "cursed relics of a sunken temple" --set relics
asset icons "fruit pieces and boosters" --set piecesYour names first, then a full set
The names you pass with --names are drawn first. The rest of the 64 come from a set your words pick, or the one --set names:
- pieces: a match-3's pieces, specials, blockers and boosters;
- cards: a card game's stats, suits and effects;
- relics: a roguelike's relics and items;
- general: pickups, gear, powers and menu marks.
Names your record already holds are left out, then the other sets fill in turn, so each call adds icons the game lacks. A name you ask for that the record holds is drawn again and replaces the old one.
Matched to what came before
A new sheet is drawn to match the last sheet in your record. With no record yet, it follows the skin painted by asset ui, and with no skin, the look alone. A first asset ui already brings a sheet of 64 in the skin's material, the icons your counters and actions wear among them, so asset icons carries on that set rather than starting a new style.
One record your game reads
Each icon lands as ui/ui-icon-<name>.png, and the sheet beside it as ui-iconset-sheet.png with its atlas (a later one is ui-iconset-2-sheet.png). ui/ui-icons.json keeps your last set and sheet and, for every icon, its name, file, size and the sheet it came from, up to 1,024 of them. Your game loads one as ./assets/ui/ui-icon-<name>.png. When the model leaves a cell empty, the cut names each icon by its own cell, so a name never slips onto its neighbour's picture.
Why never one at a time
An icon asked alone with asset image is its own picture: a new scale, a new outline weight, a new light each time. On one sheet those are decided once for all 64, and a single paid call, quoted before it runs, covers the whole set. To start a sheet from one icon, asset icons lantern "a brass lantern" names it first and fills the rest round it.
Questions people ask
Can I ask for a single icon?
You can put one first: asset icons <name> "<words>". The call still draws a full sheet of 64, the rest picked to suit, because that is how the set stays consistent.
Will they match my game’s interface?
With no earlier icons, the sheet follows the skin asset ui painted, its material and light. After that, every sheet is drawn to match the last one kept.
How does my game find an icon?
By its name. ui/ui-icons.json lists every icon with its file, and each one loads from ./assets/ui/ui-icon-<name>.png.
Install it, then ask for the look.
Get an asset keyMake a key in the Tyrbo app, then run asset login. Add --mock to try any command free first.