General > Media

Crazybob's Points Map

<< < (18/19) > >>

[MAF]mooman:

--- Quote from: [MAF]Epoxi on November 10, 2012, 09:47:07 pm ---


--- Quote from: [MAF]mooman on November 10, 2012, 09:25:32 pm ---wang's!

--- End quote ---



Your prize is an assignment to get me some data from the server.  :L

If you want blue trails I need playerid,X,Y, otherwise points just need X,Y.
Values separated by tab spaces/commas doesn't matter I can deal with it. But I need each data point on a new line: makes debugging easier.

Pretty Please.  ^-^
I really wanna see this in action for real.

--- End quote ---
heh well i'm busy with something else atm (highscores system) but i'll do this after if karlis hasn't already fixed the strange bug by then

[MAF]Epoxi:
Thank you.  ;)

[MAF]Karlis:
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:

--- Code: ---playerid,score_log2,damage,x_delta,y_delta
--- End code ---
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

--- Code: ---#define MAX_PLAYERS 54
bool in_stunt = bool(MAX_PLAYERS/playerid);
playerid %= MAX_PLAYERS;
--- End code ---
-there is no time value, as only relativity matters and you can increase global time when particular id is called second time

--- Code: ---#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;
}

--- End code ---
  -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.

[MAF]Epoxi:
Wow thanks! That's so cool.  O0

I understand the deltas and all, but how do I find where a player starts from to make it meaningful?

[MAF]Karlis:
new_race_started_for_player(id) means that player has new run/race started in the example, and the deltas just remain deltas unless the line 'delta_reset' is written, so you can always get absolute x and y by starting from beginning and adding deltas.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version