Full AL-001 through AL-008 implementation: shared/ module with ModuleType enum, GameHost routing, StylusInputBridge, LineCorridorScreen with live stroke rendering, LineScore (straightness + anglePrecision), score returned to Compose hub via ActivityResult. Fixes LineScore field mismatch (pressureConsistency → anglePrecision) caught during AL-009 build check. Adds .gitignore and handoff notes. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
3.8 KiB
3.8 KiB
ArtLegend — Current Sprint
Sprint goal: Hybrid architecture end-to-end. Compose hub → LibGDX LineCorridorScreen with live stylus pressure data.
Tickets
AL-001 — shared/ module compiles [DONE]
shared/build.gradle.ktscreated (pure Kotlin JVM)ModuleType.ktcreated with LINE_CORRIDOR, PRESSURE_RAMP, CURVE_SCULPTOR, VECTOR_SNAPsettings.gradle.ktsupdated to include"shared"
AL-002 — core/ restructured [DONE]
GameHost.ktreplacesArtLegend.kt— acceptsModuleType, routes to correct ScreenPlaceholderModuleScreen.kt— stub Screen for unimplemented modulesinput/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.ktsupdated with:shareddependency
AL-003 — Compose added to android/ [DONE]
android/build.gradle.ktsupdated:buildFeatures { compose = true }, Compose BOM 2024.09.00, navigation-compose, activity-compose, lifecyclegradle.propertiesupdated with compose versions
AL-004 — MainActivity + Compose hub [DONE]
MainActivity.ktcreated — ComponentActivity, sets Compose contentui/theme/ArtLegendTheme.kt— dark Material3 theme, violet/cyan accentsui/ArtLegendApp.kt— NavHost with 4 routes (hub, detail/{moduleType}, progress, settings)ui/screens/HubScreen.kt— LazyVerticalGrid of 4 module cardsui/screens/ModuleDetailScreen.kt— module info + "Start Training" buttonui/screens/ProgressScreen.kt— stubui/screens/SettingsScreen.kt— stubres/values/themes.xml— Theme.ArtLegend (Material3) + Theme.ArtLegend.FullscreenAndroidManifest.xmlupdated — MainActivity as LAUNCHER, GameActivity registered
AL-005 — GameActivity + stylus bridge [DONE]
GameActivity.ktcreated — AndroidApplication, reads ModuleType from Intent- Stylus OnTouchListener set on LibGDX view post-initialization
handleStylusEvent()extracts pressure/tilt/orient, posts StylusFrame to bridge- Logs
pressure+isStylusto logcat for verification
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
isDownfield added to StylusFrame; DOWN/UP edges detected for clean start/stop- Y-coordinate flipped (Android top-left → LibGDX bottom-left)
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
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"
AL-009 — End-to-end smoke test [TODO]
./gradlew :android:assembleDebugpasses- 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
Blocked
Nothing blocked currently.
Out of Scope This Sprint
- Local score persistence (Phase 1)
- Difficulty progression
- In-app purchases
- Cloud sync