r-type  0.0.0
R-Type main
Loading...
Searching...
No Matches
gme::RTypeClientMulti Class Referencefinal

Main multiplayer game client plugin for R-Type. More...

#include <RTypeClientMulti.hpp>

+ Inheritance diagram for gme::RTypeClientMulti:
+ Collaboration diagram for gme::RTypeClientMulti:

Public Member Functions

 RTypeClientMulti ()=default
 Default constructor.
 
 ~RTypeClientMulti () override=default
 Destructor.
 
 RTypeClientMulti (const RTypeClientMulti &)=delete
 Deleted copy constructor (non-copyable)
 
RTypeClientMultioperator= (const RTypeClientMulti &)=delete
 Deleted copy assignment operator (non-copyable)
 
 RTypeClientMulti (RTypeClientMulti &&)=delete
 Deleted move constructor (non-movable)
 
RTypeClientMultioperator= (RTypeClientMulti &&)=delete
 Deleted move assignment operator (non-movable)
 
const std::string getName () const override
 Get plugin name.
 
utl::PluginType getType () const override
 Get plugin type.
 
void init (eng::Engine &engine, utl::cli::AppConfig &appConfig, bool &showDebug, const eng::id menuSceneId, const eng::id winSceneId) override
 Initialize the multiplayer client plugin.
 
void update (float deltaTime, unsigned int width, unsigned int height) override
 Update the multiplayer client plugin (called each frame)
 
unsigned int getMainSceneId () const override
 Get the main scene ID.
 
- Public Member Functions inherited from utl::IPlugin
virtual ~IPlugin ()=default
 

Private Member Functions

void setupScenes (bool &showDebug, eng::id menuSceneId)
 Setup all multiplayer game scenes.
 

Private Attributes

eng::Enginem_engine = nullptr
 Pointer to the game engine.
 
utl::cli::AppConfigm_appConfig = nullptr
 Pointer to application configuration.
 
bool m_showDebug = false
 Debug mode flag.
 
eng::id m_mainSceneId = 1
 ID of the main multiplayer scene.
 

Detailed Description

Main multiplayer game client plugin for R-Type.

This class serves as the entry point for the R-Type multiplayer client plugin. It manages:

  • Game scene initialization and transitions
  • Network client integration
  • Lobby system UI and logic
  • Multiplayer game state
  • Player synchronization

The plugin integrates with the engine's plugin system and provides a complete multiplayer game experience including server browser, lobby system, and networked gameplay.

Definition at line 36 of file RTypeClientMulti.hpp.

Constructor & Destructor Documentation

◆ RTypeClientMulti() [1/3]

gme::RTypeClientMulti::RTypeClientMulti ( )
default

Default constructor.

◆ ~RTypeClientMulti()

gme::RTypeClientMulti::~RTypeClientMulti ( )
overridedefault

Destructor.

◆ RTypeClientMulti() [2/3]

gme::RTypeClientMulti::RTypeClientMulti ( const RTypeClientMulti & )
delete

Deleted copy constructor (non-copyable)

◆ RTypeClientMulti() [3/3]

gme::RTypeClientMulti::RTypeClientMulti ( RTypeClientMulti && )
delete

Deleted move constructor (non-movable)

Member Function Documentation

◆ getMainSceneId()

unsigned int gme::RTypeClientMulti::getMainSceneId ( ) const
inlinenodiscardoverridevirtual

Get the main scene ID.

Returns
ID of the main multiplayer scene

Implements gme::IGameClient.

Definition at line 117 of file RTypeClientMulti.hpp.

References m_mainSceneId.

◆ getName()

const std::string gme::RTypeClientMulti::getName ( ) const
inlinenodiscardoverridevirtual

Get plugin name.

Returns
Plugin name identifier

Implements utl::IPlugin.

Definition at line 74 of file RTypeClientMulti.hpp.

◆ getType()

utl::PluginType gme::RTypeClientMulti::getType ( ) const
inlinenodiscardoverridevirtual

Get plugin type.

Returns
Plugin type (GAME_CLIENT)

Implements utl::IPlugin.

Definition at line 80 of file RTypeClientMulti.hpp.

References utl::GAME_CLIENT.

◆ init()

void gme::RTypeClientMulti::init ( eng::Engine & engine,
utl::cli::AppConfig & appConfig,
bool & showDebug,
const eng::id menuSceneId,
const eng::id winSceneId )
inlineoverridevirtual

Initialize the multiplayer client plugin.

Parameters
engineReference to the game engine
appConfigApplication configuration
showDebugDebug mode flag
menuSceneIdID of the main menu scene to return to

Sets up all multiplayer-specific scenes including:

  • Server connection scene
  • Lobby browser
  • Lobby creation
  • Waiting room
  • Multiplayer game scene
  • Game over scene

Implements gme::IGameClient.

Definition at line 96 of file RTypeClientMulti.hpp.

References m_appConfig, m_engine, m_showDebug, and setupScenes().

+ Here is the call graph for this function:

◆ operator=() [1/2]

RTypeClientMulti & gme::RTypeClientMulti::operator= ( const RTypeClientMulti & )
delete

Deleted copy assignment operator (non-copyable)

◆ operator=() [2/2]

RTypeClientMulti & gme::RTypeClientMulti::operator= ( RTypeClientMulti && )
delete

Deleted move assignment operator (non-movable)

◆ setupScenes()

void gme::RTypeClientMulti::setupScenes ( bool & showDebug,
eng::id menuSceneId )
private

Setup all multiplayer game scenes.

Parameters
showDebugDebug mode flag
menuSceneIdID of the main menu scene

Creates and registers all scenes required for multiplayer gameplay:

  • Server connection and configuration
  • Lobby system (browse, create, join)
  • Waiting room
  • Game scene
  • Game over screen

Definition at line 15 of file rtypeClientMulti.cpp.

References utl::INFO, utl::Logger::log(), gme::WaitingRoomScene::setIsHost(), gme::WaitingRoomScene::setLobbyId(), and gme::WaitingRoomScene::setLobbyInfo().

Referenced by init().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ update()

void gme::RTypeClientMulti::update ( float deltaTime,
unsigned int width,
unsigned int height )
overridevirtual

Update the multiplayer client plugin (called each frame)

Parameters
deltaTimeTime elapsed since last frame (in seconds)
widthCurrent window width
heightCurrent window height

Performs frame-by-frame updates for multiplayer functionality

Implements gme::IGameClient.

Definition at line 13 of file rtypeClientMulti.cpp.

Member Data Documentation

◆ m_appConfig

utl::cli::AppConfig* gme::RTypeClientMulti::m_appConfig = nullptr
private

Pointer to application configuration.

Definition at line 134 of file RTypeClientMulti.hpp.

Referenced by init().

◆ m_engine

eng::Engine* gme::RTypeClientMulti::m_engine = nullptr
private

Pointer to the game engine.

Definition at line 133 of file RTypeClientMulti.hpp.

Referenced by init().

◆ m_mainSceneId

eng::id gme::RTypeClientMulti::m_mainSceneId = 1
private

ID of the main multiplayer scene.

Definition at line 136 of file RTypeClientMulti.hpp.

Referenced by getMainSceneId().

◆ m_showDebug

bool gme::RTypeClientMulti::m_showDebug = false
private

Debug mode flag.

Definition at line 135 of file RTypeClientMulti.hpp.

Referenced by init().


The documentation for this class was generated from the following files: