|
| constexpr std::uint32_t | tick_rate = 60 |
| | Simulation rate of the server, in ticks per second.
|
| |
| constexpr std::uint32_t | snapshot_rate = 20 |
| | Snapshots the server sends each client per second (RFC section 4.3).
|
| |
| constexpr std::uint32_t | position_history_ticks = tick_rate / 2 |
| | Ticks of enemy positions the server keeps, for lag compensation: 500 ms.
|
| |
| constexpr std::chrono::milliseconds | client_interpolation_delay {100} |
| | How far behind the server a client draws the world, as the server assumes it for lag compensation: the client's first interpolation delay, which clients do not report.
|
| |
| constexpr float | area_width = 1280.0F |
| | Width of the play area (logical resolution).
|
| |
| constexpr float | area_height = 720.0F |
| | Height of the play area (logical resolution).
|
| |
| constexpr std::size_t | max_players = 4 |
| | Players in one game, as the subject requires.
|
| |
| constexpr float | player_speed = 300.0F |
| | Speed of a player ship, the same in every direction.
|
| |
| constexpr aegis2d::Vec2 | player_size {33.0F, 17.0F} |
| | Size of a player ship on screen.
|
| |
| constexpr aegis2d::Vec2 | player_hitbox {27.0F, 11.0F} |
| | Hit box of a player ship, a little smaller than its sprite.
|
| |
| constexpr std::int32_t | player_health = 1 |
| | Health points of a player ship: one hit loses a life.
|
| |
| constexpr std::uint32_t | player_lives = 3 |
| | Lives of a player at the start of a game.
|
| |
| constexpr float | player_spawn_x = 100.0F |
| | Distance of the player spawns from the left edge.
|
| |
| constexpr float | player_fire_cooldown = 0.25F |
| | Seconds between two shots of a player holding fire (four shots a second).
|
| |
| constexpr float | player_missile_speed = 900.0F |
| | Speed of a player missile, to the right.
|
| |
| constexpr aegis2d::Vec2 | player_missile_size {16.0F, 4.0F} |
| | Size of a player missile.
|
| |
| constexpr std::int32_t | player_missile_damage = 1 |
| | Damage of a player missile.
|
| |
| constexpr aegis2d::Vec2 | bydos_size {32.0F, 32.0F} |
| | Size of a Bydos slave, as the clients draw it: width and height of assets/enemies/bydos_slave.lua, where its other values and its behavior are.
|
| |
| constexpr float | bydos_lane_margin = 48.0F |
| | Room kept above and below the line of a random Bydos for its weave: the amplitude of assets/enemies/bydos_slave.lua.
|
| |
| constexpr std::string_view | random_enemy = "bydos_slave" |
| | Enemy type the random spawns create, from assets/enemies.
|
| |
| constexpr float | bydos_spawn_min_interval = 0.8F |
| | Shortest time between two random Bydos spawns, in seconds.
|
| |
| constexpr float | bydos_spawn_max_interval = 2.0F |
| | Longest time between two random Bydos spawns, in seconds.
|
| |
| constexpr float | bydos_spawn_x = area_width + (bydos_size.x / 2.0F) |
| | x of the random spawns: a Bydos appears just beyond the right edge.
|
| |
| constexpr float | bydos_lane_top = bydos_lane_margin + (bydos_size.y / 2.0F) |
| | Highest line of a random Bydos, so that it weaves without leaving the screen.
|
| |
| constexpr float | bydos_lane_bottom = area_height - bydos_lane_top |
| | Lowest line of a random Bydos.
|
| |
| constexpr std::int32_t | easy_enemy_health_factor = 1 |
| | Factor of the enemy health of an easy room: one missile still kills a Bydos.
|
| |
| constexpr float | easy_spawn_interval_scale = 1.5F |
| | Random Bydos spawn intervals of an easy room, times the normal ones: fewer enemies.
|
| |
| constexpr std::int32_t | hard_enemy_health_factor = 2 |
| | Factor of the enemy health of a hard room: a Bydos takes two missiles.
|
| |
| constexpr float | hard_spawn_interval_scale = 0.6F |
| | Random Bydos spawn intervals of a hard room, times the normal ones: more enemies.
|
| |
| constexpr float | enemy_missile_speed = 300.0F |
| | Speed of an enemy missile, to the left.
|
| |
| constexpr aegis2d::Vec2 | enemy_missile_size {8.0F, 8.0F} |
| | Size of an enemy missile.
|
| |
| constexpr std::int32_t | enemy_missile_damage = 1 |
| | Damage of an enemy missile.
|
| |
| constexpr std::int32_t | ram_damage = 1 |
| | Damage dealt by ramming: a player ship and a Bydos hurt each other on contact.
|
| |
| constexpr float | despawn_margin = 64.0F |
| | Distance beyond the screen edges before a missile or an enemy is destroyed, so an enemy whose path dips off screen is kept (ecs::OffscreenDespawn::margin).
|
| |
| constexpr float | collision_cell = 64.0F |
| | Side of a cell of the collision grid, about the size of a Bydos.
|
| |
Values tuned for the game, in logical pixels, seconds and health points.