and just about month later, i finally fixed it WOO
here is detailed info on how to read it, i'm including some code examples:
playerid,score_log2,damage,x_delta,y_delta
playerid
-player id, used to link "paths" together
-if its above max players value(which is 54 atm, due to bots) then player is in stunt and substract 54 from the value to get actual id
#define MAX_PLAYERS 54
bool in_stunt = bool(MAX_PLAYERS/playerid);
playerid %= MAX_PLAYERS;
-there is no time value, as only relativity matters and you can increase global time when particular id is called second time
#define MAX_PLAYERS 54
unsigned long global_time = 0; //not sure if long needed, but better safe than sorry
unsigned long time_id[MAX_PLAYERS];
for(int i=0; i<MAX_PLAYERS; i++)
time_id[i] = 0;
int getTime(int id)
{
int delta = global_time - time_id[id];
if(!delta) {
global_time++;
} else if(delta>1){
new_race_started_for_player(id); //maybe not needed
}
time_id[id] = global_time;
return global_time;
}
-there is no player join/quit output, but you can assume when that happened using changes in score_log2 or presence of big difference in time
-in race mode logging happens only while race is running, in stunt - all the time
player_log2
-simple value that shows log2 from players' score, can be useful for analyzing driving differences between various levels of noobness
-can be used to detect different player join or login
one more usage you have to figure on your own
damage
-players' vehicle damage, in range 0-1000, -1 means player is on foot
x_delta
-players' x delta since last second called
-if there's line drawing between the points, check for distance between them and discard for too big one
-remains its state between players joining and quiting, deltas are reset when line 'delta_reset' is written, basically just on server restart.
y_delta
-same as above, but for y
it has been running since yesterday, but there were few more things to change so proper logging will start today.
most likely there will be some changes to come, but i will try to make them backwards compatible.
it might seem strange to have such static info feed, but this makes buffering before write much easier and less ram eating.