Each entry names the module it lives in, so the description can be checked against the project.
Startup and loading
routes/play.jsx · AssetSession · StartupScreen
The play route loads the project's asset registry, then shows the start screen. The three.js engine and the whole campus are only downloaded once the player leaves the menu, so the menu appears without waiting for the 3D world.
Character selection and player state
CharacterSelect · game/students/roster.js
Six roster slots, each pointing at an imported student model with its own unlock price. The chosen slot, the player's name and the students bought so far are stored in the save, so Continue restores exactly who was picked.
Campus rendering and movement
game/world/* · Player.js · FollowCamera.js
The campus is generated from a layout blueprint — wings, rooms, grounds, paths and props — and batched into instanced meshes to keep draw calls low. The player is a third-person character driven by a capsule controller with axis-aligned collision probes and a follow camera.
Input for touch and keyboard
GameHud.jsx · useGamePanels.js
A touch joystick, a drag-look layer and context action buttons for mobile; WASD, mouse look, E, Space, Shift, M, P and Esc for desktop. Portrait phones get a rotate notice, and the system back gesture closes panels in order.
Timetable and the school day
game/school/timetable.js · useGameClock.js · day.js
Periods, bell lead time and the attendance window live in one module; a clock hook advances the in-game minute, triggers bells, and checkpoints the save. The end of the day produces a summary from the day's own records.
Lesson papers
game/school/lessons.js · LessonOverlay · PaperRound
Papers are generated locally from a per-day seed, so a day always sets the same paper: maths rounds, biology matching and history questions. The overlay grades the answers and the save records the score, XP, coins and streak.
NPCs, dialogue and quests
game/npc/* · dialogue.js · missions.js
Classmates and staff are spawned with timetable routes and seated in classrooms. Dialogue is composed from the live save, so staff answer about the actual next lesson or open errand. Seven scripted tasks carry steps, destinations and rewards, advanced by the mission logic in the save.
Progression: XP, coins and ranks
game/school/progression.js · progress.js
Levels, five ranks, daily objectives and achievements are pure functions over the save. Every reward passes through one commit path in the game shell, which also settles objectives and promotions, so no reward can be paid twice.
Student phone and navigation
components/game/phone/* · world/navGraph.js · navigator.js
The phone holds the planner, map, records, tasks, progress and the student guide. Navigation builds a walkable route graph from the campus layout, so the map can mark a destination and the minimap keeps it in view.
Library and reading
game/school/books.js · LibraryPanel · BookReader
Nineteen titles in four sections, with optional rank, level or count requirements. Borrowing, page-by-page reading with illustrations and returning are recorded per book in the save, and finishing a book pays XP.
Restoration and chores
game/school/facilities.js · gardening.js · cleaning.js
The Community Garden runs on a one-way facility state machine: requirements, unlock cost, per-task restoration counts, then an active zone. Planting, watering and harvesting advance against the save's day number, and litter pickups are limited to once per piece per school day.
Tests, exams and the final paper
game/school/terms.js · assessments.js · excellence.js
A term is three seven-day weeks derived from the day number. Weekly tests and the term examination open on their scheduled day and stay open until passed, paying once on the first pass. The Excellence Challenge adds advanced papers and a final.
Saved progress
game/school/progress.js · game/assets/registry.js
The whole save is written to this device's local storage under one key, with migrations for older saves, and the current screen is kept in session storage. The asset registry itself is stored in Base44 entities, not in the save.