Jazz2::Multiplayer::GameModes namespace

Rules and HUD of the particular multiplayer game modes, compiled only if WITH_MULTIPLAYER.

Classes

class BattleMode
Battle game mode (free-for-all).
struct CapturePointInfo
Control point or capture point of the level, see IGameModeContext::FindCapturePoints().
class CaptureTheFlagMode
Capture The Flag game mode.
class CooperationMode
Cooperation game mode.
class CustomGameModeBase
Common base of the game modes that score points of their own.
class DeathCaptureTheFlagMode
Death Capture The Flag game mode (team-based).
class DominationMode
Domination game mode (team-based).
class ExtendedLastRabbitStandingMode
Extended Last Rabbit Standing game mode (free-for-all).
class FlagRunMode
Flag Run game mode (team-based).
struct GameEndResult
Result of IGameMode::CheckGameEnds.
class GameModeBase
Base of all game modes.
struct GameModeObject
Object in the level owned by a game mode.
class HeadHuntersMode
Head Hunters game mode (team-based).
class IGameMode
Rules of a single multiplayer game mode.
class IGameModeContext
Services a game mode needs from its host level handler.
class IGameModeHUD
Drawing surface a game mode uses to render its own part of the HUD.
class JailbreakMode
Jailbreak game mode (team-based).
class LastRabbitStandingMode
Last Rabbit Standing game mode (free-for-all).
class PestilenceMode
Pestilence game mode (free-for-all).
class RaceMode
Race game mode.
struct RespawnDecision
Result of IGameMode::DecideRespawn.
class RoastTagMode
Roast Tag game mode (free-for-all).
class TeamBattleMode
Team Battle game mode.
class TeamLastRabbitStandingMode
Team Last Rabbit Standing game mode (team-based).
class TeamRaceMode
Team Race game mode.
class TeamTreasureHuntMode
Team Treasure Hunt game mode.
class TreasureHuntMode
Treasure Hunt game mode.

Enums

enum class LevelExitAction { Ignore, ChangeToNextLevel, EndGameForInitiator, WarpToStartIncrementLap }
What should happen when a player reaches the level exit, as decided by the game mode.
enum class PlayerModeFlags : std::uint8_t { None = 0, It = 0x01, Zombie = 0x02, Jailed = 0x04, Eliminated = 0x08, CarriesFlag = 0x10, BottomFeeder = 0x20 }
Role of a player in a game mode, a bitwise combination is stored in MpPlayerState::ModeFlags.
enum class GameModeObjectType : std::uint8_t { ControlPoint, Jail, Flag, Base }
Type of GameModeObject.
enum class GameModeFontType { Small, Medium }
Selects which HUD font a game mode draws text with.
enum class GameModeHudIcon { Food, GemRed, GemGreen }
A semantic HUD icon a game mode can draw; the HUD maps it to a concrete sprite.

Functions

auto CreateGameMode(MpGameMode mode) -> std::unique_ptr<IGameMode>
Creates the IGameMode implementation for the specified game mode.

Enum documentation

enum class Jazz2::Multiplayer::GameModes::LevelExitAction

What should happen when a player reaches the level exit, as decided by the game mode.

Enumerators
Ignore

Ignore the exit (competitive modes without a level-exit win condition)

ChangeToNextLevel

Proceed to the next level (Cooperation)

EndGameForInitiator

End the round with the initiator as the winner (Treasure Hunt with enough treasure)

WarpToStartIncrementLap

Warp the initiator back to the start and count a lap (Race)

enum class Jazz2::Multiplayer::GameModes::PlayerModeFlags : std::uint8_t

Role of a player in a game mode, a bitwise combination is stored in MpPlayerState::ModeFlags.

Enumerators
None

None

It

The player who is "it" in Roast Tag

Zombie

Infected player in Pestilence

Jailed

Player locked in the jail in Jailbreak

Eliminated

Player out of the round for good

CarriesFlag

Player carrying the flag in Flag Run

BottomFeeder

Player with the fewest points in Roast Tag, anyone can roast them

enum class Jazz2::Multiplayer::GameModes::GameModeObjectType : std::uint8_t

Type of GameModeObject.

Enumerators
ControlPoint

Point to hold in Domination

Jail

Jail of a team in Jailbreak

Flag

Neutral flag in Flag Run

Base

Base of a team where something is delivered (Flag Run, Head Hunters)

enum class Jazz2::Multiplayer::GameModes::GameModeFontType

Selects which HUD font a game mode draws text with.

Enumerators
Small

Small font

Medium

Medium font

enum class Jazz2::Multiplayer::GameModes::GameModeHudIcon

A semantic HUD icon a game mode can draw; the HUD maps it to a concrete sprite.

Enumerators
Food

Food / score pickup icon

GemRed

Red gem (treasure not yet sufficient)

GemGreen

Green gem (enough treasure collected)

Function documentation

std::unique_ptr<IGameMode> Jazz2::Multiplayer::GameModes::CreateGameMode(MpGameMode mode)

Creates the IGameMode implementation for the specified game mode.

Returns the rules object a level handler should host for mode. Every game mode has an implementation; modes still in the staged migration own only their HUD and report IGameMode::OwnsRoundLogic as false. Returns nullptr only for MpGameMode::Unknown.