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).
class CaptureTheFlagMode
Capture The Flag game mode.
class CooperationMode
Cooperation game mode.
struct GameEndResult
Result of IGameMode::CheckGameEnds.
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 RaceMode
Race game mode.
struct RespawnDecision
Result of IGameMode::DecideRespawn.
class TeamBattleMode
Team Battle game mode.
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 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::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.