Skip to content
This repository has been archived by the owner on Feb 1, 2024. It is now read-only.

Define game state structure. #40

Open
JodiTheTigger opened this issue Jul 15, 2013 · 3 comments
Open

Define game state structure. #40

JodiTheTigger opened this issue Jul 15, 2013 · 3 comments
Labels

Comments

@JodiTheTigger
Copy link
Owner

Define the server side game state. Keep a multiple of 4 bytes please.

Keep in mind that we prefer lots of data that doesn't change as opposed to a little data that changes every frame. For eg a missile, We can predict where it goes so we really only need it's origin and direction, and when it was fired, rather than its x,y,z every frame.

@JodiTheTigger
Copy link
Owner Author

uint32_t id;
float x,y,z;
float vx,vy,vz; // orientation, maybe a quaternion?
uint32_t flags;

@JodiTheTigger
Copy link
Owner Author

need health (a colour, 24 bits, [top] argb [bottom], alpha ignored) health = 0 = dead = static.
need jet/shoot energy
flags:
is jetting

times (all times in server ticks).
last shot (so can do bullets per minute)

@JodiTheTigger
Copy link
Owner Author

Game States:
Startup (no-one moves, everyone in starting positions, 30 seconds - configurable)
Playtime (play until two teams are all dead)
Endtimes (Freelook + move allowed, show scoreboard, 30 seconds - configurable)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant