From Kenney kits to a cohesive world

Nineteen free Kenney kits turned into one world through a typed manifest, desaturated skins, composites built from kit parts and a 15.75 MB build.

The Hollowmere town square at night, lamps glowing around a covered well, timber houses and villagers in the background
Contents
  1. The manifest is the only registry
  2. A build that ships only what is used
  3. Skins: desaturate, then tint
  4. Composites: new models from kit parts
  5. Characters and monsters from four rigs
  6. Walls that don't flicker
  7. What made it cohesive
  8. Read next

Every model, texture, sound and particle comes from Kenney's CC0 packs: 19 model kits made years apart for different genres, each with its palette baked into a small atlas. The pipeline makes a pirate-kit lighthouse, a holiday-kit cabin and a dungeon-kit demon look like one world, in a download a phone will tolerate.

The asset pipeline: a typed manifest and a kit table feed a build script that downloads, cleans, merges and recolours models into public/assets and a generated bounds file, which the runtime loader reads; a bar shows 15.75 MB shipped against a 25 MB budget
The pipeline, end to end. The manifest is the single source of truth: if it isn't referenced there, it doesn't ship.

The manifest is the only registry

Nothing loads by path. src/game/assets/manifest.ts (2,321 lines) maps the shared vocabulary (props, tiles, monsters, bodies, weapons, sounds, UI sprites) to variants:

src/game/assets/manifest.tsTypeScript
export interface ModelVariant {
  url: string
  scale: number | Vec3
  /** Added to y after scaling so the model sits on the ground (or the floor top sits at 0). */
  yOffset?: number
  /** Extra rotation about +Y (radians). */
  rotY?: number
  /** CSS hex multiplied into base colour. */
  tint?: string
  /** CSS hex emissive colour (glowing crystals, portals). */
  emissive?: string
  /** Relative pick weight among siblings (default 1). */
  weight?: number
  /** Molten surface (TileKind.Lava). … */
  lava?: true
  /** 0–1 smoothness (roughness = 1 − 0.9·gloss): wet rock, ice, polished mirror floors. */
  gloss?: number
  /** 0–1 metalness (mirror glass, dark reflective armour). */
  metal?: number
}
  • Weighted variants, picked by hashing position with the map seed, so 400 rocks aren't one rock and every client sees the same one.
  • Per-biome overrides stretch one word across six acts. Generators place tree_pine everywhere; the manifest makes it a pine, a palm or a charred stump:
src/game/assets/manifest.tsTypeScript
tree_dead: { ...each(act2Outdoors, BLEACHED_DEAD), ...each(act3Outdoors, CHARRED) },
tree_round: { ...each(act2Outdoors, PALMS), ...each(act3Outdoors, CHARRED) },
tree_pine: { ...each(act2Outdoors, PALMS), ...each(act3Outdoors, CHARRED) },
  • Scale in world terms. Kits disagree about a metre, so fitH(model, 4.6) and fitW(model, 2.1) read measured bounds and make models from any kit agree.

A build that ships only what is used

bun scripts/assets/build.ts collects every /assets/... URL the manifest references, maps each to its pack via kits.ts, downloads only those packs into an uncommitted cache, and rebuilds public/assets from scratch. Unused models disappear on the next build.

Each GLB is cleaned with glTF-Transform:

scripts/assets/models.tsTypeScript
// Blocky Characters ship KHR_materials_unlit; we light everything with torches, so make them PBR.
for (const ext of root.listExtensionsUsed()) {
  if (ext.extensionName === KHRMaterialsUnlit.EXTENSION_NAME) ext.dispose()
}
// No normal maps anywhere in these kits, so tangents are dead weight.
const hasNormalMaps = root.listMaterials().some((m) => m.getNormalTexture() !== null)
if (!hasNormalMaps) {
  for (const mesh of root.listMeshes()) for (const prim of mesh.listPrimitives()) prim.setAttribute('TANGENT', null)
}
// …
await doc.transform(dedup(), prune({ keepLeaves: true }))
  • Atlases stay external: one colormap.png per kit, downloaded once, one shared GPU texture per URL at runtime.
  • bounds.gen.ts records every model's bounds and every rig's clip names. Canonical clips (idle, walk, attack, cast, hit, die) map to raw names, and the build fails on a missing clip before anyone sees a T-pose.
Shipped
GLBs / PNGs / sounds 356 / 89 / 126
Models 12.79 MB
Audio 2.64 MB
UI 0.32 MB
Total (budget ~25 MB) 15.75 MB

Everything under /assets gets year-long immutable caching.

Skins: desaturate, then tint

A tint multiplies, and multiplying only darkens: a red roof tinted sandstone turns muddy, a green tree tinted charred turns olive. So the build makes desaturated copies of whole kits, called skins, with every PNG and material colour run through sharp.modulate:

scripts/assets/kits.tsTypeScript
// Desaturated skins (see Kit.recolor): the manifest tints these into sandstone / basalt / bronze.
{ short: 'gyg', slug: 'graveyard-kit', kind: 'models', root: 'Models/GLB format', recolor: { saturation: 0.1, brightness: 1.1 } },
{ short: 'castleg', slug: 'castle-kit', kind: 'models', root: 'Models/GLB format', recolor: { saturation: 0.08, brightness: 1.15 } },
{ short: 'towng', slug: 'fantasy-town-kit', kind: 'models', root: 'Models/GLB format', recolor: { saturation: 0.1, brightness: 1.1 } },
// Act 4–6 skins: drowned wrecks, indigo void rock, and the dark-glass mirror knights (stalker rig).
{ short: 'pirateg', slug: 'pirate-kit', kind: 'models', root: 'Models/GLB format', recolor: { saturation: 0.1, brightness: 1.1 } },
{ short: 'blockyw', slug: 'blocky-characters', kind: 'models', root: 'Models/GLB format', recolor: { saturation: 0.05, brightness: 1.7 } },

On a near-grey base a tint gives a real hue: castleg + sand = Saltmarrow sandstone, + #6a6268 = Emberhold basalt; pirateg + sea-green = drowned wreck. 14 skins in all.

The asset gallery showing Act II props on desert ground: palms, sand rocks, tents in three colours, awnings, urns, cacti and obelisks, all in warm sand tones
Act II's props in the /dev/assets gallery. The palms stand in for the vocabulary's tree_pine and tree_round, and the obelisks are graveyard and nature pieces tinted from desaturated skins.

Composites: new models from kit parts

Kenney has no lighthouse, anchor, upside-down bell, snow cabin, void rift or final boss. composites.ts describes 42 models as lists of placed kit pieces, merged into one static GLB each:

scripts/assets/composites.tsTypeScript
lighthouse: [
  { src: 'pirate/tower-base', pos: [0, 0, 0] },
  { src: 'pirate/tower-middle-windows', pos: [0, 2, 0] },
  { src: 'pirate/tower-middle', pos: [0, 4, 0] },
  { src: 'pirate/tower-middle-windows', pos: [0, 6, 0], rotY: 1 },
  { src: 'pirate/tower-top', pos: [0, 8, 0] },
  // open lantern room: a blazing lamp between four posts, under the cap
  { src: 'pirate/cannon-ball', pos: [0, 9.75, 0], scale: 2.6, emissive: GLOW_GOLD },
  ...[0, 1, 2, 3].map((q): CompositePart => ({ src: 'town/pillar-wood', pos: [Math.cos((q + 0.5) * (Math.PI / 2)) * 1.05, 8.9, Math.sin((q + 0.5) * (Math.PI / 2)) * 1.05], scale: [1.4, 1.9, 1.4] })),
  { src: 'pirate/tower-roof', pos: [0, 10.75, 0], scale: [0.72, 0.6, 0.72] },
],
  • The lamp is a cannonball ×2.6, glowing.
  • The Unmaker (7.5 tiles) is the graveyard ghost stretched 2.4× vertically, flattened cannonball eyes, a crown of seven violet rocks, four more in orbit. No clips; it hovers, like the Leviathan, glacier wyrm and gloam eye.
  • Per-part emissive bakes glow into one part, so only the lamp lights, not the tower.
  • euler with order lets bells hang upside down and masts lean.
  • gloss/metal: the nature and space kits export metallicFactor: 1, and smooth metal with no env map renders black, so gloss forces metalness to 0 unless metal is set.
The asset gallery showing Act IV props under dusk lighting: a lighthouse with a lit lamp, shipwrecks, masts, anchors, docks, coral, kelp and a bell
Act IV's props with dusk lighting on. The lighthouse, anchors, bell, kelp and coral are all composites built from other kits' pieces.

Characters and monsters from four rigs

Class Source
Warden Mini Arena soldier
Stalker Mini Forest archer
Emberwright graveyard vampire, tinted warm
NPCs Mini Characters

Clip maps differ (BOW_CLIPS, CASTER_CLIPS); the renderer only asks for canonical names. 109 monster types come from a handful of rigs plus composites, varied by tint, scale and skin. An Act VI mirror knight is the matching player-class rig from a desaturated skin: violet tint and emissive, gloss 0.95, some metal.

Act VI monsters in the gallery: mirror knights in dark glass, a floating gloam eye, an astral archer, a null priest, a shade, a riftling and a large crystalline construct
Act VI's roster. Kenney rigs under recoloured skins, plus the gloam eye, which is a composite that hovers because it has no rig.

/dev/assets lays out every character, monster, weapon, prop and tile set with measured bounds, filters by act and biome, plays any clip and toggles dusk lighting. It uses the game's loader, so it shows exactly what ships. Asset agents worked in a loop: edit manifest, reload, look.

Walls that don't flicker

Kenney wall panels each carry corner posts, so four panels around a house put two identical posts at every corner: z-fighting. The composite builder insets once:

scripts/assets/composites.tsTypeScript
/** Uniform shrink that tucks duplicated posts inside their twins (see walls / gableEnds). */
const INSET_K = 0.994
 
// e/w panels are shrunk a hair about their cell centre: every panel carries corner posts, so
// the s/n and e/w panels meeting at a corner would otherwise put two identical posts in the same
// place (coplanar faces → z-fighting). The inset post sits entirely inside the other one.

Player homes are built at runtime from boxes, and there the plaster panel and timber top plate shared a top face. Two centimetres:

src/game/engine/housing/models.tsTypeScript
/** How far a wall's timber top plate stands above its plaster panel (no coplanar tops). */
const CAP_PROUD = 0.02
// …
// the top plate stands CAP_PROUD above the plaster: equal tops z-fight (white/dark streaks)
along(d, 0.5, 0.22, 0.1 + CAP_PROUD, H - 0.1, 'timber')
A player's timber house at night in its garden plot, lamps lit at the door, a waypoint glowing nearby
A starter home. The house is built at runtime from boxes; the lamps, fences and trees are kit models through the same manifest.

What made it cohesive

  • One lighting model: everything PBR under per-biome presets, including Kenney's unlit characters
  • Desaturated skins: colour chosen per biome, not inherited from a kit
  • Normalised scale: fitH/fitW against measured bounds
  • Heavy post: fog, bloom and a per-biome grade pull every frame to one palette (renderer)

No custom models: 19 free kits, a typed table and a build that refuses anything the table doesn't mention.