We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
To be later defined more accurately class Ship { int id; int health; Vector3 position; Quaternion rotation; Vector3 velocity; Vector3 forceVector; }
enum GamePacketType {Connect, Disconnect, Ship, Asteroid}
struct GamePacket { GamePacketType type; Stream dataStream; }
enum EntityEventType {Spawn, State, Remove}
GamePacketType Ship { int id; EntityEventType type;
switch(type) { case EntityEventType.State: ships[id].health; ships[id].position; ships[id].rotation; ships[id].velocity; ships[id].forceVector; break; case EntityEventType.Spawn: ships[id] = new Ship(); ships[id].position; ships[id].rotation; break; case EntityEventType.Remove: destroy ships[id]; break; }
}
GamePacketType Asteroid {
The text was updated successfully, but these errors were encountered:
Network code enables synchronizing of player ships if network session were initialized and updates were called
Sorry, something went wrong.
No branches or pull requests
Structural logic
To be later defined more accurately
class Ship
{
int id;
int health;
Vector3 position;
Quaternion rotation;
Vector3 velocity;
Vector3 forceVector;
}
Network logic
enum GamePacketType {Connect, Disconnect, Ship, Asteroid}
struct GamePacket
{
GamePacketType type;
Stream dataStream;
}
enum EntityEventType {Spawn, State, Remove}
GamePacketType Ship
{
int id;
EntityEventType type;
}
GamePacketType Asteroid
{
}
The text was updated successfully, but these errors were encountered: