Surface + wall layers with entity slot between them. Uses maps.draw_map_pre_entities and maps.draw_map_post_entities so character sprites render between surface and wall layers. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
spine-prototype
Foundational end-to-end demo module from the bootstrap phase. Loads lib-core.maps and demonstrates lib-composition with basic player movement, free-pan camera, click-select, RMB-move, and proximity-triggered interactions. Self-exits after 30 frames for CI.
Version: 0.1.0
Module-ID: spine-prototype
Requires: lib-core.maps v>=0.1.1, lib-core.render v>=0.1.0, lib-core.camera v>=0.3.0, lib-core.selection v>=0.1.0, lib-core.input v>=0.4.0, lib-core.player_control v>=0.1.0, lib-core.interaction v>=0.1.0, lib-core.command v>=0.1.0
Tags: demo, skeleton, foundational, tile-map
Topology
graph LR
this["spine-prototype"]
lib_core_maps["lib-core.maps"]
this --> lib_core_maps
lib_core_render["lib-core.render"]
this --> lib_core_render
lib_core_camera["lib-core.camera"]
this --> lib_core_camera
lib_core_selection["lib-core.selection"]
this --> lib_core_selection
lib_core_input["lib-core.input"]
this --> lib_core_input
lib_core_player_control["lib-core.player_control"]
this --> lib_core_player_control
lib_core_interaction["lib-core.interaction"]
this --> lib_core_interaction
lib_core_command["lib-core.command"]
this --> lib_core_command
engine["engine.*"]
this --> engine
Controls
- WASD / Arrow-Keys: Move the player; also pans the camera in free-cam mode.
- E: Interact with the nearest in-range trigger (e.g. proximity sign).
- Tab: Toggle free-cam (decouples camera from player follow).
- Mouse-Left: Click-select / drag-box-select units. Hold Shift to add, Ctrl to toggle.
- Mouse-Right: Issue a move-command to the currently selected units.
- Mouse-Middle (drag): Pan the camera by dragging.
- Escape: Quit the module.
Demonstrates
- End-to-end bootstrap of a module: manifest deps -> init -> update -> render -> cleanup.
- Lib-composition: 8 libs (maps, render, camera, input, selection, command, player_control, interaction) wired together in one module.
- Tile-based map loading + walkability queries via
lib-core.maps. - Free-pan + follow camera through
lib-core.camera(set_target,bind_pan_keys,update). - Click-select / drag-box / modifier-keys via
lib-core.selection. - RMB-move with target-provider bridge to
lib-core.command(bind_target_provider). - Proximity-triggered interactions via
lib-core.interaction.register+ per-frameinteraction.update(px, py).
Interactions
The module wires selection to command via a one-line bridge so RMB issues moves to whatever is currently selected:
command.bind_move_action("rmb")
command.bind_target_provider(function() return selection.list() end)
Each demo-unit registers in both libs so it is selectable AND movable:
s.sel_handle = selection.register(function() return aabb(s) end)
s.cmd_handle = command.register(function() return pos(s) end, ...)
References
- meta/docs/superpowers/specs/2026-05-09-p0-module-skeleton-design.md
- meta/docs/architecture/module-lifecycle.md
- meta/docs/architecture/lib-composition.md