Add artistic curriculum and Sprint 2 plan
CURRICULUM.md: full 14-group skill tree drawn from the artistic learning journey — line control through creative systems, with skill dependency graph and notes on how exercises translate into module designs. SPRINT.md: Sprint 2 tickets (AL-010 through AL-015) replacing the Sprint 1 static-stroke prototype with the real scrolling corridor from MODULES.md, including score model migration, difficulty tiers, and session summary screen. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
367
CURRICULUM.md
Normal file
367
CURRICULUM.md
Normal file
@@ -0,0 +1,367 @@
|
||||
# ArtLegend — Artistic Learning Curriculum
|
||||
|
||||
This document defines the full skill curriculum that ArtLegend draws from. It is not a module design document — that is MODULES.md. This is the **artistic map**: every skill group we intend to train, the exercises within each group, and how skills transfer to one another.
|
||||
|
||||
When designing a new module, look here first to understand what skill you're targeting and what else it connects to.
|
||||
|
||||
---
|
||||
|
||||
## Philosophy
|
||||
|
||||
Artistic ability is not a singular talent. It is a collection of trainable micro-skills.
|
||||
|
||||
ArtLegend decomposes artistic growth into atomic, measurable exercises — each isolating one motor skill, one perceptual skill, or one conceptual skill. Every exercise produces a visible result. Learning and making happen at the same time.
|
||||
|
||||
Three principles drive the curriculum:
|
||||
|
||||
**One skill at a time.** Each exercise isolates a single thing — pressure control, gradient smoothness, silhouette readability, line confidence. Isolation reduces cognitive overload and makes improvement measurable.
|
||||
|
||||
**Constraints accelerate learning.** Limiting tools, colors, values, or time forces the skill to work without crutches. Constraints are not punishment — they are the training mechanism.
|
||||
|
||||
**Skills transfer.** Line confidence improves gesture drawing. Value studies improve lighting. Shape language improves character design. The curriculum is designed so early skills compound into later ones.
|
||||
|
||||
---
|
||||
|
||||
## Skill Dependency Overview
|
||||
|
||||
Some skill groups are foundational — they feed directly into everything else. Others build on top of prior work. This is a rough dependency graph, not a strict prerequisite lock:
|
||||
|
||||
```
|
||||
Observation Training ──────────────────────────────────────┐
|
||||
Line Control ──────────────────────────────────────────────┤
|
||||
▼
|
||||
Value & Lighting ───────────────────────────────► Form Construction
|
||||
Shape Language ────────────────────────────────► Character Design
|
||||
│
|
||||
Gesture & Motion ──────────────────────────────────────────┤
|
||||
▼
|
||||
Form Construction ─────────────────────────────► Animation Primitives
|
||||
Texture Systems ──────────────────────────────────────────┐
|
||||
▼
|
||||
Composition ──────────────────────────────────────► Style Development
|
||||
Character Design ─────────────────────────────────────────┤
|
||||
Animation Primitives ─────────────────────────────────────┤
|
||||
▼
|
||||
Pixel Art ────────────────────────────────────► Creative Systems
|
||||
Vector & UI Design ───────────────────────────────────────┘
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Skill Group 1 — Line Control
|
||||
|
||||
**What it trains:** Precise stylus coordination and movement confidence. The physical foundation of all drawing.
|
||||
|
||||
**Core skills:**
|
||||
- Stroke control (start, end, path accuracy)
|
||||
- Pressure control (light to heavy, smooth transitions)
|
||||
- Directional consistency (maintaining angle across a stroke)
|
||||
- Rhythm and flow (speed without tension)
|
||||
- Acceleration and deceleration (tapered, confident strokes)
|
||||
|
||||
**Exercises:**
|
||||
- Straight line drills — horizontal, vertical, diagonal
|
||||
- Ghosted lines — hover and plan the movement before committing
|
||||
- Parallel lines — maintain consistent spacing across multiple strokes
|
||||
- Tapered lines — thin → thick → thin pressure transitions in one stroke
|
||||
- Superimposed lines — repeat the same stroke path to build muscle memory
|
||||
- Ellipse sheets — controlled ellipse repetition at different angles and sizes
|
||||
- S-curve drills — flow and gesture training with continuous curves
|
||||
- Speed accuracy challenges — hit targets under time pressure
|
||||
|
||||
**Transfers to:** Every other skill group. This is the most foundational group in the curriculum.
|
||||
|
||||
---
|
||||
|
||||
## Skill Group 2 — Value & Lighting
|
||||
|
||||
**What it trains:** Perception of light, shadow, and form. The ability to see and reproduce tonal relationships.
|
||||
|
||||
**Core skills:**
|
||||
- Tonal recognition (identifying light/midtone/shadow)
|
||||
- Form perception (how light wraps around 3D shapes)
|
||||
- Gradient control (smooth tonal transitions)
|
||||
- Edge hierarchy (hard, soft, and lost edges)
|
||||
|
||||
**Exercises:**
|
||||
- 2-value notan studies — black and white only, no midtones
|
||||
- 3-value studies — separate light, midtone, and shadow clearly
|
||||
- Gradient bars — smooth continuous tonal transitions
|
||||
- Sphere rendering — core shadow, cast shadow, and highlight placement
|
||||
- Cube lighting — analyze planar lighting on flat surfaces
|
||||
- Cylinder shading — value wrapping on curved surfaces
|
||||
- Value mass copying — ignore objects entirely; copy only the light and dark regions
|
||||
- Shadow shape painting — fill shadow masses only; treat them as abstract shapes
|
||||
- Edge control studies — practice intentional hard, soft, and lost edge transitions
|
||||
- Posterization challenges — reduce a reference into a limited number of values
|
||||
|
||||
**Transfers to:** Form Construction, Texture Systems, Style Development
|
||||
|
||||
---
|
||||
|
||||
## Skill Group 3 — Texture Systems
|
||||
|
||||
**What it trains:** Material representation and surface variation. How to suggest texture with marks rather than literal detail.
|
||||
|
||||
**Core skills:**
|
||||
- Texture abstraction (suggesting material with minimal marks)
|
||||
- Density control (how mark frequency implies value)
|
||||
- Directional texture flow (marks follow the surface)
|
||||
- Material readability (the viewer recognizes the material at a glance)
|
||||
|
||||
**Exercises:**
|
||||
- Crosshatching — directional line shading with controlled density
|
||||
- Stippling — dot-based rendering with density gradients
|
||||
- Scribble rendering — controlled chaotic texture
|
||||
- Fur flow mapping — directional fur and hair studies
|
||||
- Material swatches — practice representing metal, wood, stone, skin, cloth, and fur
|
||||
- Texture gradients — create value transitions through texture density alone
|
||||
- Surface simplification — reduce complex textures (bark, stone) into repeatable motifs
|
||||
- Pixel texture clusters — low-resolution material readability
|
||||
|
||||
**Transfers to:** Value & Lighting, Style Development
|
||||
|
||||
---
|
||||
|
||||
## Skill Group 4 — Shape Language
|
||||
|
||||
**What it trains:** Symbolic simplification and visual readability. How shapes communicate personality before content.
|
||||
|
||||
**Core skills:**
|
||||
- Silhouette design (readable form in pure black)
|
||||
- Emotional shape association (circles = soft, triangles = aggressive, squares = stable)
|
||||
- Visual hierarchy (what reads first in a composition)
|
||||
|
||||
**Exercises:**
|
||||
- Circle-based character designs — friendly, soft, approachable
|
||||
- Square-based character designs — stable, mechanical, grounded
|
||||
- Triangle-based character designs — aggressive, dynamic, threatening
|
||||
- Silhouette recognition — design forms that read as a pure black shape
|
||||
- Shape reduction — break objects down into their primitive geometry
|
||||
- Icon simplification — reduce recognizable objects into symbolic representations
|
||||
- Blob creature design — start with a random shape and commit to a character
|
||||
|
||||
**Transfers to:** Character Design, Composition, Creative Systems
|
||||
|
||||
---
|
||||
|
||||
## Skill Group 5 — Form Construction
|
||||
|
||||
**What it trains:** 3D reasoning and structural drawing. The ability to build objects mentally and draw them from any angle.
|
||||
|
||||
**Core skills:**
|
||||
- Perspective (1-point, 2-point, 3-point)
|
||||
- Spatial visualization (rotating objects mentally)
|
||||
- Structural simplification (seeing the primitive inside the complex form)
|
||||
|
||||
**Exercises:**
|
||||
- Box perspective — draw boxes in 1-point, 2-point, and 3-point perspective
|
||||
- Rotating forms — draw an object from multiple angles without reference
|
||||
- Cylinder perspective — ellipse foreshortening as angle changes
|
||||
- Cross contours — draw lines that wrap around a surface to show its form
|
||||
- Primitive combination — build complex objects from cubes, cylinders, and spheres
|
||||
- Mechanical breakdown — reduce machinery into its structural primitives
|
||||
- Slice studies — mentally cross-section a form and draw what you see
|
||||
|
||||
**Transfers to:** Character Design, Animation Primitives, Gesture & Motion
|
||||
|
||||
---
|
||||
|
||||
## Skill Group 6 — Gesture & Motion
|
||||
|
||||
**What it trains:** Movement, rhythm, and dynamic posing. Drawing what a figure is *doing* rather than what it looks like.
|
||||
|
||||
**Core skills:**
|
||||
- Motion flow (the single line that captures action)
|
||||
- Pose readability (the silhouette communicates the action instantly)
|
||||
- Action clarity (no ambiguity about what is happening)
|
||||
|
||||
**Exercises:**
|
||||
- 30-second gestures — fast capture of movement, ignore detail
|
||||
- Line of action studies — find and exaggerate the single motion line in a pose
|
||||
- Rhythm drawing — prioritize flow and connection over structural accuracy
|
||||
- Animal gestures — dynamic anatomy abstraction from animal movement
|
||||
- Weight and balance sketches — where is the center of gravity?
|
||||
- Anticipation poses — the moment before action; how the body loads up
|
||||
|
||||
**Transfers to:** Character Design, Animation Primitives
|
||||
|
||||
---
|
||||
|
||||
## Skill Group 7 — Character Design
|
||||
|
||||
**What it trains:** Stylized character creation — readability, appeal, and expressive design.
|
||||
|
||||
**Core skills:**
|
||||
- Expression (the face communicates emotion at a glance)
|
||||
- Silhouette readability (the character is recognizable as a black shape)
|
||||
- Appeal (the design invites the viewer in)
|
||||
- Modular design (heads, bodies, costumes combine and vary consistently)
|
||||
|
||||
**Exercises:**
|
||||
- Expression sheets — explore the full range of emotion for one character
|
||||
- Head shape variations — how head geometry affects personality perception
|
||||
- Eye style exploration — different eye systems communicate different aesthetics
|
||||
- Hairstyle silhouettes — hair as readable shape language
|
||||
- Costume shape language — clothing personality through geometry
|
||||
- Chibi simplification — reduce a character to minimal expressive elements
|
||||
- Character turnarounds — draw one character from multiple angles consistently
|
||||
|
||||
**Transfers to:** Animation Primitives, Creative Systems
|
||||
|
||||
---
|
||||
|
||||
## Skill Group 8 — Animation Primitives
|
||||
|
||||
**What it trains:** Motion timing and visual feedback systems. The fundamentals of making things feel alive.
|
||||
|
||||
**Core skills:**
|
||||
- Timing (how many frames does an action take?)
|
||||
- Spacing (where does the form sit on each frame?)
|
||||
- Anticipation (loading up before action)
|
||||
- Impact communication (how does the viewer feel the hit?)
|
||||
|
||||
**Exercises:**
|
||||
- Bounce ball — weight, timing, squash and stretch
|
||||
- Pendulum motion — weight at the end of a swing
|
||||
- Blink loops — micro-animation with easing
|
||||
- Idle breathing — subtle slow looping motion
|
||||
- Hover motion — floating cycles with organic irregularity
|
||||
- Hit flash effects — communicating impact through contrast and timing
|
||||
- Smear frames — motion blur exaggeration for speed
|
||||
- Spell and slash effects — stylized game-ready impact frames
|
||||
|
||||
**Transfers to:** Character Design, Creative Systems
|
||||
|
||||
---
|
||||
|
||||
## Skill Group 9 — Pixel Art
|
||||
|
||||
**What it trains:** Visual clarity under extreme constraints. Every pixel has to earn its place.
|
||||
|
||||
**Core skills:**
|
||||
- Readability at small size (the form reads from a distance)
|
||||
- Palette control (limited colors used with intention)
|
||||
- Cluster management (avoiding isolated pixels, building readable shapes)
|
||||
|
||||
**Exercises:**
|
||||
- 16×16 icons — single-concept design at maximum constraint
|
||||
- 32×32 creatures — character design with limited pixel budget
|
||||
- Palette limitation challenges — 2-color, 4-color, 8-color restrictions
|
||||
- Tile set construction — repeatable building blocks that work together
|
||||
- Cluster theory studies — how pixels group into readable shapes
|
||||
- Distance readability tests — does it read at 1×, 2×, 4× scale?
|
||||
|
||||
**Transfers to:** Vector & UI Design, Shape Language
|
||||
|
||||
---
|
||||
|
||||
## Skill Group 10 — Vector & UI Design
|
||||
|
||||
**What it trains:** Symbolic communication and interface clarity. Drawing systems, not individual pieces.
|
||||
|
||||
**Core skills:**
|
||||
- Vector abstraction (reduce to essential geometry, no noise)
|
||||
- Visual hierarchy (the eye goes where it should)
|
||||
- Layout systems (consistent spacing, proportion, and grid logic)
|
||||
|
||||
**Exercises:**
|
||||
- Bézier curve practice — control point placement and handle control
|
||||
- Icon set construction — design multiple icons with a shared visual language
|
||||
- UI hierarchy exercises — arrange elements so information priority is clear
|
||||
- Educational diagram design — make a concept readable without words
|
||||
- Flowchart beautification — clarity and visual flow in procedural diagrams
|
||||
- Infographic simplification — compress data into readable visual form
|
||||
- Constraint layout challenges — design within strict size and color limits
|
||||
|
||||
**Transfers to:** Creative Systems, Pixel Art
|
||||
|
||||
---
|
||||
|
||||
## Skill Group 11 — Observation Training
|
||||
|
||||
**What it trains:** Breaking symbolic drawing habits. Seeing what is actually there instead of what you expect to see.
|
||||
|
||||
**Core skills:**
|
||||
- Observation accuracy (drawing what you see, not your idea of it)
|
||||
- Proportion measurement (relative sizes and distances)
|
||||
- Visual measurement (angles, negative space, relationships)
|
||||
|
||||
**Exercises:**
|
||||
- Negative space drawing — draw the space around the subject, not the subject
|
||||
- Upside-down drawing — remove symbolic recognition by flipping the reference
|
||||
- Blind contour drawing — draw without looking at the paper
|
||||
- Continuous line drawing — never lift the pen; one connected path
|
||||
- Angle matching — identify and replicate precise angles in a reference
|
||||
- Proportion measurement — measure and transfer relative sizes accurately
|
||||
|
||||
**Transfers to:** Everything. Observation is a meta-skill that improves every other group.
|
||||
|
||||
---
|
||||
|
||||
## Skill Group 12 — Style Development
|
||||
|
||||
**What it trains:** Artistic identity and stylistic flexibility. Translating between visual languages intentionally.
|
||||
|
||||
**Core skills:**
|
||||
- Stylistic abstraction (choosing what to simplify and what to keep)
|
||||
- Visual synthesis (combining influences into a coherent voice)
|
||||
- Adaptation (translating between styles deliberately)
|
||||
|
||||
**Exercises:**
|
||||
- Artist emulation studies — reproduce a reference in a specific artist's style
|
||||
- Medium translation — photo → pixel art, realistic → stylized, vector → painterly
|
||||
- Style constraint challenges — draw a subject using rules from a defined aesthetic
|
||||
- Shape grammar systems — define and apply rules for a consistent personal style
|
||||
|
||||
**Transfers to:** Creative Systems, Character Design
|
||||
|
||||
---
|
||||
|
||||
## Skill Group 13 — Composition
|
||||
|
||||
**What it trains:** Visual arrangement and focal hierarchy. Where does the eye go and why?
|
||||
|
||||
**Core skills:**
|
||||
- Scene readability (the main subject is never in doubt)
|
||||
- Eye guidance (leading lines, value contrast, and framing direct the viewer)
|
||||
- Value composition (the light/dark map works before detail is added)
|
||||
|
||||
**Exercises:**
|
||||
- Rule of thirds — place subjects and horizons on division lines
|
||||
- Thumbnail sketches — plan compositions at small scale before committing
|
||||
- Eye flow mapping — trace the natural path the viewer's eye takes
|
||||
- Focal point design — create a single dominant area of interest
|
||||
- Value composition planning — design the light/dark structure before any color
|
||||
|
||||
**Transfers to:** Style Development, Character Design, Gesture & Motion
|
||||
|
||||
---
|
||||
|
||||
## Skill Group 14 — Creative Systems
|
||||
|
||||
**What it trains:** Procedural creativity and modular synthesis. Generating ideas within rules rather than from a blank page.
|
||||
|
||||
**Core skills:**
|
||||
- Procedural generation (applying rules to generate variations)
|
||||
- Rule-based creativity (constraints as a creativity engine, not a limit)
|
||||
- Modular design thinking (systems of interchangeable parts)
|
||||
|
||||
**Exercises:**
|
||||
- Procedural creature design — combine random body parts using defined rules
|
||||
- Constraint character challenges — design characters under unusual restrictions
|
||||
- Random prompt synthesis — turn an arbitrary combination of inputs into a design
|
||||
- Modular asset systems — design parts that combine into many valid wholes
|
||||
- Shape grammar construction — define a visual rule set and apply it consistently
|
||||
|
||||
**Transfers to:** Character Design, Animation Primitives, Style Development
|
||||
|
||||
---
|
||||
|
||||
## Notes for Module Design
|
||||
|
||||
When building a new ArtLegend module, the starting question is: **which skill from this curriculum is the player building?** A module may target one skill or create a bridge between two adjacent skills. It should not try to teach three things simultaneously.
|
||||
|
||||
The exercises listed here are training activities, not game designs. A single exercise can be turned into multiple different game mechanics. Refer to MODULES.md for how specific exercises have been translated into actual game screens.
|
||||
|
||||
Skills marked as "foundational" (Line Control, Observation Training) should be prioritized in early module development — players who improve here improve everywhere else faster.
|
||||
192
SPRINT.md
192
SPRINT.md
@@ -1,79 +1,161 @@
|
||||
# ArtLegend — Current Sprint
|
||||
|
||||
**Sprint goal:** Hybrid architecture end-to-end. Compose hub → LibGDX `LineCorridorScreen` with live stylus pressure data.
|
||||
**Sprint goal:** Line Corridor MVP. Implement the real scrolling-corridor game from MODULES.md, replace the Sprint 1 prototype, add difficulty tiers, and wire real session data into the Progress screen.
|
||||
|
||||
> Sprint 1 built a static "draw one stroke" prototype to validate the architecture. Sprint 2 replaces the game logic with the actual design: a continuously scrolling corridor the player tracks with their stylus, scored on Fill and Containment.
|
||||
|
||||
---
|
||||
|
||||
## Tickets
|
||||
|
||||
### AL-001 — shared/ module compiles [DONE]
|
||||
- `shared/build.gradle.kts` created (pure Kotlin JVM)
|
||||
- `ModuleType.kt` created with LINE_CORRIDOR, PRESSURE_RAMP, CURVE_SCULPTOR, VECTOR_SNAP
|
||||
- `settings.gradle.kts` updated to include `"shared"`
|
||||
### AL-010 — CorridorScore data model [TODO]
|
||||
|
||||
### AL-002 — core/ restructured [DONE]
|
||||
- `GameHost.kt` replaces `ArtLegend.kt` — accepts `ModuleType`, routes to correct Screen
|
||||
- `PlaceholderModuleScreen.kt` — stub Screen for unimplemented modules
|
||||
- `input/StylusFrame.kt` — data class (x, y, pressure, tiltRad, orientRad, isStylus)
|
||||
- `input/StylusInputBridge.kt` — AtomicReference bridge (GL-thread safe)
|
||||
- `modules/LineCorridorScreen.kt` — skeleton (dark background, reads bridge)
|
||||
- `core/build.gradle.kts` updated with `:shared` dependency
|
||||
Replace the prototype `LineScore` with a score model that matches the Corridor Scroll design from MODULES.md.
|
||||
|
||||
### AL-003 — Compose added to android/ [DONE]
|
||||
- `android/build.gradle.kts` updated: `buildFeatures { compose = true }`, Compose BOM 2024.09.00, navigation-compose, activity-compose, lifecycle
|
||||
- `gradle.properties` updated with compose versions
|
||||
- Delete `core/modules/LineScore.kt`
|
||||
- Create `core/modules/CorridorScore.kt`:
|
||||
```kotlin
|
||||
data class CorridorScore(
|
||||
val fill: Float, // 0..1 — avg coverage of corridor width
|
||||
val wallPenalties: Int, // raw count of wall crossings
|
||||
val overall: Float // weighted: fill * 0.7 − penalty * 0.05, clamped 0..1
|
||||
)
|
||||
```
|
||||
- Update `GameHost.onSessionComplete` signature: `((CorridorScore) -> Unit)?`
|
||||
- Update `GameActivity` to pass `fill`, `wallPenalties`, `overall` via Intent extras
|
||||
- Update `MainActivity.gameResultLauncher` to reconstruct `CorridorScore` from Intent
|
||||
- Update `SessionEntity`: replace `straightness`/`anglePrecision` fields with `fill: Float` and `wallPenalties: Int`; bump Room schema version to 2 with a destructive migration (dev only — data is test data)
|
||||
- Update `SessionRepository.save()` to write new fields
|
||||
- Update `ProgressScreen` `SessionCard` and `SessionBarChart` labels (Overall, Fill, Penalties)
|
||||
- Update `ProgressViewModel` — no logic change needed
|
||||
|
||||
### AL-004 — MainActivity + Compose hub [DONE]
|
||||
- `MainActivity.kt` created — ComponentActivity, sets Compose content
|
||||
- `ui/theme/ArtLegendTheme.kt` — dark Material3 theme, violet/cyan accents
|
||||
- `ui/ArtLegendApp.kt` — NavHost with 4 routes (hub, detail/{moduleType}, progress, settings)
|
||||
- `ui/screens/HubScreen.kt` — LazyVerticalGrid of 4 module cards
|
||||
- `ui/screens/ModuleDetailScreen.kt` — module info + "Start Training" button
|
||||
- `ui/screens/ProgressScreen.kt` — stub
|
||||
- `ui/screens/SettingsScreen.kt` — stub
|
||||
- `res/values/themes.xml` — Theme.ArtLegend (Material3) + Theme.ArtLegend.Fullscreen
|
||||
- `AndroidManifest.xml` updated — MainActivity as LAUNCHER, GameActivity registered
|
||||
---
|
||||
|
||||
### AL-005 — GameActivity + stylus bridge [DONE]
|
||||
- `GameActivity.kt` created — AndroidApplication, reads ModuleType from Intent
|
||||
- Stylus OnTouchListener set on LibGDX view post-initialization
|
||||
- `handleStylusEvent()` extracts pressure/tilt/orient, posts StylusFrame to bridge
|
||||
- Logs `pressure` + `isStylus` to logcat for verification
|
||||
### AL-011 — Scrolling corridor engine [TODO]
|
||||
|
||||
### AL-006 — LineCorridorScreen renders corridor [DONE]
|
||||
- ShapeRenderer corridor: two cyan walls + dashed centerline at random ±25° angle
|
||||
- Stroke captured per-frame from StylusInputBridge; yellow alpha stroke rendered live
|
||||
- `isDown` field added to StylusFrame; DOWN/UP edges detected for clean start/stop
|
||||
- Y-coordinate flipped (Android top-left → LibGDX bottom-left)
|
||||
Rewrite `LineCorridorScreen` to implement the scrolling corridor from MODULES.md.
|
||||
|
||||
### AL-007 — Score calculation [DONE]
|
||||
- `LineScore(straightness, pressureConsistency, overall)` data class in core/modules
|
||||
- RMS perpendicular deviation from centerline → straightness (0..1)
|
||||
- RMS pressure deviation from 0.5 target → pressureConsistency (0..1)
|
||||
- overall = straightness×0.6 + pressureConsistency×0.4
|
||||
- Score logged to logcat on stylus lift
|
||||
**Geometry:**
|
||||
- Corridor scrolls across the screen at a configurable pixel/sec speed
|
||||
- Corridor is represented as a spine (centerline) moving left-to-right (or at an angle on higher difficulties)
|
||||
- Player tracks the moving gap by holding their stylus inside it
|
||||
|
||||
### AL-008 — Score returned to hub [DONE]
|
||||
- `GameHost.onSessionComplete: ((LineScore) -> Unit)?` wired by GameActivity
|
||||
- GL thread score callback → `runOnUiThread { setResult + finish() }`
|
||||
- `MainActivity.gameResultLauncher` (ActivityResultContracts.StartActivityForResult)
|
||||
- `lastScore: LineScore?` state flows through ArtLegendApp → ModuleDetailScreen
|
||||
- ScoreCard shows Overall / Line / Pressure % on return; button changes to "Train Again"
|
||||
**Rendering:**
|
||||
- Two cyan wall lines scrolling across screen
|
||||
- Visible lookahead: player can see a few screen-widths ahead
|
||||
- Stylus trail rendered in yellow (pressure-modulated alpha, same as prototype)
|
||||
- HUD: session timer (top-right), score preview (fill % running avg, penalty count)
|
||||
|
||||
### AL-009 — End-to-end smoke test [TODO]
|
||||
- `./gradlew :android:assembleDebug` passes
|
||||
- App launches to Compose hub showing 4 module cards
|
||||
- Tap card → ModuleDetail with "Start Training" button
|
||||
- Tap "Start Training" → LibGDX renders dark background with corridor
|
||||
- Stylus pressure values visible in logcat
|
||||
**Session lifecycle:**
|
||||
- Session runs for a fixed duration (`sessionDuration` param, default 30s)
|
||||
- When time runs out: compute final score, call `onSessionComplete`
|
||||
- Player must hold stylus the entire time — stylus-up counts as not filling
|
||||
|
||||
**Constructor params:**
|
||||
```kotlin
|
||||
class LineCorridorScreen(
|
||||
bridge: StylusInputBridge,
|
||||
onSessionComplete: (CorridorScore) -> Unit,
|
||||
corridorWidth: Float = 80f,
|
||||
scrollSpeed: Float = 180f,
|
||||
sessionDuration: Float = 30f,
|
||||
angleChangeEnabled: Boolean = false
|
||||
)
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### AL-012 — Real-time containment + fill scoring [TODO]
|
||||
|
||||
Implement per-frame scoring logic inside `LineCorridorScreen`.
|
||||
|
||||
**Per-frame:**
|
||||
- Compute the corridor bounds at the stylus X position (or nearest corridor segment)
|
||||
- If stylus is inside bounds: record perpendicular offset → contributes to running fill average
|
||||
- If stylus crosses a wall: increment `wallPenaltyCount`, enforce a brief visual flash (wall turns red for 0.3s)
|
||||
- If stylus is up: does not contribute to fill average (neutral, not a penalty)
|
||||
|
||||
**At session end:**
|
||||
- `fill` = mean of per-frame fill samples (each sample = `1 - |offset| / halfWidth`, clamped 0..1)
|
||||
- `wallPenalties` = total crossing count
|
||||
- `overall` = `(fill * 0.7 - wallPenalties * 0.05).coerceIn(0f, 1f)`
|
||||
|
||||
---
|
||||
|
||||
### AL-013 — Difficulty tiers [TODO]
|
||||
|
||||
Add selectable difficulty levels that feed into `LineCorridorScreen` params.
|
||||
|
||||
**In `shared/`:**
|
||||
```kotlin
|
||||
enum class Difficulty { EASY, MEDIUM, HARD }
|
||||
```
|
||||
|
||||
**Difficulty knobs:**
|
||||
|
||||
| | EASY | MEDIUM | HARD |
|
||||
|---|---|---|---|
|
||||
| Corridor width | 90f | 60f | 38f |
|
||||
| Scroll speed (px/s) | 140f | 220f | 340f |
|
||||
| Angle changes | None | Gentle (±15° max) | Frequent (±35° max) |
|
||||
| Session duration | 30s | 30s | 30s |
|
||||
|
||||
**UI — `ModuleDetailScreen`:**
|
||||
- Add a `Difficulty` selector (three segmented chips: Easy / Medium / Hard) between the module description and the "Start Training" button
|
||||
- Default: EASY
|
||||
- Pass selected `Difficulty` as an Intent extra to `GameActivity`
|
||||
|
||||
**In `GameActivity`:**
|
||||
- Read `Difficulty` from Intent, build `LineCorridorScreen` with corresponding params
|
||||
- Pass `Difficulty.name` through to the score result so it can be stored with the session
|
||||
|
||||
**Add `difficulty: String` column to `SessionEntity`** (schema version → 3, destructive migration)
|
||||
|
||||
---
|
||||
|
||||
### AL-014 — Session summary screen [TODO]
|
||||
|
||||
Add a dedicated post-game summary in Compose shown after the LibGDX screen closes, before the user returns to the hub.
|
||||
|
||||
**New route in `ArtLegendApp`:** `summary/{moduleType}`
|
||||
|
||||
**`SummaryScreen` composable:**
|
||||
- Score breakdown: Overall %, Fill %, Wall Penalties
|
||||
- Streak badge: "X-day streak" (see streak logic below)
|
||||
- Buttons: "Train Again" (relaunch same module/difficulty), "View Progress", "Back to Hub"
|
||||
|
||||
**Streak logic (in `ProgressViewModel`):**
|
||||
- Add `fun streakFor(moduleType: ModuleType): Int` — query sessions ordered by timestamp, count consecutive calendar days ending today that have at least one session
|
||||
- Expose as `StateFlow<Int>`
|
||||
|
||||
**Wire-up:**
|
||||
- After `gameResultLauncher` receives a result, navigate to `summary/{moduleType}` instead of staying on `ModuleDetailScreen`
|
||||
- Pass `CorridorScore` to `SummaryScreen` via `ArtLegendApp` state (same pattern as `lastScore` in Sprint 1)
|
||||
- `ModuleDetailScreen` no longer shows the inline `ScoreCard` — summary screen owns that
|
||||
|
||||
---
|
||||
|
||||
### AL-015 — Integration smoke test [TODO]
|
||||
|
||||
- `./gradlew :android:assembleDebug` passes with no errors
|
||||
- Hub → Module Detail → difficulty selector renders (Easy selected by default)
|
||||
- "Start Training" → LibGDX renders scrolling corridor with visible movement
|
||||
- Stylus held inside corridor: fill HUD increments; crossing a wall: wall flashes red
|
||||
- Session timer counts down, auto-returns at 0s
|
||||
- Summary screen shows Fill %, Wall Penalties, Overall %, streak badge
|
||||
- Progress screen bar chart reflects the session just completed
|
||||
- All three difficulty tiers launch without crash
|
||||
|
||||
---
|
||||
|
||||
## Blocked
|
||||
|
||||
_Nothing blocked currently._
|
||||
|
||||
## Out of Scope This Sprint
|
||||
- Local score persistence (Phase 1)
|
||||
- Difficulty progression
|
||||
|
||||
- Angle change corridor segments (HARD difficulty — define the knob values but angle changes can ship as a fast-follow if time allows)
|
||||
- Sound effects / haptic feedback
|
||||
- Global XP system
|
||||
- In-app purchases
|
||||
- Cloud sync
|
||||
|
||||
Reference in New Issue
Block a user