Author Topic: Crazybob's Points Map  (Read 27014 times)

0 Members and 1 Guest are viewing this topic.

Offline [MAF]Epoxi

Crazybob's Points Map
« on: October 29, 2012, 06:04:16 pm »
I was on the forum for CrazyBob's Cops 'n' Robbers and saw this awesome map.



High res version: http://www.crazybobs.net/mrx/misc/pointmaps/june25_2011/168h_Combined_3k.gif

And an animated flash version.

http://www.crazybobs.net/mrx/misc/fptv/FlashTrackViewer.html

They are made by tracking players' positions every second and making a plot (I think this one was done over several hours). Blue points are police, white are civilian, orange and yellow points are wanted.

Also, I was thinking if we could extract player coordinates in real time from the server maybe I could record them and make a map of our own in C++.  Then we could see all the popular race routes, and general fun info.  O0
« Last Edit: October 29, 2012, 06:56:45 pm by [MAF]Epoxi »

Offline [MAF]Karlis

Re: Crazybob's Points Map
« Reply #1 on: October 29, 2012, 06:25:12 pm »
looks cool, but technical implementation seems quite hard considering the amount of data.
might be worth a shot though.

Offline [MAF]Rac3r

  • Leader
  • Posts: 2,807
  • Well, this is embarrassing.
    • View Profile
Re: Crazybob's Points Map
« Reply #2 on: October 29, 2012, 06:35:20 pm »
Now that's cool!

Would be good to track our journeys with something like this.

Is that coded exclusively for Crazy Bobs?

looks cool, but technical implementation seems quite hard considering the amount of data.
might be worth a shot though.
True, I'd like to see something done aswell.

I think the main reason we've never had anything like this is because it would just of been the race route, but we do a lot of stunt/tt/dm/buildmode though, it would be useful.

Offline [MAF]Epoxi

Re: Crazybob's Points Map
« Reply #3 on: October 29, 2012, 06:44:24 pm »
For the large amount of data we could make one file per day containing all the data points (just comma separated plain text with "time,X,Y,Z" or something, coordinates could be rounded to the nearest integer to save space).

This data could then be downloaded and the source deleted to save space on the server.

I could then make a C++ app that divides the map into cells and counts the number of data points in each cell. The count for each cell could be then developed into a histogram style map that has different colours depending on the count. i.e. red for 'hot spots' and green for cold like this map:



Also here is a high res version of the CnR points map. http://www.crazybobs.net/mrx/misc/pointmaps/june25_2011/168h_Combined_3k.gif
« Last Edit: October 29, 2012, 06:59:11 pm by [MAF]Epoxi »

Offline [MAF]Rac3r

  • Leader
  • Posts: 2,807
  • Well, this is embarrassing.
    • View Profile
Re: Crazybob's Points Map
« Reply #4 on: October 29, 2012, 06:59:19 pm »
I can't think of a quick way to get the xyz, file saving isn't exactly ideal for this.

Definitely a start though, we got a few ideas down.

Offline [MAF]Epoxi

Re: Crazybob's Points Map
« Reply #5 on: October 29, 2012, 07:05:46 pm »
Hmm, that sucks. Maybe we could make a client-based .exe that we can ask a really regular player to run which would extract players' coords and produce a log of positions. Though this wouldn't work too well with SA:MP because of the way it takes down the values of distant players' positions really infrequently.

Edit: LOL at blatant disregard of the dirt roads around El Quebrados.
« Last Edit: October 29, 2012, 07:23:28 pm by [MAF]Epoxi »

Offline [MAF]Karlis

Re: Crazybob's Points Map
« Reply #6 on: October 29, 2012, 07:26:20 pm »
ok, thats ~33MB per day, not that bad. i guess it needs some buffer that is offloaded to file from time to time, like 10000entries?

Offline [FSR]Ush

  • Admin
  • Posts: 13,449
  • Aart
    • View Profile
Re: Crazybob's Points Map
« Reply #7 on: October 29, 2012, 08:50:51 pm »
OMG SO COOL :D

Offline [MAF]mooman

  • Leader
  • Posts: 6,299
    • View Profile
Re: Crazybob's Points Map
« Reply #8 on: October 30, 2012, 05:32:20 am »
ours would probably be a bit more uniform, would be interesting for sure though
will read and answer your forum PMs when I'm less busy!

Offline [FSR]Ush

  • Admin
  • Posts: 13,449
  • Aart
    • View Profile
Re: Crazybob's Points Map
« Reply #9 on: October 30, 2012, 08:17:20 am »
I know for sure MadMax will take care of the spots that aren't used enough, with vehicles that aren't used enough :L

Offline [MAF]Karlis

Re: Crazybob's Points Map
« Reply #10 on: October 30, 2012, 09:52:54 am »
lets exclude max or give him another colour then.

Offline [MAF]Epoxi

Re: Crazybob's Points Map
« Reply #11 on: October 30, 2012, 10:16:24 am »
lets exclude max or give him another colour then.

 :L

I have made a client-side program that notes down the position of the player at 1 second intervals. The numbers I get out for X and Y are really weird though, I'll have a play with it now to see if I can get it working properly...

LOL Here is an Excel graph of me driving in circles...can you guess where it is?

« Last Edit: October 30, 2012, 10:29:00 am by [MAF]Epoxi »

Offline [FSR]Ush

  • Admin
  • Posts: 13,449
  • Aart
    • View Profile
Re: Crazybob's Points Map
« Reply #12 on: October 30, 2012, 10:25:20 am »
This map thingy is best for the '1 cp' race aka 'find your own way' races. Would be amazing to check where people usually drive :L

For 'normal' cp to cp races this is less usefull.. unless you really make a distinction in the map, between parts of the road. But I think that is too much.

Offline [MAF]Vertigo

  • Admin
  • Posts: 3,435
  • lol
    • View Profile
Re: Crazybob's Points Map
« Reply #13 on: October 30, 2012, 10:55:48 am »
This would be cool, just to analyse. Maybe something could be developed just for one race atm. That could be easily de-bugged n shit right?

Offline [MAF]Rac3r

  • Leader
  • Posts: 2,807
  • Well, this is embarrassing.
    • View Profile
Re: Crazybob's Points Map
« Reply #14 on: October 30, 2012, 12:06:00 pm »
Here is an Excel graph of me driving in circles...can you guess where it is?

LV Airport? :p  I tried to chat and use the values on the graph, but they're not helpful lol

This map thingy is best for the '1 cp' race aka 'find your own way' races. Would be amazing to check where people usually drive :L
That's be cool, a good race to exercise this on.

This would be cool, just to analyse. Maybe something could be developed just for one race atm. That could be easily de-bugged n shit right?
Right, it's really each for us to code for the server, just figuring out the quickest method is the key.


Offline [MAF]Epoxi

Re: Crazybob's Points Map
« Reply #15 on: October 30, 2012, 01:22:04 pm »


This is the plot I get when I do the circuit shown. I have scaled the blue plot to the same dimensions as the red line on the map, but as you can see the plots are very different.  :-\

I have no idea what I am doing.

Offline [MAF]Rac3r

  • Leader
  • Posts: 2,807
  • Well, this is embarrassing.
    • View Profile
Re: Crazybob's Points Map
« Reply #16 on: October 30, 2012, 01:41:48 pm »
Seem's to be taking shape, although the shape does look slightly off.  It must be some hidden formula in 10 digit code.

Hopefully this method would be better for Excel.
Code: [Select]
-4000.0 = 0, 0.0 = 4000, 4000.0 = 8000

Offline [FSR]Ush

  • Admin
  • Posts: 13,449
  • Aart
    • View Profile
Re: Crazybob's Points Map
« Reply #17 on: October 30, 2012, 01:54:18 pm »
The change in shape seems to be caused by height differences in the track you drove.

Offline [MAF]Epoxi

Re: Crazybob's Points Map
« Reply #18 on: October 30, 2012, 02:18:46 pm »
I am getting closer to the answer. This is some craaaazy system.

Anyway, the first of the ten digits symbolises which quadrant the point is in.

        N
        /\
(1,3) | (1,1)
--------------->E
(3,3) | (3,1)

This is the reason plots became scrambled when travelling to different quarters of the map.

The following digits represent the coordinate, but do not follow a linear scale. This is what I need to work out now.

Offline [FSR]Ush

  • Admin
  • Posts: 13,449
  • Aart
    • View Profile
Re: Crazybob's Points Map
« Reply #19 on: October 30, 2012, 02:19:56 pm »
You're pretty smart, you know? :D

Offline [MAF]Cthulhu

  • Admin
  • Posts: 6,331
  • Trance, Progressive, Techno <3
    • View Profile
  • In-game name: [MAF]Phobos
Re: Crazybob's Points Map
« Reply #20 on: October 30, 2012, 03:01:40 pm »
And I'm pretty stupid because I have no idea what all above is. :L

Offline [MAF]Karlis

Re: Crazybob's Points Map
« Reply #21 on: October 30, 2012, 03:17:16 pm »
I am getting closer to the answer. This is some craaaazy system.

Anyway, the first of the ten digits symbolises which quadrant the point is in.

        N
        /\
(1,3) | (1,1)
--------------->E
(3,3) | (3,1)

This is the reason plots became scrambled when travelling to different quarters of the map.

The following digits represent the coordinate, but do not follow a linear scale. This is what I need to work out now.

aren't you using signed ints as unsigned ones? that would explain why is there 3 for negative and 1 for positive, as leftmost bit is sign.

Offline [MAF]Snoopy

  • Posts: 14,540
    • View Profile
Re: Crazybob's Points Map
« Reply #22 on: October 30, 2012, 03:39:22 pm »
And I'm pretty stupid because I have no idea what all above is. :L

Me too lol

Offline [FSR]Ush

  • Admin
  • Posts: 13,449
  • Aart
    • View Profile
Re: Crazybob's Points Map
« Reply #23 on: October 30, 2012, 04:08:49 pm »
And I'm pretty stupid because I have no idea what all above is. :L

You're good at other things

Offline [MAF]Vertigo

  • Admin
  • Posts: 3,435
  • lol
    • View Profile
Re: Crazybob's Points Map
« Reply #24 on: October 30, 2012, 04:21:02 pm »
I wish I was good at maths haha.

Why don't we just ask CrazyBob? lol But whats the fun in that I guess :P

So at the moment, we are just trying to develop a way of tracking the path of one player right?

Offline [MAF]Epoxi

Re: Crazybob's Points Map
« Reply #25 on: October 30, 2012, 05:53:41 pm »
Edit: OMG yes Karlis you are right about unsigned integer. I am a n00b, I got the program working now.  :L
« Last Edit: October 30, 2012, 06:34:35 pm by [MAF]Epoxi »

Offline [MAF]Epoxi

Re: Crazybob's Points Map
« Reply #26 on: October 30, 2012, 10:13:45 pm »
I had a fun idea. Now I have the coordinates sorted I could make a program that monitors how damaged your car is. When the car health decreases the point could be noted on the map. This would build up a picture of the most dangerous locations to drive.  8)

If we all ran the program and combined our results it should be interesting.
« Last Edit: October 30, 2012, 10:19:17 pm by [MAF]Epoxi »

Offline [MAF]Karlis

Re: Crazybob's Points Map
« Reply #27 on: October 30, 2012, 10:31:39 pm »
ok, so vehicle health should be added to the logging.
this is best format i think:
instance id(or user id),damage delta, x delta, y delta (deltas will greatly reduce size)
time is not needed, as you can have array with last times some instance got called, and if it matches current time then increase current time by 1.
also, i don't think we need any program, this can be coded serverside.
« Last Edit: October 30, 2012, 10:35:27 pm by [MAF]Karlis »

Offline [MAF]Epoxi

Re: Crazybob's Points Map
« Reply #28 on: October 31, 2012, 01:21:06 am »
Cool, by "X delta" you mean change in X right?

Offline [MAF]Karlis

Re: Crazybob's Points Map
« Reply #29 on: October 31, 2012, 11:12:18 am »
yeah, you won't have problems reading that right?

Offline [MAF]Epoxi

Re: Crazybob's Points Map
« Reply #30 on: October 31, 2012, 12:25:27 pm »
No problem with handling it really.

My only concern is that using changes in X,Y will add rounding errors to every point taken. If the logging runs for long the rounding errors could snowball to give positions miles away from the player.

Offline [MAF]Karlis

Re: Crazybob's Points Map
« Reply #31 on: October 31, 2012, 01:26:28 pm »
it will round the values and then calculate delta, not other way around, so no error should accumulate.

Offline [MAF]Epoxi

Re: Crazybob's Points Map
« Reply #32 on: October 31, 2012, 05:23:56 pm »
it will round the values and then calculate delta, not other way around, so no error should accumulate.

Oh that's cool, I look forward to seeing the data.  ;D

Offline [FSR]Ush

  • Admin
  • Posts: 13,449
  • Aart
    • View Profile
Re: Crazybob's Points Map
« Reply #33 on: October 31, 2012, 06:10:20 pm »
OMG! There goes my privacy on AdrenalineX! Now everyone will be able to track me visiting CJ's house to smoke weed! :L

Offline [MAF]Karlis

Re: Crazybob's Points Map
« Reply #34 on: October 31, 2012, 06:26:31 pm »
it will be anonymous, don't worry.

Offline [MAF]mooman

  • Leader
  • Posts: 6,299
    • View Profile
Re: Crazybob's Points Map
« Reply #35 on: October 31, 2012, 06:30:51 pm »
but now we know the trail that goes to cj's house all the time is ush's
will read and answer your forum PMs when I'm less busy!

Offline [FSR]Ush

  • Admin
  • Posts: 13,449
  • Aart
    • View Profile
Re: Crazybob's Points Map
« Reply #36 on: October 31, 2012, 07:21:43 pm »
 :L Will go to Ryder then :L

Offline [MAF]mooman

  • Leader
  • Posts: 6,299
    • View Profile
Re: Crazybob's Points Map
« Reply #37 on: October 31, 2012, 07:28:08 pm »
but now we know the trail that goes to ryder's house all the time is ush's
will read and answer your forum PMs when I'm less busy!

Offline [FSR]Ush

  • Admin
  • Posts: 13,449
  • Aart
    • View Profile
Re: Crazybob's Points Map
« Reply #38 on: October 31, 2012, 07:33:00 pm »
You can join :L I will bring stroopwafels!

Offline MadMax

  • Lazyass, still hanging around AX from time to time
  • Admin
  • Posts: 4,359
  • I'm the road warrior...
    • View Profile
  • In-game name: MadMax[MAF]
Re: Crazybob's Points Map
« Reply #39 on: October 31, 2012, 09:26:53 pm »
Ryder is dead, Big Smoke too and CJ is totally against drugs or so... better visit the Truth, that crazy old-hippie always got some shit to smoke...

PLEASE, IGNORE ALL MY SPELLING MISTAKES AND OTHER TYPOS True racing fans enjoy horsepower in ANY form

Offline [FSR]Ush

  • Admin
  • Posts: 13,449
  • Aart
    • View Profile
Re: Crazybob's Points Map
« Reply #40 on: October 31, 2012, 09:51:12 pm »
Thanks for the tip!

Offline [MAF]Karlis

Re: Crazybob's Points Map
« Reply #41 on: November 01, 2012, 05:55:47 pm »
should it log /tt and /stunt too, or only /race?

Offline [FSR]Ush

  • Admin
  • Posts: 13,449
  • Aart
    • View Profile
Re: Crazybob's Points Map
« Reply #42 on: November 01, 2012, 07:14:24 pm »
I'd just make 2 section, 1 for /stunt and one for /race?

Offline [MAF]Epoxi

Re: Crazybob's Points Map
« Reply #43 on: November 02, 2012, 09:04:25 am »
I agree. One for stunt and one for race.  8)

Maybe at a later date we could make separate labelled files for different /tt races and autogenerate maps of the /tt routes for display on the AX website.

Offline [MAF]mooman

  • Leader
  • Posts: 6,299
    • View Profile
Re: Crazybob's Points Map
« Reply #44 on: November 02, 2012, 09:20:42 am »
That's one of the things I've always wanted to do Epoxi, only just realised now that this idea of yours makes it possible finally :D Could do it for normal races too even.
will read and answer your forum PMs when I'm less busy!

Offline [MAF]Epoxi

Re: Crazybob's Points Map
« Reply #45 on: November 02, 2012, 01:19:28 pm »


An Excel plot of a few minutes on CrazyBob's server. Now I know the data is all legit, I can start making a plotting program of my own...

Offline [MAF]Epoxi

Re: Crazybob's Points Map
« Reply #46 on: November 02, 2012, 07:05:24 pm »
Surprise!



I am ready for data now...  O0

I will try to make it a bit more complex and sexy as I go.

Offline [MAF]Karlis

Re: Crazybob's Points Map
« Reply #47 on: November 02, 2012, 07:21:10 pm »
Will take some time to get the data, i wrote the logger, but it needs some debug when server is emptier and then it needs at least few days of running.

Offline McD0n3ld

Re: Crazybob's Points Map
« Reply #48 on: November 02, 2012, 07:50:09 pm »
wouldn't be more interesting to get data when a player's car is damaged? so we know where are the spots where people crash/is rammed :D

Offline [MAF]Epoxi

Re: Crazybob's Points Map
« Reply #49 on: November 02, 2012, 07:52:56 pm »
wouldn't be more interesting to get data when a player's car is damaged? so we know where are the spots where people crash/is rammed :D

That's the plan.  ;) The reason this is a trail is because I needed some data to test the program.

@Karlis: Remember to stop logging when the player crosses the finish line because people always ram each other for fun at the end of the race and that could interfere with the results.

Here is a 2000 second run on AX server:



Looking at the trails at SF airport, the Top Gear track is a really accurate representation of the real thing,

« Last Edit: November 02, 2012, 07:55:56 pm by [MAF]Epoxi »

Offline [MAF]Karlis

Re: Crazybob's Points Map
« Reply #50 on: November 02, 2012, 07:58:29 pm »
@Karlis: Remember to stop logging when the player crosses the finish line because people always ram each other for fun at the end of the race and that could interfere with the results.
to me that would be the most interesting part, the patterns of something that is considered chaos :P i will think of some kind of grouping.

Offline [MAF]Epoxi

Re: Crazybob's Points Map
« Reply #51 on: November 02, 2012, 09:53:17 pm »
Here is my latest rendering...



If you look carefully you can see some dots are different colours. The higher the number of counts at that point, the redder the dot. This will be very useful with masses of data.  8)

Offline [MAF]Karlis

Re: Crazybob's Points Map
« Reply #52 on: November 02, 2012, 09:57:03 pm »
make the near dots with same id(it'll be provided from data) connect together, will look cooler.

Offline [MAF]Epoxi

Re: Crazybob's Points Map
« Reply #53 on: November 02, 2012, 10:11:54 pm »
make the near dots with same id(it'll be provided from data) connect together, will look cooler.

I have an idea how to do that, it's a little complicated so I will save it for later.

Offline [MAF]Karlis

Re: Crazybob's Points Map
« Reply #54 on: November 02, 2012, 10:46:08 pm »
like this or more fancy?
PS: i know the float comparison is harder than this due to precision loss, just an example
Code: [Select]
int drawLine(floatX1,float Y1,float Y1,float Y2,float steps)
{
  for(float i = 0.0; i <= 1.0; i += (1.0 / steps))
  {
    DrawDot(X1+i*(X2-X1),Y1+i*(Y2-Y1));
  }
  return 1;
}

Offline [MAF]mooman

  • Leader
  • Posts: 6,299
    • View Profile
Re: Crazybob's Points Map
« Reply #55 on: November 03, 2012, 08:18:37 am »
this is shaping up very nicely 8)
will read and answer your forum PMs when I'm less busy!

Offline [MAF]Epoxi

Re: Crazybob's Points Map
« Reply #56 on: November 03, 2012, 12:59:29 pm »
like this or more fancy?
PS: i know the float comparison is harder than this due to precision loss, just an example
Code: [Select]
int drawLine(floatX1,float Y1,float Y1,float Y2,float steps)
{
  for(float i = 0.0; i <= 1.0; i += (1.0 / steps))
  {
    DrawDot(X1+i*(X2-X1),Y1+i*(Y2-Y1));
  }
  return 1;
}

Thanks, but I am using FTLK which already has a line drawing function.  :D

I was just thinking that I have to make a line length limit because simply joining all the dots will draw big messy lines all over the screen (because of teleports and interiors). I will need to find max. gap between dots, for instance driving an Infernus at top speed for one second.

Offline [MAF]Karlis

Re: Crazybob's Points Map
« Reply #57 on: November 03, 2012, 01:28:50 pm »
yeah, as player quits wont even be logged you have to connect only if dots are, lets say, not more than 100m apart(that would be 360kmh, aprox. the max speed of NRG-500 when radding).

Offline [MAF]Epoxi

Re: Crazybob's Points Map
« Reply #58 on: November 03, 2012, 02:06:39 pm »
I found the speed limit for Hydra is 82 units in one second, so I have set the max join gap to 85 units. It appears to connect the dots nicely so far.

Offline [MAF]Karlis

Re: Crazybob's Points Map
« Reply #59 on: November 03, 2012, 02:22:33 pm »
i think nrg radding can go faster (and boat radding, but we shouldn't support that as it can reach 700kmh and crash the game lol)

Offline [FSR]Ush

  • Admin
  • Posts: 13,449
  • Aart
    • View Profile
Re: Crazybob's Points Map
« Reply #60 on: November 03, 2012, 03:58:25 pm »
that would exactly point out where people are succesful radding then, karlis

Offline [MAF]Karlis

Re: Crazybob's Points Map
« Reply #61 on: November 03, 2012, 04:02:31 pm »
well, speed is gettable anyway, just matter of reading the data.
anyway, there is some gay bug in the thing i wrote that doesn't want to be detected, so its not running yet :(

Offline [FSR]Ush

  • Admin
  • Posts: 13,449
  • Aart
    • View Profile
Re: Crazybob's Points Map
« Reply #62 on: November 03, 2012, 04:22:06 pm »
hope the bug turns hetero soon then :L

Offline [MAF]Epoxi

Re: Crazybob's Points Map
« Reply #63 on: November 03, 2012, 04:53:58 pm »


Connected dots.  O0
« Last Edit: November 03, 2012, 04:59:31 pm by [MAF]Epoxi »

Offline [MAF]Snoopy

  • Posts: 14,540
    • View Profile
Re: Crazybob's Points Map
« Reply #64 on: November 03, 2012, 04:56:25 pm »
Wow

Offline [MAF]Karlis

Re: Crazybob's Points Map
« Reply #65 on: November 03, 2012, 04:57:13 pm »
how big precision do you use atm?

Offline [MAF]Epoxi

Re: Crazybob's Points Map
« Reply #66 on: November 03, 2012, 05:00:49 pm »
how big precision do you use atm?

I am using float precision for the data, then converting the coordinates to an int for a 800x800 array (i.e. size of the window shown). I have programmed it so you can increase the window size ofc, but my screen is too small lol.

btw I found the Hydra was still slightly faster than the NRG even with NRG leaning forwards.  What do you mean by radding?

Offline [MAF]Karlis

Re: Crazybob's Points Map
« Reply #67 on: November 03, 2012, 05:11:46 pm »
it's basically tapping with high wheelie, ask someone online to show.
the plan for input precision is 8000x8000(or more, if outside map borders), so it'll look better if you can do some interpolation.
« Last Edit: November 03, 2012, 05:14:58 pm by [MAF]Karlis »

Offline [MAF]Epoxi

Re: Crazybob's Points Map
« Reply #68 on: November 03, 2012, 05:16:37 pm »
Okay sure, I will work on it when I get the data.

My plan is to reject points outside the x,y=[-3000,+3000] region because they are only custom maps and are not useful.

Plotted yesterday's data on map:


Offline [MAF]Epoxi

Re: Crazybob's Points Map
« Reply #69 on: November 03, 2012, 07:42:46 pm »
Playing for 1 hour on CrazyBob's server:


Offline [MAF]Epoxi

Re: Crazybob's Points Map
« Reply #70 on: November 03, 2012, 09:08:28 pm »
Karlis hydra run:


Offline [MAF]Karlis

Re: Crazybob's Points Map
« Reply #71 on: November 03, 2012, 09:11:10 pm »
lol those fails

Offline [MAF]Epoxi

Re: Crazybob's Points Map
« Reply #72 on: November 05, 2012, 02:36:57 pm »
Bump.



Adding points to one cumulative file. Image shown is only my activity on CrazyBob's server.

Offline [MAF]Karlis

Re: Crazybob's Points Map
« Reply #73 on: November 05, 2012, 02:59:39 pm »
is it possible to make it "soft", like antialiasing?
if it can't be done with function, draw half-alpha lines with half-pixel offset in each direction, would look way better imo.

Offline [MAF]Epoxi

Re: Crazybob's Points Map
« Reply #74 on: November 05, 2012, 05:07:14 pm »
I looked into it but unfortunately FLTK only supports drawing at integer pixel level and does not have anti-aliasing (on Windows XP anyway).  :(

I have made the program such that you can toggle the SA map, blue lines and the dots on and off separately though.
« Last Edit: November 05, 2012, 05:15:05 pm by [MAF]Epoxi »

Offline [MAF]Karlis

Re: Crazybob's Points Map
« Reply #75 on: November 05, 2012, 05:12:33 pm »
then you could try to hardcode it?

Offline [MAF]Karlis

Re: Crazybob's Points Map
« Reply #76 on: November 05, 2012, 07:03:37 pm »
here's func that i came up with for that. it is based on alpha change and it assumes that drawPixel function has merged color value, if thats not the case it needs some adjustments.
NOTE: i did test it, but not visually, so its not warranted to be bugfree.
Code: [Select]
int DrawPixelInbetween(float fx, float fy, int color)
{
int ix = (int)fx; //the base integers
int iy = (int)fy;
int offx = int(0xff*(fx - ix)); //the multipliers, think of them as floats ( makes int and float mixed math easier)
int offy = int(0xff*(fy - iy));
int alpha = (color & 0xff000000) / 0xffff; // getting alpha, divided with 0xffff because multipliers before should bring the value back to original or decrease it accordingly
color &= 0xffffff; // get normal color
DrawPixel(ix + 1,iy + 1, color | (alpha * offx * offy & 0xff000000)); //get alpha at particular point and merge it back to normal color
DrawPixel(ix, iy + 1, color | (alpha * (0xff - offx) * offy & 0xff000000));
DrawPixel(ix + 1, iy, color | (alpha * offx * (0xff - offy) & 0xff000000));
DrawPixel(ix, iy, color | (alpha * (0xff - offx) * (0xff - offy) & 0xff000000));
return 1;
}

EDIT: apparently it has 1 bit precision loss, no big deal imo.
« Last Edit: November 05, 2012, 07:07:56 pm by [MAF]Karlis »

Offline [MAF]Epoxi

Re: Crazybob's Points Map
« Reply #77 on: November 05, 2012, 09:07:30 pm »
I don't think FTLK supports alpha transparency, but I will try to implement the code blending with black or something.

How is the data collection from the server coming along?

Offline [MAF]Karlis

Re: Crazybob's Points Map
« Reply #78 on: November 05, 2012, 09:20:06 pm »
nothing still, none of us have a clue why it doesn't work and debugging fails to show any errors too :(
the worst part is i cannot reproduce the issue in local server, but ax becomes unusable if i test here, so i dunno what to do atm, i'll have some more free time in wednesday, will try some more then.

Offline [MAF]Epoxi

Re: Crazybob's Points Map
« Reply #79 on: November 05, 2012, 09:49:39 pm »
Cool, thanks.  ;D

Offline [MAF]Epoxi

Re: Crazybob's Points Map
« Reply #80 on: November 06, 2012, 04:45:49 pm »
I couldn't get the alpha blending to work.  :-[ But I added the ability to toggle white dots like on the original C'n'R image, plus the ability for the user to read the N count of points in a certain cell using the mouse (see top left hand corner of window below).


Offline [MAF]Epoxi

Re: Crazybob's Points Map
« Reply #81 on: November 10, 2012, 09:06:53 pm »
woot woot you can now make the canvas bigger than the window and drag around the plot produced.  ;D



Can you tell where that is?  ;)

Offline [MAF]mooman

  • Leader
  • Posts: 6,299
    • View Profile
Re: Crazybob's Points Map
« Reply #82 on: November 10, 2012, 09:25:32 pm »
wang's!

took me a while when it was so obvious :/
will read and answer your forum PMs when I'm less busy!

Offline [MAF]Epoxi

Re: Crazybob's Points Map
« Reply #83 on: November 10, 2012, 09:47:07 pm »


wang's!



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.
« Last Edit: November 10, 2012, 09:53:00 pm by [MAF]Epoxi »

Offline [FSR]Ush

  • Admin
  • Posts: 13,449
  • Aart
    • View Profile
Re: Crazybob's Points Map
« Reply #84 on: November 11, 2012, 01:01:03 pm »
wang's!

took me a while when it was so obvious :/

haha lol I tried to identify before I read your answer.. was looking where that upper turn could be, and where that other dead end is xD didn't realize wangs at first either, while it is so obvious :L

Offline [MAF]mooman

  • Leader
  • Posts: 6,299
    • View Profile
Re: Crazybob's Points Map
« Reply #85 on: November 11, 2012, 01:49:44 pm »


wang's!



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.
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
will read and answer your forum PMs when I'm less busy!

Offline [MAF]Epoxi

Re: Crazybob's Points Map
« Reply #86 on: November 11, 2012, 04:32:45 pm »
Thank you.  ;)

Offline [MAF]Karlis

Re: Crazybob's Points Map
« Reply #87 on: December 04, 2012, 05:58:52 pm »
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: [Select]
playerid,score_log2,damage,x_delta,y_deltaplayerid
  -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: [Select]
#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
Code: [Select]
#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.
« Last Edit: December 04, 2012, 06:05:04 pm by [MAF]Karlis »

Offline [MAF]Epoxi

Re: Crazybob's Points Map
« Reply #88 on: December 04, 2012, 06:38:37 pm »
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?

Offline [MAF]Karlis

Re: Crazybob's Points Map
« Reply #89 on: December 04, 2012, 06:43:11 pm »
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.

Offline [MAF]Epoxi

Re: Crazybob's Points Map
« Reply #90 on: December 04, 2012, 07:38:38 pm »
Okay, I can deal with that.  :D

Later, I think I might re-make the plotting program to handle the individual data in more interesting ways. For now I will make a simple program to strip the data into a bunch of points to see how it turns out. I am really keen on seeing the damage data in particular (i.e. forming a log which just shows the points where vehicle health was lost to make a histogram map).

Edit: Just to check: are you only logging players who are in race-worlds? It could waste a lot of data and have a lot of anomalies if you logged /AFKers, /DMers and /STUNTers.
« Last Edit: December 04, 2012, 07:55:31 pm by [MAF]Epoxi »