Namespaces | |
| namespace | anonymous_namespace{asteroids3d_window.cpp} |
| namespace | anonymous_namespace{multiplayer.cpp} |
| namespace | anonymous_namespace{port_mapping.cpp} |
Classes | |
| struct | Asteroid |
| Runtime state for an asteroid. More... | |
| class | Asteroids3DWindow |
| struct | FlamePushConstants |
| Push-constant payload for the engine-flame shaders. More... | |
| struct | FlameVertex |
| Vertex consumed by the procedural engine-flame pipeline. More... | |
| class | MultiplayerSession |
| Owns a host or client UDP session and exchanges replicated game state. More... | |
| struct | NetworkAsteroid |
| Serialized gameplay state for one asteroid. More... | |
| struct | NetworkExchange |
| Collection of remote player updates produced by one exchange tick. More... | |
| struct | NetworkPlayerUpdate |
| State received for a specific player slot. More... | |
| struct | NetworkProjectile |
| Serialized gameplay state for one projectile. More... | |
| struct | NetworkState |
| Complete replicated gameplay state published by one player. More... | |
| struct | Particle |
| Runtime state for an explosion or engine particle. More... | |
| class | PortMapping |
| Owns an automatically created UPnP or NAT-PMP port mapping. More... | |
| struct | Projectile |
| Runtime state for a ship projectile. More... | |
| class | Ship |
| Mutable gameplay and movement state for a player ship. More... | |
| struct | ShipCollisionSample |
| One spherical sample used by the compound ship collision shape. More... | |
| struct | Star |
| Runtime state for one animated background star. More... | |
| class | StarField |
| Manages and renders a camera-centered field of animated stars. More... | |
Enumerations | |
| enum class | GameMode { Intro , Loading , Lobby , Playing , MatchOver , GameComplete , GameOver , Intro , Loading , Playing , GameComplete , GameOver } |
| High-level state of the Asteroids application. More... | |
| enum class | GameMode { Intro , Loading , Lobby , Playing , MatchOver , GameComplete , GameOver , Intro , Loading , Playing , GameComplete , GameOver } |
Functions | |
| glm::mat4 | build_model_matrix (const glm::vec3 &position, const glm::vec3 &rotation_degrees, float scale, const glm::vec3 ¢er_offset) |
| Builds a translated, rotated, scaled model matrix. | |
| SDL_Surface * | load_color_keyed_png (const std::string &path, std::uint8_t threshold=12, std::uint8_t softness=48) |
| Loads a PNG and fades dark color-key pixels to transparency. | |
| glm::vec3 | normalize_or_zero (const glm::vec3 &value) |
| Normalizes a direction with a stable fallback. | |
| float | random_float (float min_value, float max_value) |
| Generates a uniformly distributed floating-point value. | |
| int | random_int (int min_value, int max_value) |
| Generates a uniformly distributed integer. | |
| std::default_random_engine & | rng () |
| Returns the thread-local random number engine used by simulation helpers. | |
| void | run_asteroids3d (const Arguments &args) |
| Runs the Asteroids application. | |
Variables | |
| constexpr std::size_t | NETWORK_ASTEROID_COUNT = 16 |
| Maximum asteroid snapshots carried in one network state. | |
| constexpr std::size_t | NETWORK_PLAYER_COUNT = 4 |
| Maximum number of players in a session. | |
| constexpr std::size_t | NETWORK_PROJECTILE_COUNT = 15 |
| Maximum projectile snapshots carried in one network state. | |
Simulation constants | |
| constexpr float | PI = 3.14159265358979323846f |
| Single-precision value of pi. | |
| constexpr int | GAME_STARS = 22000 |
| Number of stars in the background field. | |
| constexpr int | MAX_PROJECTILES = 64 |
| Maximum locally simulated projectiles. | |
| constexpr int | MAX_ASTEROIDS = 64 |
| Maximum locally simulated asteroids. | |
| constexpr int | MAX_PARTICLES = 6000 |
| Maximum particles in the shared particle pool. | |
| constexpr int | MAX_GENERATIONS = 1 |
| Maximum asteroid split generation. | |
| constexpr int | CHILDREN_PER_SPAWN = 2 |
| Child asteroids created by a split. | |
| constexpr int | LARGE_ASTEROID_POINTS = 20 |
| Score awarded for a large asteroid. | |
| constexpr int | MEDIUM_ASTEROID_POINTS = 50 |
| Score awarded for a medium asteroid. | |
| constexpr int | SMALL_ASTEROID_POINTS = 100 |
| Score awarded for a small asteroid. | |
| constexpr float | PROJECTILE_SPEED = 52.0f |
| Projectile travel speed in world units per second. | |
| constexpr float | PROJECTILE_LIFETIME = 3.0f |
| Projectile lifetime in seconds. | |
| constexpr int | FIRE_COOLDOWN = 5 |
| Frames between firing bursts. | |
| constexpr int | SHOTS_PER_BURST = 5 |
| Projectiles fired in one burst. | |
| constexpr int | FIRE_DELAY = 3 |
| Frames between shots within a burst. | |
| constexpr int | EXPLOSION_DURATION_FRAMES = 90 |
| Ship explosion duration in frames. | |
| constexpr float | ROUND_TIME_LIMIT_SECONDS = 270.0f |
| Multiplayer round limit in seconds. | |
| constexpr float | SHIP_MODEL_SCALE = 1.55f |
| Uniform ship model scale. | |
| constexpr float | ASTEROID_SHIP_COLLISION_SCALE = 1.08f |
| Ship collision-radius adjustment. | |
| constexpr float | ASTEROID_PROJECTILE_COLLISION_SCALE = 1.18f |
| Projectile collision-radius adjustment. | |
| constexpr glm::vec4 | PROJECTILE_COLOR {1.0f, 0.58f, 0.12f, 1.0f} |
| Default projectile color. | |
| constexpr Sint16 | CONTROLLER_DEAD_ZONE = 8000 |
| Controller axis dead-zone magnitude. | |
| constexpr float | CONTROLLER_AXIS_MAX = 32767.0f |
| Maximum signed controller axis magnitude. | |
| constexpr float | BOUNDARY_X_MIN = -150.0f |
| Minimum simulation x-coordinate. | |
| constexpr float | BOUNDARY_X_MAX = 150.0f |
| Maximum simulation x-coordinate. | |
| constexpr float | BOUNDARY_Y_MIN = -100.0f |
| Minimum simulation y-coordinate. | |
| constexpr float | BOUNDARY_Y_MAX = 100.0f |
| Maximum simulation y-coordinate. | |
| constexpr float | BOUNDARY_Z_MIN = -150.0f |
| Minimum simulation z-coordinate. | |
| constexpr float | BOUNDARY_Z_MAX = 150.0f |
| Maximum simulation z-coordinate. | |
| constexpr float | BOUNDARY_BOUNCE_FACTOR = 1.2f |
| Boundary collision response multiplier. | |
|
strong |
High-level state of the Asteroids application.
Definition at line 66 of file asteroids3d_types.hpp.
|
strong |
Definition at line 56 of file asteroids3d_types.hpp.
|
inline |
Builds a translated, rotated, scaled model matrix.
| position | World-space translation. |
| rotation_degrees | Euler rotation in degrees. |
| scale | Uniform scale. |
| center_offset | Model-space center correction. |
Definition at line 240 of file asteroids3d_types.hpp.
|
inline |
Loads a PNG and fades dark color-key pixels to transparency.
| path | PNG file path. |
| threshold | Brightness at or below which pixels become transparent. |
| softness | Brightness range over which alpha fades in. |
| mxvk::Exception | If the image cannot be loaded, converted, queried, or locked. |
Definition at line 112 of file asteroids3d_types.hpp.
|
inline |
Normalizes a direction with a stable fallback.
| value | Direction to normalize. |
Definition at line 224 of file asteroids3d_types.hpp.
|
inline |
Generates a uniformly distributed floating-point value.
| min_value | Inclusive lower bound. |
| max_value | Inclusive upper bound. |
Definition at line 88 of file asteroids3d_types.hpp.
|
inline |
Generates a uniformly distributed integer.
| min_value | Inclusive lower bound. |
| max_value | Inclusive upper bound. |
Definition at line 99 of file asteroids3d_types.hpp.
|
inline |
Returns the thread-local random number engine used by simulation helpers.
Definition at line 77 of file asteroids3d_types.hpp.
| void space::run_asteroids3d | ( | const Arguments & | args | ) |
Runs the Asteroids application.
| args | Parsed command-line arguments controlling the application. |
Definition at line 3703 of file asteroids3d_window.cpp.
|
constexpr |
Projectile collision-radius adjustment.
Definition at line 52 of file asteroids3d_types.hpp.
|
constexpr |
Ship collision-radius adjustment.
Definition at line 51 of file asteroids3d_types.hpp.
|
constexpr |
Boundary collision response multiplier.
Definition at line 62 of file asteroids3d_types.hpp.
|
constexpr |
Maximum simulation x-coordinate.
Definition at line 57 of file asteroids3d_types.hpp.
|
constexpr |
Minimum simulation x-coordinate.
Definition at line 56 of file asteroids3d_types.hpp.
|
constexpr |
Maximum simulation y-coordinate.
Definition at line 59 of file asteroids3d_types.hpp.
|
constexpr |
Minimum simulation y-coordinate.
Definition at line 58 of file asteroids3d_types.hpp.
|
constexpr |
Maximum simulation z-coordinate.
Definition at line 61 of file asteroids3d_types.hpp.
|
constexpr |
Minimum simulation z-coordinate.
Definition at line 60 of file asteroids3d_types.hpp.
|
constexpr |
Child asteroids created by a split.
Definition at line 39 of file asteroids3d_types.hpp.
|
constexpr |
Maximum signed controller axis magnitude.
Definition at line 55 of file asteroids3d_types.hpp.
|
constexpr |
Controller axis dead-zone magnitude.
Definition at line 54 of file asteroids3d_types.hpp.
|
constexpr |
Ship explosion duration in frames.
Definition at line 48 of file asteroids3d_types.hpp.
|
constexpr |
Frames between firing bursts.
Definition at line 45 of file asteroids3d_types.hpp.
|
constexpr |
Frames between shots within a burst.
Definition at line 47 of file asteroids3d_types.hpp.
|
constexpr |
Number of stars in the background field.
Definition at line 34 of file asteroids3d_types.hpp.
|
constexpr |
Score awarded for a large asteroid.
Definition at line 40 of file asteroids3d_types.hpp.
|
constexpr |
Maximum locally simulated asteroids.
Definition at line 36 of file asteroids3d_types.hpp.
|
constexpr |
Maximum asteroid split generation.
Definition at line 38 of file asteroids3d_types.hpp.
|
constexpr |
Maximum particles in the shared particle pool.
Definition at line 37 of file asteroids3d_types.hpp.
|
constexpr |
Maximum locally simulated projectiles.
Definition at line 35 of file asteroids3d_types.hpp.
|
constexpr |
Score awarded for a medium asteroid.
Definition at line 41 of file asteroids3d_types.hpp.
|
constexpr |
Maximum asteroid snapshots carried in one network state.
Definition at line 25 of file multiplayer.hpp.
|
constexpr |
Maximum number of players in a session.
Definition at line 27 of file multiplayer.hpp.
|
constexpr |
Maximum projectile snapshots carried in one network state.
Definition at line 23 of file multiplayer.hpp.
|
constexpr |
Single-precision value of pi.
Definition at line 33 of file asteroids3d_types.hpp.
|
constexpr |
Default projectile color.
Definition at line 53 of file asteroids3d_types.hpp.
|
constexpr |
Projectile lifetime in seconds.
Definition at line 44 of file asteroids3d_types.hpp.
|
constexpr |
Projectile travel speed in world units per second.
Definition at line 43 of file asteroids3d_types.hpp.
|
constexpr |
Multiplayer round limit in seconds.
Definition at line 49 of file asteroids3d_types.hpp.
|
constexpr |
Uniform ship model scale.
Definition at line 50 of file asteroids3d_types.hpp.
|
constexpr |
Projectiles fired in one burst.
Definition at line 46 of file asteroids3d_types.hpp.
|
constexpr |
Score awarded for a small asteroid.
Definition at line 42 of file asteroids3d_types.hpp.