feat: Add project roadmap and initial specifications for dynamic vector props and terrain system
- Created ROADMAP.md outlining core features, implementation phases, and detailed breakdown for the Stickman Sandbox Builder project. - Introduced plans for dynamic vector props with `PropBlock` specification, including reusable components and utility functions for prop creation. - Developed a vector terrain system plan detailing the reusable `TerrainBlock` component and associated utility functions for geometry handling. - Implemented `PhysicsTestHarness` scene for testing physics interactions with dynamic props and terrain. - Added scripts for `PropBlock`, `PropUtils`, `TerrainBlock`, and `TerrainUtils` to support dynamic prop creation and terrain management.
This commit is contained in:
+71
@@ -0,0 +1,71 @@
|
||||
# Stickman Sandbox Builder - Project Roadmap
|
||||
|
||||
A kid-friendly (ages 10–15) interactive physics sandbox where users build environments, script stickman behaviors, and run live simulations.
|
||||
|
||||
---
|
||||
|
||||
## 1. Core Feature Breakdown
|
||||
|
||||
### Environment & Physics Foundation
|
||||
* **Terrain Construction:** Static environment pieces (floors, ramps, steps, walls) using `StaticBody2D` with grid snapping and auto-tiling collision boundaries.
|
||||
* **Dynamic Props:** Rigid-body objects (boxes, balls, platforms) with customizable physical properties (gravity, mass, bounce, friction).
|
||||
* **Dynamic Ragdoll Engine:** Seamless transition for stickmen between kinematic/animation-driven movement and dynamic `RigidBody2D` ragdoll physics upon impact, falling, or manual triggers.
|
||||
|
||||
### Character Action & Directives
|
||||
* **Point-and-Click Navigation:** Pathfinding and waypoint movement system for walking, running, and climbing to target positions.
|
||||
* **Action & Speech Queues:** Sequenced action engine allowing stickmen to speak (speech/thought bubbles) and perform contextual animations (jump, wave, dance).
|
||||
* **IK Environment Interaction:** Contextual IK targeting for gripping props, sitting on ledges, or stepping on uneven terrain.
|
||||
|
||||
### Kid-Friendly UI & Canvas
|
||||
* **Palette Workbench:** Icon-driven sidebar categorization (Terrain, Props, Actors, Logic) for drag-and-drop creation.
|
||||
* **In-World Context Menus:** Popover radial menus on selected objects for quick actions (e.g., *Set Speech*, *Assign Action*, *Edit Color*, *Toggle Ragdoll*).
|
||||
* **Simplified Gizmos:** Intuitive, clutter-free handles for scaling, rotating, and moving objects in 2D space.
|
||||
|
||||
### Visual Logic & Event Triggers
|
||||
* **Event-Action Rules:** Simplified cause-and-effect block system (e.g., *When [Stickman] touches [Red Button] → [Drop Box]*).
|
||||
* **Area Triggers:** Placeable sensor zones (`Area2D`) that fire scene events when characters or props enter/exit.
|
||||
|
||||
### Scene Management & State
|
||||
* **Play / Edit Mode Toggle:** Instant mode switching—**Edit Mode** freezes physics for building; **Play Mode** unfreezes physics and runs interactive behaviors.
|
||||
* **Save/Load System:** JSON serialization engine to preserve scene layouts, prop positions, customized stickmen, and event scripts.
|
||||
|
||||
---
|
||||
|
||||
## 2. Recommended Implementation Roadmap
|
||||
|
||||
| Phase | Focus | Core Deliverables | Target Architecture |
|
||||
| :--- | :--- | :--- | :--- |
|
||||
| **Phase 1** | Physics & Ragdolls | Terrain shapes, prop physics, and Kinematic-to-Ragdoll swap | `RigidBody2D` + `PinJoint2D` |
|
||||
| **Phase 2** | Play / Edit Engine | World building harness, object spawner, selection & transform gizmos | State Machine & Canvas Layer |
|
||||
| **Phase 3** | Character Actions | Waypoint pathfinding, speech bubbles, animation/action queuing | `NavigationAgent2D` + Action Runner |
|
||||
| **Phase 4** | Visual Logic | Sensor zones, trigger-action mapping, interactive props | Event Bus & Logic Nodes |
|
||||
| **Phase 5** | UX Polish & Saving | Radial context menus, sidebar palette, JSON scene serialization | UI Theme & JSON Parser |
|
||||
|
||||
---
|
||||
|
||||
## 3. Detailed Phase Breakdown
|
||||
|
||||
### Phase 1: Physics & Ragdoll Foundation
|
||||
1. Build static terrain blocks (`StaticBody2D`) with slope and step collision.
|
||||
2. Create dynamic prop types (`RigidBody2D`) with mass and surface material presets.
|
||||
3. Implement ragdoll transition: detach visual bones/rig from animation drivers and bind to physics joint network on trigger.
|
||||
|
||||
### Phase 2: Edit vs. Play Sandbox Harness
|
||||
1. Implement central `GameManager` handling `EDIT` and `PLAY` states.
|
||||
2. Create object spawner interface allowing drag-and-drop placement from UI into the world.
|
||||
3. Add hover, selection outline, and 2D transform gizmos (translate, rotate, delete) active during `EDIT` mode.
|
||||
|
||||
### Phase 3: Character Command System
|
||||
1. Integrate `NavigationAgent2D` on stickmen for walking across user-built terrain.
|
||||
2. Build a directive queue manager (`WalkTo`, `PlayAnim`, `SayText`, `Wait`).
|
||||
3. Add floating UI speech bubbles tied to the `Head` bone transform.
|
||||
|
||||
### Phase 4: Logic & Triggers
|
||||
1. Create `TriggerArea2D` nodes with visual boundaries visible in Edit Mode.
|
||||
2. Build lightweight node-based or dropdown event connector (*Trigger* -> *Target* -> *Action*).
|
||||
3. Implement interactive props like buttons, levers, and trapdoors.
|
||||
|
||||
### Phase 5: UI Refinement & Persistence
|
||||
1. Build radial popover context menu for selected objects.
|
||||
2. Polish UI layout, visual feedback, and sound effects for kid accessibility.
|
||||
3. Implement full scene save/load pipeline targeting `.json` format.
|
||||
Reference in New Issue
Block a user