r-type  0.0.0
R-Type main
Loading...
Searching...
No Matches
GameConfig.hpp
Go to the documentation of this file.
1///
2/// @file GameConfig.hpp
3/// @brief Configuration constants for the multiplayer game
4/// @namespace gme
5///
6
7#pragma once
8
9namespace utl
10{
11 namespace GameConfig
12 {
13 namespace Screen
14 {
15 inline constexpr float SPAWN_X = 1950.0f;
16 inline constexpr float MIN_Y = 50.0f;
17 inline constexpr float MAX_Y = 1030.0f;
18 inline constexpr float REMOVE_X = -100.0f;
19 inline constexpr float REMOVE_MIN_Y = -50.0f;
20 inline constexpr float REMOVE_MAX_Y = 1130.0f;
21 } // namespace Screen
22 namespace Player
23 {
24 inline constexpr float SPEED = 500.0f;
25 inline constexpr float DIAGONAL_SPEED_MULTIPLIER = 0.707f;
26 inline constexpr float SPRITE_WIDTH = 33.0f;
27 inline constexpr float SPRITE_HEIGHT = 17.0f;
28 inline constexpr float WIDTH = 66.0f;
29 inline constexpr float HEIGHT = 17.0f;
30 inline constexpr float SCALE = 2.0f;
31 inline constexpr int FRAMES_PER_ROW = 5;
32 } // namespace Player
33 namespace Projectile
34 {
35 namespace Basic
36 {
37 inline constexpr float SPEED = 800.0f;
38 inline constexpr float DAMAGE = 10.0f;
39 inline constexpr float LIFETIME = 3.0f;
40 inline constexpr float SCALE = 1.0f;
41 inline constexpr float FIRE_COOLDOWN = 0.3f;
42 inline constexpr float SPRITE_WIDTH = 16.0f;
43 inline constexpr float SPRITE_HEIGHT = 8.0f;
44 } // namespace Basic
45
46 namespace Supercharged
47 {
48 inline constexpr float SPEED = 1200.0f;
49 inline constexpr float DAMAGE = 25.0f;
50 inline constexpr float LIFETIME = 5.0f;
51 inline constexpr float SCALE = 1.5f;
52 inline constexpr float FIRE_COOLDOWN = 0.2f;
53 inline constexpr float CHARGE_TIME = 0.5f;
54 inline constexpr float SPRITE_WIDTH = 29.0f;
55 inline constexpr float SPRITE_HEIGHT = 24.0f;
56 inline constexpr int ANIMATION_FRAMES = 4;
57 inline constexpr float ANIMATION_DURATION = 0.15f;
58 } // namespace Supercharged
59 } // namespace Projectile
60 namespace Animation
61 {
62 inline constexpr float FRAME_DURATION = 0.1f;
63 }
64 namespace Beam
65 {
66 inline constexpr float MAX_CHARGE = 1.0f;
67 inline constexpr float CHARGE_RATE = 1.0f;
68 inline constexpr float BAR_WIDTH = 120.0f;
69 inline constexpr float BAR_HEIGHT = 12.0f;
70 inline constexpr float BAR_X = 10.0f;
71 inline constexpr float BAR_Y = 10.0f;
72 } // namespace Beam
73 namespace LoadingAnimation
74 {
75 inline constexpr float SPRITE_WIDTH = 29.0f;
76 inline constexpr float SPRITE_HEIGHT = 24.0f;
77 inline constexpr int ANIMATION_FRAMES = 4;
78 inline constexpr float ANIMATION_DURATION = 0.15f;
79 inline constexpr float OFFSET_X = 60.0f;
80 inline constexpr float OFFSET_Y = 6.0f;
81 } // namespace LoadingAnimation
82 namespace Stage
83 {
84 inline constexpr float FLOOR_OFFSET_Y = 16.0f;
85 inline constexpr float CEILING_OFFSET_Y = -1.0f;
86 } // namespace Stage
87 namespace Enemy
88 {
89 namespace Easy
90 {
91 inline constexpr float HEALTH = 1.0f;
92 inline constexpr float DAMAGE = 5.0f;
93 inline constexpr float SPEED = 80.0f;
94 inline constexpr float SPRITE_WIDTH = 32.0f;
95 inline constexpr float SPRITE_HEIGHT = 32.0f;
96 inline constexpr float SCALE = 2.0f;
97 inline constexpr float SHOOT_COOLDOWN = 2.0f;
98 inline constexpr float SPAWN_RATE = 2.0f;
99 inline constexpr int ANIMATION_FRAMES = 4;
100 inline constexpr float ANIMATION_DURATION = 0.5f;
101 inline constexpr int FRAMES_PER_ROW = 4;
102 } // namespace Easy
103 } // namespace Enemy
104 namespace Explosion
105 {
106 inline constexpr float SPRITE_WIDTH = 32.0f;
107 inline constexpr float SPRITE_HEIGHT = 32.0f;
108 inline constexpr int ANIMATION_FRAMES = 4;
109 inline constexpr float ANIMATION_DURATION = 0.1f;
110 inline constexpr int FRAMES_PER_ROW = 4;
111 inline constexpr float LIFETIME = 0.4f;
112 inline constexpr float SCALE = 2.0f;
113 } // namespace Explosion
114 namespace Hitbox
115 {
116 inline constexpr float PLAYER_RADIUS = 20.0f;
117 inline constexpr float BOSS_RADIUS = 90.0f;
118 inline constexpr float ENEMY_RADIUS = 15.0f;
119 inline constexpr float PROJECTILE_BASIC_RADIUS = 5.0f;
120 inline constexpr float PROJECTILE_SUPERCHARGED_RADIUS = 8.0f;
121 } // namespace Hitbox
122 namespace Server
123 {
124 inline constexpr float SCREEN_WIDTH = 1920.0f;
125 inline constexpr float SCREEN_HEIGHT = 1080.0f;
126 inline constexpr float WORLD_MARGIN = 200.0f;
127
128 namespace Enemy
129 {
130 namespace Basic
131 {
132 inline constexpr float HEALTH = 50.0f;
133 inline constexpr float DAMAGE = 10.0f;
134 inline constexpr float SPEED = 200.0f;
135 inline constexpr float SHOOT_COOLDOWN = 2.0f;
136 inline constexpr float HITBOX_RADIUS = 15.0f;
137 } // namespace Basic
138
139 namespace Advanced
140 {
141 inline constexpr float HEALTH = 100.0f;
142 inline constexpr float DAMAGE = 15.0f;
143 inline constexpr float SPEED = 150.0f;
144 inline constexpr float SHOOT_COOLDOWN = 1.5f;
145 inline constexpr float HITBOX_RADIUS = 15.0f;
146 inline constexpr float SINE_FREQUENCY = 1.5f;
147 inline constexpr float SINE_AMPLITUDE = 100.0f;
148 } // namespace Advanced
149
150 namespace Boss
151 {
152 inline constexpr float HEALTH = 1000.0f;
153 inline constexpr float DAMAGE = 50.0f;
154 inline constexpr float HITBOX_RADIUS = 50.0f;
155 inline constexpr float RAM_DAMAGE = 20.0f;
156 inline constexpr float PHASE_2_THRESHOLD = 0.66f;
157 inline constexpr float PHASE_3_THRESHOLD = 0.33f;
158 inline constexpr float PHASE1_SPEED = 30.0f;
159 inline constexpr float PHASE1_COOLDOWN = 1.5f;
160 inline constexpr float PHASE1_SINE_FREQUENCY = 0.5f;
161 inline constexpr float PHASE1_SINE_AMPLITUDE = 150.0f;
162 inline constexpr float PHASE2_COOLDOWN = 1.0f;
163 inline constexpr float PHASE3_SPEED = 50.0f;
164 inline constexpr float PHASE3_COOLDOWN = 0.5f;
165 inline constexpr float PHASE3_AGGRESSION = 80.0f;
166 inline constexpr float SPREAD_INTERVAL = 1.0f;
167 inline constexpr float SPREAD_ANGLE_DEGREES = 15.0f;
168 inline constexpr float SPREAD_SPEED = 300.0f;
169 } // namespace Boss
170
171 namespace AI
172 {
173 inline constexpr float SHOOT_CHANCE = 0.3f;
174 inline constexpr float MAX_SHOOT_DISTANCE = 1500.0f;
175 inline constexpr float AGGRESSIVE_ACTIVATION_DISTANCE = 400.0f;
176 inline constexpr float ZIGZAG_PERIOD = 1.5f;
177 inline constexpr float ZIGZAG_SPEED_X = 150.0f;
178 inline constexpr float ZIGZAG_SPEED_Y = 100.0f;
179 } // namespace AI
180 } // namespace Enemy
181
182 namespace Projectile
183 {
184 inline constexpr float ENEMY_SPEED = 500.0f;
185 inline constexpr float ENEMY_DAMAGE = 15.0f;
186 inline constexpr float ENEMY_LIFETIME = 10.0f;
187 } // namespace Projectile
188
189 namespace Network
190 {
191 inline constexpr float BROADCAST_RATE = 60.0f;
192 inline constexpr float BROADCAST_INTERVAL = 1.0f / BROADCAST_RATE;
193 } // namespace Network
194 } // namespace Server
195 } // namespace GameConfig
196} // namespace utl
constexpr float FRAME_DURATION
constexpr float BAR_Y
constexpr float MAX_CHARGE
constexpr float BAR_WIDTH
constexpr float CHARGE_RATE
constexpr float BAR_X
constexpr float BAR_HEIGHT
constexpr float SPRITE_HEIGHT
constexpr float ANIMATION_DURATION
constexpr float SHOOT_COOLDOWN
constexpr float SPRITE_HEIGHT
constexpr float SPRITE_WIDTH
constexpr float ANIMATION_DURATION
constexpr float PROJECTILE_BASIC_RADIUS
constexpr float BOSS_RADIUS
constexpr float PLAYER_RADIUS
constexpr float PROJECTILE_SUPERCHARGED_RADIUS
constexpr float ENEMY_RADIUS
constexpr float WIDTH
constexpr float SCALE
constexpr float DIAGONAL_SPEED_MULTIPLIER
constexpr float SPEED
constexpr float SPRITE_HEIGHT
constexpr float SPRITE_WIDTH
constexpr float HEIGHT
constexpr int FRAMES_PER_ROW
constexpr float MAX_Y
constexpr float REMOVE_MIN_Y
constexpr float MIN_Y
constexpr float REMOVE_MAX_Y
constexpr float REMOVE_X
constexpr float SPAWN_X
constexpr float AGGRESSIVE_ACTIVATION_DISTANCE
constexpr float WORLD_MARGIN
constexpr float SCREEN_WIDTH
constexpr float SCREEN_HEIGHT
constexpr float FLOOR_OFFSET_Y
constexpr float CEILING_OFFSET_Y