Upstream for PGE updates.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
olcPixelGameEngine/Videos/Networking/Parts3&4/MMO_Common.h

39 lines
644 B

#pragma once
#include <cstdint>
#define OLC_PGE_APPLICATION
#include "olcPixelGameEngine.h"
#define OLC_PGEX_NETWORK
#include "olcPGEX_Network.h"
enum class GameMsg : uint32_t
{
Server_GetStatus,
Server_GetPing,
Client_Accepted,
Client_AssignID,
Client_RegisterWithServer,
Client_UnregisterWithServer,
Game_AddPlayer,
Game_RemovePlayer,
Game_UpdatePlayer,
};
struct sPlayerDescription
{
uint32_t nUniqueID = 0;
uint32_t nAvatarID = 0;
uint32_t nHealth = 100;
uint32_t nAmmo = 20;
uint32_t nKills = 0;
uint32_t nDeaths = 0;
float fRadius = 0.5f;
olc::vf2d vPos;
olc::vf2d vVel;
};