How mischa255/velorider-game works
VeloRider is a browser-based bicycle racing game. The player enters through the game UI, configures a bike or selects a track, races against bots, and receives progression or reward handling in the UI. Racing includes obstacle generation, bike simulation, collision handling, bot decisions, and rendering; the README specifically calls out bot hazard avoidance. The source index confirms the main module dependencies, but excerpts omit some runtime wiring, so the graph shows only evidenced calls and storage operations.
Main entry points: main.js Game bootstrap · race.js Race simulation and rendering · state.js Player state and autosave · audio.js Music and sound effects
Components 13
Game flow
- Game bootstrap
main.js - Garage and bike setup
main.js - Track and history selection
main.js - Results and rewards
main.js
Race runtime
- Race simulation and rendering
race.js - Bot driving decisions
bot-ai.js - Shared utilities
utils.js
Game content
- Items, tracks, obstacles
db.js
Persistence and audio
- Player state and autosave
state.js - Browser local storage
- Supabase saves
- Music and sound effects
audio.js
Other components
- Player
Connections 14
- Player → Game bootstrap: plays
README.md - Game bootstrap → Player state and autosave: loads state
main.js - Game bootstrap → Race simulation and rendering: starts race
main.js - Game bootstrap → Music and sound effects: initializes audio
main.js - Game bootstrap → Items, tracks, obstacles: reads catalogs
main.js - Game bootstrap → Shared utilities: uses rarity helper
main.js - Race simulation and rendering → Player state and autosave: reads race state
race.js - Race simulation and rendering → Items, tracks, obstacles: reads race data
race.js - Race simulation and rendering → Shared utilities: uses helpers
race.js - Race simulation and rendering → Music and sound effects: plays race sounds
race.js - Race simulation and rendering → Bot driving decisions: requests bot decisions
race.js - Music and sound effects → Shared utilities: uses clamp
audio.js - Player state and autosave → Browser local storage: reads and writes
state.js - Player state and autosave → Supabase saves: loads and saves
state.js