🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

New stats and another great Google freebie

Published December 12, 2007
Advertisement
I was never completely happy with the Daily Puzzle Statisticalyzer. While it certainly did the job, it seemed to require several steps to do everything. For quite a while I've been wanting something that's a more at-a-glance picture of how well you're playing.
Plus, all people really want to see is their trophy case, so I wanted a way to make that easier to find as well as better presented.
Problem is the charts and graphs. I'm currently using an old Flash chart-library that came with the Macromedia DRK, but it's got some limitations. There are quite a few third-party chart & graph libraries out there that do quite an attractive job of Flash-based charts. The really good ones, though, are expensive, and all I really needed was a reasonable-looking horizontal bar or line-chart.

Once again Google decides to be my friend by opening up the Google Chart API, which is apparently part of the charting part of Google's spreadsheet. It's actually pretty simple, although I found a couple of finicky bits along the way. You just talk to chart.apis.google.com with all of your data in the URL's query string, and Google sends you back a PNG file containing your chart. Try it now. Paste the following code in your address-bar. . .

http://chart.apis.google.com/chart?cht=p3&chd=s:hW&chs=250x100&chl=Hello|World

Cool eh?

Well the API reference shows you all the options you have. Some of the calls are a bit hairy -- for example, I would've liked a way to put markers on an entire curve rather than add markers to each individual point. I never did get that working right.

When I saw how easy it was to do, I realized that this'd be an ideal solution for an updated Statisticalyzer. I could just write up a little PHP that'll build a bigass query string full of your stats-data, and I can slap 'em up.

Here's the new-n-improved statisticalyzer. It hasn't gone live yet because I'll have to change the stats-links in some other code, but you can still play with it.

http://www.thecodezone.com/statomatic_new.php

And yeah I realize that the graphs aren't perfect. I've merged the score and place data into a single graph (labeled along left and right). I have no date labels anymore because it made the graphs really confusing. Frankly, though, I don't think many people care about what day they got their best-ever score in Zombie Kitten Attack. I do now have titles for the images so you can hover over any chart to display your highest, lowest, and best place in any game you've been playing.

Another nicety is that you can make a perma-link to your stats if you wanna bookmark it. Just add your handle to the query-string like http://www.thecodezone.com/statomatic_new.php?handle=civilgrrl (those are Shelly's stats, btw) and you'll be able to show off your trophy case to your pals.

Only other limit I see is that Google shuts me down after 50,000 charts per day. If I'm ever getting that kind of traffic, I'll look into another solution :)
Previous Entry Three things
0 likes 0 comments

Comments

Nobody has left a comment. You can be the first!
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Advertisement