SPB Git

Repository Public License

IMPLEMENTATION_PLAN.md 4.2 KB 69 lines markdown

1<!--2ORIX Arcade3File: docs/IMPLEMENTATION_PLAN.md4Author: Simon-Pierre Boucher5Contact: contact@spboucher.ai6-->7# ORIX Arcade — implementation plan89Written 2026-11-21 after the Phase 0 audit. Progress against it is tracked in `docs/PROGRESS.md`.1011## Audit findings1213| Item | Finding |14|---|---|15| Repository | None existed. Created at `~/Desktop/Cluster/apple/ORIXArcade` (git, branch `main`). |16| Toolchain | Xcode 27.2 (27B52), XcodeGen, simulator runtime iOS 26.5 only. |17| Devices | Simulators only; no physical iPhone attached. Dedicated simulator "ORIXArcade iPhone" (iPhone 17 Pro). |18| Signing | Team `3YM54G49SN`, automatic signing with the team App Store Connect API key already on this Mac. |19| Reusable | Release recipe of the ORIX family (archive, export, altool). No shared game code. |20| Assets | None. Decision: all art, sound and music are generated in code — nothing to license. |2122## Architecture2324```25App/            entry point, root navigation, lobby, awards, settings26DesignSystem/   tokens (colour, type, spacing, motion), components, backgrounds, logo27ArcadeCore/     game catalogue + descriptor contract, services, seeded RNG, SpriteKit base scene, in-game chrome28AudioHaptics/   procedural synth, audio director, Core Haptics director29Persistence/    versioned Codable save, store with backup / recovery / export / import30Games/<Game>/   one folder per game: pure rules, SpriteKit scene, SwiftUI screens, save model31Tests/          unit tests (XCTest, hosted in the app)32UITests/        UI smoke tests33```3435Decisions:3637- **One app target, no packages.** Three games and a small core do not justify package overhead; folders give the boundaries.38- **Swift 6, main-actor by default** in the app target; pure data types are `nonisolated`.39- **Each game owns its flow** (menu → play → results) behind a `GameDescriptor`; the lobby knows nothing else about it.40- **Rules are pure Swift**, separate from SpriteKit rendering, so scoring, generation and traffic logic are unit-tested deterministically.41- **Codable JSON save** rather than SwiftData: one small document, trivial export/import, explicit migration hook, corruption fallback to a rolling backup. Unreadable files are set aside, never deleted.42- **Procedural audio** (AVAudioEngine, buffers rendered at launch) on an `.ambient` session: obeys the silent switch, mixes with the player's music.43- **Automatic effect scaling**: `ArcadeScene` lowers particle counts when frames run long or Low Power Mode is on.44- **iPhone only, portrait only, iOS 18+**, dark-only art direction.4546## Milestones and acceptance criteria4748| # | Milestone | Accepted when |49|---|---|---|50| 1 | Foundation: project, design system, persistence, audio/haptics, game host, lobby | Builds; lobby, awards and settings run on the simulator; persistence tests pass |51| 2 | Traffic Mayhem | 3 layouts, tutorial, fair spawner proven by seeded simulation tests, scores saved |52| 3 | Domino City | 15 levels each cleared by its reference solution, stars and unlocks saved |53| 4 | Dig to Core | 4 biomes, 10 upgrades, seeded generation with traversability tests, economy saved |54| 5 | Integration and polish | All three reachable from the lobby, pause/resume, achievements, settings honoured |55| 6 | Proof | Unit + UI tests run; real screenshots captured and inspected; metrics recorded with environment |56| 7 | Release | Archive signed, uploaded to TestFlight, repository pushed, README and report written |5758The three games are developed in parallel in separate git worktrees on top of milestone 1 and merged for milestone 5.5960## Risks6162| Risk | Mitigation |63|---|---|64| SpriteKit physics is not bit-exact, so domino outcomes could vary | Fixed setups, capped bodies, wide solution tolerances, reference solutions replayed by a bot |65| Unfair traffic spawns | Spawner consults the conflict table and reaction-time budget; long seeded simulations in tests |66| Procedural terrain producing dead ends | Carved guaranteed route per chunk, validated in tests over many seeds |67| No physical device | Simulator verification only; device feel, haptics and real frame rates are reported as not measured |68| Simulator frame times are not device frame times | Metrics are labelled with their environment and never presented as device results |69
Files main
Menu

Theme