How pavloshaparenko/genius-racer works
Genius Racer is a browser-based multiplication arcade game. The player selects an available table in the lobby, starts a race, answers multiplication questions at obstacles, and returns to the lobby with earned coins and any newly completed level recorded. From there, coins can unlock cars in the garage; a separate explanation screen teaches multiplication. Localization and audio support the experience. The workflow is based on the sampled app and screen components; broader capabilities such as sound and language choices are also documented in the README.
Main entry points: App.tsx App and lobby · race.tsx Multiplication race · LanguageContext.tsx Language context · sounds Sound assets
Components 13
Game flow
- App and lobby
src/App.tsx - Multiplication race
src/screens/Race/race.tsx
Progress and cars
- Level progression
src/App.tsx - Car garage
src/screens/Garage/Garage.tsx
Learning and localization
- Multiplication guide
src/screens/Explanation/Explanation.tsx - Language context
src/i18n/LanguageContext.tsx - Translations
src/i18n/translations.ts - Sound assets
src/assets/sounds
Browser runtime
- Player progress
src/core/storage.ts - Browser storage
- HTML audio
- React entry
src/index.tsx
Other components
- Player
Connections 21
- Player → App and lobby: chooses level
- Player → App and lobby: opens screens
- React entry → App and lobby: renders
- App and lobby → Multiplication race: starts race
- Multiplication race → App and lobby: reports finish
- App and lobby → Level progression: checks and records
- Level progression → App and lobby: updates progress
- App and lobby → Car garage: renders with car data
- Car garage → App and lobby: requests purchase or selection
- Player → Multiplication race: answers questions
- App and lobby → Multiplication guide: opens guide
- Player → Multiplication guide: reads guide
- React entry → Language context: provides context
- Language context → Translations: selects language text
- Language context → App and lobby: supplies language
- App and lobby → Browser storage: reads and writes progress
- Language context → Browser storage: persists language
- Multiplication race → Sound assets: loads effects
- App and lobby → Sound assets: selects level music
- Multiplication race → HTML audio: plays sounds and music
- Sound assets → HTML audio: provides audio files