@@ -11,4 +11,44 @@ pub mod constants {
1111 pub const WINDOW_HEIGHT : f32 = 720.0 ;
1212 /// Game title
1313 pub const GAME_TITLE : & str = "2D Mario-Style Platformer" ;
14+
15+ /// Camera smoothing constants
16+ pub mod camera {
17+ /// Target framerate for smoothing calculations
18+ pub const TARGET_FRAMERATE : f32 = 60.0 ;
19+ /// Minimum smoothing factor (instant follow)
20+ pub const MIN_SMOOTHING : f32 = 0.01 ;
21+ /// Maximum smoothing factor (slowest follow)
22+ pub const MAX_SMOOTHING : f32 = 1.0 ;
23+ }
24+
25+ /// Obstacle spawning constants
26+ pub mod obstacles {
27+ /// X position where obstacles spawn (right side of screen)
28+ pub const SPAWN_X : f32 = 700.0 ;
29+ /// Minimum Y position for obstacle spawn
30+ pub const SPAWN_Y_MIN : f32 = -200.0 ;
31+ /// Maximum Y position for obstacle spawn
32+ pub const SPAWN_Y_MAX : f32 = 150.0 ;
33+ /// Minimum obstacle width
34+ pub const WIDTH_MIN : f32 = 30.0 ;
35+ /// Maximum obstacle width
36+ pub const WIDTH_MAX : f32 = 60.0 ;
37+ /// Minimum obstacle height
38+ pub const HEIGHT_MIN : f32 = 30.0 ;
39+ /// Maximum obstacle height
40+ pub const HEIGHT_MAX : f32 = 60.0 ;
41+ /// Minimum obstacle speed
42+ pub const SPEED_MIN : f32 = 100.0 ;
43+ /// Maximum obstacle speed
44+ pub const SPEED_MAX : f32 = 250.0 ;
45+ /// X position at which obstacles are despawned (left side of screen)
46+ pub const DESPAWN_X : f32 = -800.0 ;
47+ }
48+
49+ /// Scoring constants
50+ pub mod scoring {
51+ /// Points awarded for surviving obstacle collision
52+ pub const OBSTACLE_SURVIVE_POINTS : u32 = 10 ;
53+ }
1454}
0 commit comments