src/config.js 550 B raw
1
// Game physics and scoring constants
2
// Used by both client (DinoGame) and server (validation)
3
export const GAME_CONFIG = {
4
  SCORE_INCREASE_RATE: 6,        // frames per score point
5
  WALL_CLOCK_TOLERANCE: 0.75,    // 75% of expected real-time duration
6
  MAX_PLAYER_NAME_LENGTH: 3,     // enforced on both client and server
7
  MAX_SCORE: 99999,              // reasonable upper bound
8
  MAX_SESSION_AGE_MS: 24 * 60 * 60 * 1000, // 24 hours
9
  MIN_GAME_DURATION_MS: 1000,    // absolute minimum game duration (1 second)
10
}
11
12
export const FRAME_RATE = 60