📚 Encyclopedia

Games & Graphics · updated 2026-10-13

Theme and skin systems for 2D games

themesskinspixel-artspritesgame-architectureeditor

How Run bundles visuals into themes so levels can be reskinned wholesale, and what a pixel-art skin editor needs. The general idea: one named theme owns every visual slot; individual objects never pick their own skin.

What a theme contains

  1. World skin slots (14 in Run): tiles for platform, hazard surface, scenery; sprites for exit, coin, checkpoint (unreached + reached, usually a green variant), bike pickup, bike ride, key, portal, and one per hazard entity (chaser, turret, swooper). Adding a new entity type means adding a slot.
  2. Background: procedural Component (preferred for built-ins; richer animation) or a data-driven layer list for user themes (Visual effects in Flame (particles, effects, decorators, shaders)).
  3. Player skin: 8 required animation states: idle, run1, run2, jump, fall, dash, wallSlide, sad.
  4. Possibly music per theme.

Example coherent themes: Industrial (diamond plate, fire, garage-door exit, gear coins, cone checkpoint, forklift "bike", hard-hat player), Dungeon (stone, spikes, cell door, chalice, minecart, skeleton), Space (hull plating, plasma, airlock, crystal orb, rocket, astronaut), Jungle, Underwater. The "vehicle" slot reinterpreted per theme is a nice touch.

Design rules

Pixel-art skin editor features worth having

Pencil, eraser, flood fill, eyedropper (auto-returns to pencil), Bresenham line with live preview, color replace (all matching pixels), rectangle selection with copy/paste/flip, horizontal mirror mode, right-click always erases, frame flip/rotate/copy between states, grid sizes 16/24/32/48, undo/redo, keyboard shortcuts. Extract one shared pixel-canvas widget for the player and world skin editors. Store pixel grids compactly (hex strings) and expect localStorage quota errors on web.

Sprite sheets from existing art

Run's first character came from JPEG pixel art: a Pillow script cropped each frame into a 6x6 sheet and turned white into transparency. Render with FilterQuality.none.

See also

Linked from

Sources: run memory (theme-contents.md, theme-manager.md, skin-editor.md, editor-v2.md, feedback-no-skin-pickers.md, feedback-procedural-backgrounds.md, architecture-audit-2026-10.md)