core.multiplayer package
Submodules
core.multiplayer.protocol module
Multiplayer protocol definitions. Defines message types and serialization for network communication.
- class core.multiplayer.protocol.MessageType[source]
Bases:
object- CUSTOM = 'custom'
- DESPAWN_ENTITY = 'despawn_entity'
- DISCONNECT = 'disconnect'
- GAME_START = 'game_start'
- JOIN_ACCEPTED = 'join_accepted'
- JOIN_REJECTED = 'join_rejected'
- JOIN_REQUEST = 'join_request'
- LOBBY_STATE = 'lobby_state'
- OWNERSHIP_TRANSFER = 'ownership_transfer'
- PING = 'ping'
- PLAYER_JOINED = 'player_joined'
- PLAYER_LEFT = 'player_left'
- PLAYER_READY = 'player_ready'
- PONG = 'pong'
- RPC_CALL = 'rpc_call'
- SPAWN_ENTITY = 'spawn_entity'
- STATE_SYNC = 'state_sync'
- STATE_UPDATE = 'state_update'
core.multiplayer.room module
Room and Player management for multiplayer sessions.
- class core.multiplayer.room.Player(player_id: str = '', name: str = 'Player', client_id: int = 0, is_host: bool = False, is_local: bool = False)[source]
Bases:
objectRepresents a connected player in a multiplayer session.
- client_id
- custom_data: dict
- id
- is_host
- is_local
- is_ready
- latency_ms
- name