# 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.3.2 **Module-ID:** spine-prototype **Requires:** lib-core.maps v0.5.7, lib-core.render v0.2.0, lib-core.camera v0.3.0, lib-core.selection v0.1.0, lib-core.input v0.4.0, lib-core.player_control v0.2.0, lib-core.actor v0.1.0, lib-core.interaction v0.1.0, lib-core.command v0.1.0, lib-core.composition v0.3.0, lib-asset.prototype-fa-starter v0.2.0 **Tags:** demo, skeleton, foundational, tile-map ## Topology ```mermaid 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: 10 libs (maps, render, camera, input, selection, command, player_control, actor, interaction, composition) wired together in one module, plus the `lib-asset.prototype-fa-starter` asset pack. - 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-frame `interaction.update(px, py)`. ## Interactions The module wires selection to command via a one-line bridge so RMB issues moves to whatever is currently selected: ```lua 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: ```lua 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