Multiplayer namespace
Multiplayer-related classes, compiled only if WITH_MULTIPLAYER.
Classes
- struct ConnectionResult
- Describes a connection result of INetworkHandler::
OnPeerConnected(). - class INetworkHandler
- Interface to handle incomming network requests.
- class MpLevelHandler
- Level handler of an online multiplayer game session.
- class NetworkManager
- Manages game-specific network connections.
- struct AllPeersT
- All connected peers tag type.
- struct LocalPeerT
- Local peer tag type.
- class NetworkManagerBase
- Allows to create generic network clients and servers.
- struct Peer
- Remote peer as opaque handle.
- struct PeerDescriptor
- Peer descriptor.
- struct ServerDescription
- Server description.
- class IServerObserver
- Interface to observe publicly-listed running servers.
- class IServerStatusProvider
- Interface to provide current status of the server.
- class ServerDiscovery
- Allows to monitor publicly-listed running servers for server listing.
- struct PlaylistEntry
- Playlist entry in ServerConfiguration.
- struct ServerConfiguration
- Server configuration.
- struct ServerInitialization
- Server initialization parameters.
Enums
- enum class MpGameMode { Unknown = 0, Battle, TeamBattle, Race, TeamRace, TreasureHunt, TeamTreasureHunt, CaptureTheFlag, Cooperation }
- Multiplayer game mode.
-
enum class NetworkChannel : std::
uint8_t { Main, UnreliableUpdates, Count } - Network packet channel.
- enum class NetworkState { None, Listening, Connecting, Connected }
- State of network connection.
- enum class BroadcastPacketType { Null, DiscoveryRequest, DiscoveryResponse }
- Packet type broadcasted on the local network.
- enum class ClientPacketType { Null, Ping, Reserved, Rpc, Auth = 10, LevelReady, ChatMessage, ValidateAssetsResponse, ForceResyncActors = 20, PlayerReady = 30, PlayerUpdate, PlayerKeyPress, PlayerChangeWeaponRequest, PlayerSpectate, PlayerAckWarped }
- Packet type going from client to server.
- enum class ServerPacketType { Null, Pong, Reserved, Rpc, AuthResponse = 70, PeerSetProperty, ValidateAssets, StreamAsset, LoadLevel = 80, LevelSetProperty, LevelResetProperties, ShowInGameLobby, FadeOut, PlaySfx, PlayCommonSfx, ShowAlert, ChatMessage, SyncTileMap, SetTrigger, AdvanceTileAnimation, RevertTileAnimation, CreateDebris, CreateControllablePlayer = 110, CreateRemoteActor, CreateMirroredActor, DestroyRemoteActor, UpdateAllActors, ChangeRemoteActorMetadata, MarkRemoteActorAsPlayer, UpdatePositionsInRound, PlayerSetProperty = 130, PlayerResetProperties, PlayerRespawn, PlayerMoveInstantly, PlayerAckWarped, PlayerActivateForce, PlayerEmitWeaponFlare, PlayerChangeWeapon, PlayerTakeDamage, PlayerActivateSpring, PlayerWarpIn }
- Packet type going from server to client.
- enum class PeerPropertyType { Unknown, Connected, Disconnected, Roasted, Count }
- Peer property type from ServerPacketType::PeerSetProperty.
- enum class LevelPropertyType { Unknown, State = 1, GameMode, LevelText = 10, Music, Count }
- Level property type from ServerPacketType::LevelSetProperty.
- enum class PlayerPropertyType { Unknown, PlayerType = 1, Lives, Health, Controllable, Invulnerable, Modifier, Dizzy, Freeze, Shield, LimitCameraView, OverrideCameraView, ShakeCameraView, WeaponAmmo = 30, WeaponUpgrades, Coins = 60, Gems, Score, Points = 90, PositionInRound, Deaths, Kills, Laps, TreasureCollected, Count }
- Player property type from ServerPacketType::PlayerSetProperty.
- enum class PeerLevelState { Unknown, ValidatingAssets, StreamingMissingAssets, LevelLoaded, LevelSynchronized, Spectating, PlayerReady, PlayerSpawned }
- Peer state in a level.
-
enum class Reason : std::
uint32_t { Unknown, Disconnected, InvalidParameter, IncompatibleVersion, AuthFailed, InvalidPassword, InvalidPlayerName, NotInWhitelist, Requires3rdPartyAuthProvider, ServerIsFull, ServerNotReady, ServerStopped, ServerStoppedForMaintenance, ServerStoppedForReconfiguration, ServerStoppedForUpdate, ConnectionLost, ConnectionTimedOut, Kicked, Banned, CheatingDetected, AssetStreamingNotAllowed, Idle } - Client disconnect reason.
Variables
- AllPeersT AllPeers constexpr
- All connected peers tag.
- LocalPeerT LocalPeer constexpr
- Local peer tag.
Enum documentation
enum class Jazz2:: Multiplayer:: MpGameMode
#include <Jazz2/Multiplayer/MpGameMode.h>
Multiplayer game mode.
| Enumerators | |
|---|---|
| Unknown |
Unspecified |
| Battle |
Battle |
| TeamBattle |
Team Battle |
| Race |
Race |
| TeamRace |
Team Race |
| TreasureHunt |
Treasure Hunt |
| TeamTreasureHunt |
Team Treasure Hunt |
| CaptureTheFlag |
Capture The Flag |
| Cooperation |
Cooperation |
enum class Jazz2:: Multiplayer:: NetworkChannel : std:: uint8_t
Network packet channel.
| Enumerators | |
|---|---|
| Main |
Main |
| UnreliableUpdates |
Unreliable updates |
| Count |
Count of supported channels |
enum class Jazz2:: Multiplayer:: NetworkState
State of network connection.
| Enumerators | |
|---|---|
| None |
Disconnected |
| Listening |
Listening as server |
| Connecting |
Connecting to server as client |
| Connected |
Connected to server as client |
enum class Jazz2:: Multiplayer:: BroadcastPacketType
#include <Jazz2/Multiplayer/PacketTypes.h>
Packet type broadcasted on the local network.
enum class Jazz2:: Multiplayer:: ClientPacketType
#include <Jazz2/Multiplayer/PacketTypes.h>
Packet type going from client to server.
enum class Jazz2:: Multiplayer:: ServerPacketType
#include <Jazz2/Multiplayer/PacketTypes.h>
Packet type going from server to client.
enum class Jazz2:: Multiplayer:: PeerPropertyType
#include <Jazz2/Multiplayer/PacketTypes.h>
Peer property type from ServerPacketType::PeerSetProperty.
enum class Jazz2:: Multiplayer:: LevelPropertyType
#include <Jazz2/Multiplayer/PacketTypes.h>
Level property type from ServerPacketType::LevelSetProperty.
enum class Jazz2:: Multiplayer:: PlayerPropertyType
#include <Jazz2/Multiplayer/PacketTypes.h>
Player property type from ServerPacketType::PlayerSetProperty.
enum class Jazz2:: Multiplayer:: PeerLevelState
#include <Jazz2/Multiplayer/PeerDescriptor.h>
Peer state in a level.
| Enumerators | |
|---|---|
| Unknown |
Unknown |
| ValidatingAssets |
Peer received list of required assets, the server is waiting for response |
| StreamingMissingAssets |
Missing assets are being streamed to peer |
| LevelLoaded |
Peer finished loading of the level |
| LevelSynchronized |
Peer finished synchronized entities in the level |
| Spectating |
Peer is spectating |
| PlayerReady |
Player is ready to spawn |
| PlayerSpawned |
Player is spawned |
enum class Jazz2:: Multiplayer:: Reason : std:: uint32_t
#include <Jazz2/Multiplayer/Reason.h>
Client disconnect reason.
| Enumerators | |
|---|---|
| Unknown |
Unspecified |
| Disconnected |
Client disconnected by user |
| InvalidParameter |
Invalid parameter specified |
| IncompatibleVersion |
Incompatible client version |
| AuthFailed |
Authentication failed |
| InvalidPassword |
Invalid password specified |
| InvalidPlayerName |
Invalid player name specified |
| NotInWhitelist |
Client is not in server whitelist |
| Requires3rdPartyAuthProvider |
Server requires 3rd party authentication provider (e.g., Discord) |
| ServerIsFull |
Server is full or busy |
| ServerNotReady |
Server is not ready yet |
| ServerStopped |
Server is stopped for unknown reason |
| ServerStoppedForMaintenance |
Server is stopped for maintenance |
| ServerStoppedForReconfiguration |
Server is stopped for reconfiguration |
| ServerStoppedForUpdate |
Server is stopped for update |
| ConnectionLost |
Connection lost |
| ConnectionTimedOut |
Connection timed out |
| Kicked |
Kicked by server |
| Banned |
Banned by server |
| CheatingDetected |
Cheating detected |
| AssetStreamingNotAllowed |
Downloading of assets is not allowed, but some assets are missing |
| Idle |
Inactivity |
Variable documentation
AllPeersT Jazz2:: Multiplayer:: AllPeers constexpr
All connected peers tag.
Use in NetworkManagerBase::
LocalPeerT Jazz2:: Multiplayer:: LocalPeer constexpr
Local peer tag.