|
Air-Trap 1.0.0
A multiplayer R-Type clone game engine built with C++23 and ECS architecture
|
File : IEventPublisher.hpp License: MIT Author : Elias Josué HAJJAR LLAUQUEN elias.nosp@m.-jos.nosp@m.ue.ha.nosp@m.jjar.nosp@m.-llau.nosp@m.quen.nosp@m.@epit.nosp@m.ech..nosp@m.eu Date : 11/12/2025. More...
Classes | |
| struct | AmmoUpdatePayload |
| Ammo update notification data Server OpCode. More... | |
| struct | BeamStatePayload |
| Notify clients that an entity's beam started or stopped. More... | |
| struct | BooleanPayload |
| Generic boolean response payload. More... | |
| struct | ConnectPayload |
| Player connection data sended Client OpCode. More... | |
| struct | CreateRoomPayload |
| Data for creating a new room Client OpCode. More... | |
| struct | DebugModePayload |
| Debug mode toggle data Server OpCode. More... | |
| struct | EntityDeathPayload |
| Entity death notification data. More... | |
| struct | EntitySnapshotPayload |
| Entity state snapshot data. More... | |
| struct | EntitySpawnPayload |
| Entity spawn notification data. More... | |
| struct | GameOverPayload |
| Game over summary data. More... | |
| struct | Header |
| Packet header with sequencing and acknowledgment support. More... | |
| struct | HealthUpdatePayload |
| Player health update data. More... | |
| class | IEventPublisher |
| Interface for network event handling. More... | |
| class | INetwork |
| Interface for network operations. More... | |
| struct | InputPayload |
| Client input state data. More... | |
| struct | JoinRoomPayload |
| Data for joining an existing room Client OpCode. More... | |
| struct | LoginPayload |
| struct | LoginResponsePayload |
| Login response data sent by server for LoginResponse Server OpCode. More... | |
| struct | NetworkEvent |
| Represents a network event containing session ID and packet data. More... | |
| class | Packet |
| Network packet with header and serializable body. More... | |
| struct | PingPayload |
| Ping request/response payload Client/Server /Pong OpCodes. More... | |
| struct | RegisterPayload |
| Player registration data sended by client Client OpCode. More... | |
| struct | RegisterResponsePayload |
| Registration response data sent by server for RegisterResponse Server OpCode. More... | |
| struct | RoomChatPayload |
| Data for sending chat messages in a room Client OpCode. More... | |
| struct | RoomChatReceivedPayload |
| Data for receiving chat messages in a room Server OpCode. More... | |
| struct | RoomInfo |
| Information about a game room Server OpCode. More... | |
| struct | RoomSnapshotPayload |
| struct | ScoreUpdatePayload |
| Player score update notification data. More... | |
| class | Session |
| struct | SetReadyPayload |
| Data for setting player readiness status Client OpCode. More... | |
Typedefs | |
| using | BufferSequence = std::array< asio::const_buffer, 2 > |
| @using BufferSequence | |
Enumerations | |
| enum class | NetworkMode { TCP , UDP } |
| Enum representing network transmission modes. More... | |
| enum class | OpCode : uint8_t { None = 0x00 , Hello = 0x01 , Welcome = 0x02 , Disconnect = 0x03 , LoginRequest = 0x1A , RegisterRequest = 0x1B , LoginResponse = 0x9A , RegisterResponse = 0x9B , ListRooms = 0x04 , RoomList = 0x05 , CreateRoom = 0x06 , JoinRoom = 0x07 , LeaveRoom = 0x08 , RoomUpdate = 0x09 , SetReady = 0x0A , RoomChatSended = 0x0B , RoomChatReceived = 0x0C , StartGame = 0x0D , InputTick = 0x10 , UpdateSelectedWeapon = 0x11 , EntitySpawn = 0x21 , EntityDeath = 0x22 , AmmoUpdate = 0x23 , Ping = 0x24 , Pong = 0x25 , DebugModeUpdate = 0x26 , Kicked = 0x27 , BeamState = 0x28 , ScoreUpdate = 0x29 , GameOver = 0x2A , HealthUpdate = 0x2B } |
| Operation codes for different packet types. More... | |
| enum class | EntityType : uint8_t { Player = 1 , Scout = 2 , Tank = 3 , Boss = 4 , Bullet = 5 , PowerupHeal = 6 , PowerupSpeed = 7 , Obstacle = 8 , EnemyBullet = 9 , ObstacleSolid = 10 , ChargedBullet = 11 , PowerupDoubleFire = 12 , PowerupShield = 13 , BossShield = 14 , Boss2 = 15 , Boss2Bullet = 16 } |
| Types of entities in the game. More... | |
| enum class | roomType : uint8_t { Lobby = 0 , Public = 1 , Private = 2 } |
Variables | |
| constexpr std::endian | NATIVE_ENDIAN = std::endian::native |
| Native endianness of the machine. | |
| constexpr uint16_t | MAGIC_NUMBER = 0xA1B2 |
| Magic number for packet validation. | |
| constexpr size_t | MTU_SIZE = 1400 |
| Safe UDP payload size to avoid fragmentation. | |
| constexpr uint32_t | MAX_STRING_SIZE = 2048 |
| Maximum sizes for strings, vectors, and packet bodies. | |
| constexpr uint32_t | MAX_VECTOR_SIZE = 8192 |
| Maximum size for serialized vectors. | |
| constexpr uint32_t | MAX_BODY_SIZE = 64 * 1024 |
| Maximum size for packet body. | |
File : IEventPublisher.hpp License: MIT Author : Elias Josué HAJJAR LLAUQUEN elias.nosp@m.-jos.nosp@m.ue.ha.nosp@m.jjar.nosp@m.-llau.nosp@m.quen.nosp@m.@epit.nosp@m.ech..nosp@m.eu Date : 11/12/2025.
File : NetworkId.hpp License: MIT Author : Elias Josué HAJJAR LLAUQUEN elias.nosp@m.-jos.nosp@m.ue.ha.nosp@m.jjar.nosp@m.-llau.nosp@m.quen.nosp@m.@epit.nosp@m.ech..nosp@m.eu Date : 11/12/2025.
Network layer for R-Type protocol.
File : INetwork.hpp License: MIT Author : Elias Josué HAJJAR LLAUQUEN elias.nosp@m.-jos.nosp@m.ue.ha.nosp@m.jjar.nosp@m.-llau.nosp@m.quen.nosp@m.@epit.nosp@m.ech..nosp@m.eu Date : 11/12/2025.
Network layer for R-Type protocol
| using rtp::net::BufferSequence = typedef std::array<asio::const_buffer, 2> |
@using BufferSequence
Buffer sequence for efficient multi-part network transmission
Represents a sequence of constant buffers (header and body) that can be sent atomically to avoid multiple system calls. Allows ASIO to gather and send packet header and body in a single operation.
Definition at line 454 of file Packet.hpp.
|
strong |
Types of entities in the game.
| Enumerator | |
|---|---|
| Player | |
| Scout | |
| Tank | |
| Boss | |
| Bullet | |
| PowerupHeal | |
| PowerupSpeed | |
| Obstacle | |
| EnemyBullet | |
| ObstacleSolid | |
| ChargedBullet | |
| PowerupDoubleFire | |
| PowerupShield | |
| BossShield | |
| Boss2 | |
| Boss2Bullet | |
Definition at line 144 of file Packet.hpp.
|
strong |
Enum representing network transmission modes.
| Enumerator | |
|---|---|
| TCP | |
| UDP | |
Definition at line 25 of file INetwork.hpp.
|
strong |
Operation codes for different packet types.
Definition at line 78 of file Packet.hpp.
|
strong |
| Enumerator | |
|---|---|
| Lobby | Lobby room (system) |
| Public | Public room. |
| Private | Private room. |
Definition at line 233 of file Packet.hpp.
|
constexpr |
Magic number for packet validation.
Definition at line 52 of file Packet.hpp.
Referenced by rtp::net::Packet::Packet(), rtp::net::Session::reader(), rtp::client::ClientNetwork::readTcpHeader(), rtp::client::ClientNetwork::readUdp(), and rtp::server::ServerNetwork::receiveUdpPacket().
|
constexpr |
Maximum size for packet body.
Definition at line 72 of file Packet.hpp.
|
constexpr |
Maximum sizes for strings, vectors, and packet bodies.
Definition at line 62 of file Packet.hpp.
|
constexpr |
Maximum size for serialized vectors.
Definition at line 67 of file Packet.hpp.
|
constexpr |
Safe UDP payload size to avoid fragmentation.
Definition at line 57 of file Packet.hpp.
|
constexpr |
Native endianness of the machine.
Definition at line 47 of file Packet.hpp.
Referenced by rtp::net::Packet::to_network().