MXVK Vulkan Framework 0.24.0
C++20 Vulkan rendering framework for practical 2D and 3D application development with SDL3.
Loading...
Searching...
No Matches
multiplayer.hpp File Reference

UDP multiplayer state exchange for Asteroids. More...

#include "mxnetwork/socket.hpp"
#include <array>
#include <cstdint>
#include <memory>
#include <optional>
#include <string>
#include <vector>

Go to the source code of this file.

Classes

class  space::MultiplayerSession
 Owns a host or client UDP session and exchanges replicated game state. More...
struct  space::NetworkAsteroid
 Serialized gameplay state for one asteroid. More...
struct  space::NetworkExchange
 Collection of remote player updates produced by one exchange tick. More...
struct  space::NetworkPlayerUpdate
 State received for a specific player slot. More...
struct  space::NetworkProjectile
 Serialized gameplay state for one projectile. More...
struct  space::NetworkState
 Complete replicated gameplay state published by one player. More...

Namespaces

namespace  space

Variables

constexpr std::size_t space::NETWORK_ASTEROID_COUNT = 16
 Maximum asteroid snapshots carried in one network state.
constexpr std::size_t space::NETWORK_PLAYER_COUNT = 4
 Maximum number of players in a session.
constexpr std::size_t space::NETWORK_PROJECTILE_COUNT = 15
 Maximum projectile snapshots carried in one network state.

Detailed Description

UDP multiplayer state exchange for Asteroids.

Definition in file multiplayer.hpp.