Busy little bees

It’s probably about time I did another one of these player-activity animations (it does animate if you leave it for a bit). But actually, I think what I might do this time is release the data – in some format, and see if one of you folks can come up with something neat.


Ok – if someone wants to take a shot at this, let me know if you need the data in a particular format.

For now, here’s 3 hours of data to play with (2-3 hours delayed) regenerated hourly.
http://web3.wwiionline.com/snapshot.data.zip (zipped since its such a large file)
http://web3.wwiionline.com/snapshot.data (unzipped, LARGE file; grows upto 30mb)

Instructions are in the data file.

I don’t suppose we could get a map to go with those coordinates?

Yes, unfortunately it’s (a) old, (b) 16Mb, (c) upto you to figure out scale :)

You know, if you release a live version of that, someone will make radar. Not that that is a good thing…

Well, it’s three hours delayed. Can’t ask for much more than that, really.

Are you talking to me? :-p

Yeah, this data *is* live, regenerated hourly and delayed by 3 hours – I’m not going to offer anything more “live” than that, though :)

Well… good then.

Once someone makes something, there should be a link to it on the wikipedia page.

Im thinking about start charging for my work…

SOrry for you, guys, but currently my nights are busy watching Galactica Season 2… there is still 16 episodies laying on my HD…

Lol – Ampos — if we put together a spec for that other tool we mentioned, there would be compensation involved for building the tool :)

BTW, can someone illuminate me about this unix datestamp? I can not figure it!

Can you elaborate a bit more the population value?

Perl has a neat little conversion module, it does more than convert but one of the things it can do is convert unix time.


I think the unix time is based on the number of seconds since unix was first born. All I know is that around the time that unix starts running out of time they invent a new interger class. First it was int, then bigint

Of course the int and bigint story was told to me long ago by an old grey bearded programmer. where anything can be done with MOV, MUL, ADD.

He did have an odd sense of humor.

Unix time is measured in seconds since 00:00:00 Jan 1, 1970 UTC. The “end of time_t” is 3:14:07 Jan 19, 2038 for systems that still have a signed 32bit time_t counter.

Many systems are already using 64 bit time_t, which postpones the end of time until Sunday, December 4, 292,277,026,596.

The localtime() and gmtime() functions are the simplest way to convert it into seperate time elements ( day, hour, etc.. ).

Date::Manip for perl is very handy, though. I’ve used it in several projects in the past, and while it might be a bit of overkill for this, it will handle things like:

$date = ParseDate("1st saturday in march 1973");

Why Unix did start counting time 23 days before I did born? :D Are they counting my life or something?

It’s the standard format for exchanging seconds since epoch also known as the “epoch time”; epoc is Jan 01 1970 00:00:00 UTC. Whatever language you’re using should have a function to convert to/from it. If it doesn’t, you should point a finger at the developers and laugh your ass off :) Although it gets called “Unix” time, it should really be called “C time” since Unix merely adopted the systme of time measurement that the C language was using, and since then everyone else has adopted it – C++, C#, Java, PHP, Perl, Ruby, Python, Lua, ad nauseum.

Seems to me you can glean raw server population numbers from the data.

For example Tuesday, March 6th 2007, 22:16:29 (GMT) 334 people were online.
(or some multiple of that. Could verify by spawning in to some isolated remote location)

Sure you want this released?


Yes, thanks :) Apparently you can’t :)

Just to be sure, I corrected my typo in the comments. The downgrade to integers vs floats is just a performance thing (the tool I’m using to generate the output takes roughly 9x longer when I used floats)

Raw server numbers can still be calcuated even after your data format change (little harder now). I just assumed that you did not intend to release this information. My bad. Now quit wasting time with me and get back to work ;).

According to your example (“March 6th 2007, 22:16:29 (GMT) 334 people were online .. or some multiple”) you can’t. The typo was that I had said “total number of people online” where it should have said “maximum number of people in a cell for that time slice”.

I’m guessing the percentage is a rounded up integer?

If so, that means it’s very difficult to get anything better than a wild-assed guess of the total population. I see what Luckyjoe is aiming at – if you know there’s always only your one “seed player” at a given octet, you can invert the percentage to figure out what the max is, and then turn all those percentages into player counts, and total them up.

However, as soon as the most populated cell gets over 100 people, it’s completely impossible to determine what the max is anymore – everything will display as 1% for your seed player’s cell.

Anything over 10 people in one cell similarly makes the data imprecise, anything over 25 makes it so chunky as to be useless.

Max cell pop:Seed cell percentage (assuming round up, not “proper” rounding)
and from then on, it’s all 1%

If you could park 20 seeds in one cell, you could get better data… but really, it’s not worth the effort.

And its assuming that the data is whole, pure and raw :) There is already some code in there to filter various types of white noise out, because I’m not really interested in showing the lone DD sailing from England etc and more interested in showing battle activity :)


LOL we really are not communicating here. But I doesnt matter. My only point is that you can still generate raw server numbers from the current data.

Now go drink a cup of Typhoo. Personally Im a Folgers guy.


Ahh my bad assumtions:

“assuming that the data is whole, pure and raw ”

Yep I assumed that.

Kren put the final nail in the coffin.


I understand what you’re saying, but your example so far wasn’t remotely close to either the total number of people on the server – it wasn’t 325-350 or 650-700 or 975-1050 or 1300-1400 or 1625-1750 or any other multiple of the range; nor was the largest number of people in a cell. And yes, I’m accomodating the timezone you specified.

Like I said – you’re assuming the data is raw.

Oops – just caught your last-last reply :)

Hehe – actually we ran out of English Breakfast tea, and we’re out of the Italian roast packets, so I’m drinking Columbia. Just tending to the blog while I wait on various lengthy compiles to complete :)

i had a look on “http://web3.wwiionline.com/snapshot.data” file, i saw that it have no update of this between 2 time, and loss many information

Can we have the possibility to ask to the program to give a part of information at one particular time ?

exemple : “http://web3.wwiionline.com/snapshot.data?date=070307&time=18:00” and the system return one hour of information of the same type of snapshot.data ?

No, this data is expensive to generate; one option might be for me to generate static data files for yyyy/mm/dd-hh/mm and just have some kind of metadata file indicating what the most recent file is – then its just down to you to pull the files.

Good idea
The reason i ask this, this is because when i look your thread and get the file, i had only a little part of the action during the last 3 hours, but if i want make something from the begining of this campagne, i can’t have the entire information.
And this is the same during night, i can miss many information, because i can’t be always on my computer to get information each 3 hours.

To reduce file size, perhaps change thre rate of calculation from 1 min to 5 min, then the data will have this name “snapshot-070307-1800.data”, “snapshot-070307-1805.data”, etc… ?

The size of the data isn’t a problem if the files are static, but having an open-ended query to fetch it would be :)


at the moment, there is nothing in this file : http://web3.wwiionline.com/snapshot.data

did you already change name of file ? or this is stopped ?

for the size :

i think about something (php program) to use the data, then it is better to have little size of file (up to 5 Mo each) to use it.

Snapshots had gotten turned off, I’ll take a look at why.

You might want to consider writing something on your system which periodically pulls data from our files and converts it into your own local database.

Amen to that. Far better to have an importer that sanitizes the data and throws out dupes/bad data/errors in fetching, and then you can just operate off a known good DB with a structure that suits.

i used your oldMapBase.png and add screenshot from the game to add on the map town created after the 1.14 to have a good map for the moment :


the quality is less then the first because this is only screenshot resample

i used your OldMap.png to make a newer with the wew town added since the 1.14 :

the quality is not the same, because this is only screenshot resample and copy in the old map

Hi All,

i have one question

how we can translate coordinate of a town seen in the file “/xml/cplist.xml” to the coordinate in the map ?

Check out the front page of Wiretap under “What’s new”.

2007 Mar 21: Added absx/absy positions to facilities (in meters relative to 0.0.0E/0.0.0N, for either a capture, spawn or random building in the facility)
2007 Mar 21: Added tools for converting game units to lat/lon values (/wwiiol-latlon.js)
2007 Mar 21: Added Lat/Lon tool demo (/viewcp.jsp)

(i.e. the answer is in http://web3.wwiionline.com/wwiiol-latlon.js)

yes i saw that you add this, but i don’t know how to localize facilities in the image http://web3.wwiionline.com/kfs1/oldMapBase.png because this image is 12000 pixels x 6592 pixels

perhaps, i must try the fact that each pixel is a square of 800 m x 800 m, and need to only know where is the 0,0 (bottom left pixel) relatively to the 0.0.0E/0.0.0N, this will become :

x (pixel loc) = (absx / 800) + offsetx
y (pixel loc) = (absy / 800) + offsety

and with a recalculation of y, because the 0,0 in a image is at the top left position and goes from the top to the bottom…

0,0 is bottom left. What you need to know is the x/y of the top/right, so you can scale any map point to match – or, you need to find a specific point on the map and find the lat/long corresponding to it and use that.

I’ve added them to wwiiol-meta.js

var wwii_world_width_m = 8640000 ;
var wwii_world_height_m = 4211200 ;

So what you need to do is calculate the metres per pixel density of the image:

var metersPerPixelX = wwii_world_width_m / imageWidth ;
var metersPerPixelY = wwii_world_height_m / imageHeight ;

then to place an XY:

function convertOctetXYToPixels(ox, oy) {
return convertXYToPixels(ox * 800 + 400, oy * 800 + 400) ;

function convertXYToPixels(xm, ym) {
return [ xm * metersPerPixelX, ym * metersPerPixelY ] ;

If you want to use part of the image you’d need to do additional conversion which I can’t be bothered to write just now :)

Depending what you’re using, you may need to do:

pixels = convertXYToPixels(xm, ym);
plot(pixels[0], imageHeight – pixels[1]);

i try what you wrote to localize town in the file :

but don’t work…

while($r = mysql_fetch_array($rSQL)) {
$mpx = ($r["ox"] * 800 + 400) / $rpx * 10 + $offx;
$mpy = ($r["oy"] * 800 + 400) / $rpy * 10 + $offy;
echo $r["TownName"] . " =>" ."X : " . $mpx . " - Y : " . $mpy . "\n";

for example, to understand the problem :

Neuchatel have as coordinate in the image “oldMapBase.png” x=5996 and y=4515, and in the database x(octect)=241 and y(octet)=3707

Ramet have as coordinate in the image “oldMapBase.png” x=7349 and y=3142, and in the database x(octect)=326 and y(octet)=3793

I honestly don’t know for sure; I’ve asked Ramp to look it up for me. However – what you need to remember is that the Octet “Y” values are upside down (for an image), so it might help if you invert the sign — so ramet is o[326,-3793].

You can work out that the map is at aproximately 15.9 x 15.9 pixels.

From that you can tell that ramet *ought* to be at p[5183,-60308] but is actually at p[7349,-3450] (it’s 3450 pixels *up* the image, from the bottom)

which tells us that its off by p[-2166,56858] from o[0,0].

ramet is o[326,-3793] so pixelwise:
[(326 * 15.9) – -2166, (-3793 * 15.9) + 56858]
[5183 – -2166, -60308 + 56858] = [7349,-3450]

Well, of course it is. But how about Neufchateau? o[241,-3707] p[5996,-2077]
[(241 * 15.9) – -2166, (-3707 * 15.9) + 56858]
[3832 – -2166, -58941 + 56858] = [5998, -2083]

Close — I think you probably at 16×16. Redo the math with that and it should probably work :)

To convert those negative Y values into pixels, take the image height and subtract it: 6592 – 2083 = 4509.

yes, but there is some difference from the map, then i will use it, when i had finished to program all my tools to get squad info and squad mate info

I made a game tool….Range finder…you put in the real game coords from ingame map for you and your target, or any 2 locations and it spits out the distance…its a small window.exe

For sale, Get it before the other guys do :)

Leave a Reply

Name and email address are required. Your email address will not be published.

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

You may use these HTML tags and attributes:

<a href="" title="" rel=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <pre> <q cite=""> <s> <strike> <strong> 

%d bloggers like this: