1

I play a very basic multiplayer flash-applet game @ http://www.haxball.com (check it out!)

Haxball’s match Replay files can be recorded by users in-game, and saved to disk as “.hbr” files. These Replay files can later be viewed by loading the .hbr replay file directly in the haxball.com interface, or by uploading the .hbr file publicly to a third-party service like "haxballtube.com"

My goal is to launch a third-party web-service which will allow users to upload haxball match replay files (.hbr), which will then be analyzed – with meaningful “match statistics” (goals, shots on net, possession %, etc.) extracted from the uploaded replay file, summarized, and reported back to the user.

A GREAT example with similar functionality can be seen here: http://www.playwithanton.ru/haxball/stat/ (to test functionality - you will need to either load or link to a haxball game replay file (.hbr) to analyze and to generate statistics from. I will provide links to an example replay file below - as part of the discussion)

Does anybody have any idea how the above example may have been created?

I do not have any real programming experience – I am hoping some helpful person can point me in the right direction regarding how I might be able to extract data and meaningful statistics from these .hbr files, and how I might produce something similar to the above example. My primary goal is to see this project to completion, and hopefully to learn some programming along the way.

Thanks for reading - any input/direction is MUCH appreciated!

  • **NOTE**: To use the linked example above, you will need a haxball replay file (.hbr) to analyze. You can either record/save your own replay at haxball.com, or use the replay I've provided below: [DOWNLOAD LINK for replay file - .hbr format](http://www.2shared.com/file/NY00ZZE8/2013-02-05-replay.html) OR [HAXBALLTUBE.com link of game replay - generated from above hbr file](http://www.haxballtube.com/watch/c5513edcc4) – Patrice Riarq Mar 02 '13 at 19:41
  • 1
    It's some binary format, nothing easy like xml or json. Best bet would be to decompile the game's swf and analyze the source code to determine how this data's generated/saved (could be AMF i guess). Legal issues may apply and this is a task ill-suited for a non-programmer (source may be obfuscated, etc.). Good luck. – Torious Mar 03 '13 at 01:02
  • Thank you so much for your response - I wish there was some way to give you a +1 or thumbs up, or something. I have already tried decompiling both the game and the above example's (stat analyzer) swf files, and the output is pretty daunting for someone like me. Can you think of what I should start reading up on, or where I could start to tackle an issue like this? – Patrice Riarq Mar 03 '13 at 01:52
  • 1
    In the decompiled code, look for uses of [ByteArray](http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/utils/ByteArray.html), but be aware it can be saved in other ways as well, so that might be a dead end. Not sure what else to tell you; learn programming? :) – Torious Mar 03 '13 at 07:53

1 Answers1

0

This is a nice idea. You will have a lot of problems to decompile the code and get the results of the game from the hbr because it may not contain the "Goal Scored" event. It may contain simple events: up, down, left right.

I have been playing for a while Bilu Ball which is exactly like haxball. The only difference is that it will keep track of all the games a player player ( the have accounts, something haxball will never have ) and track games player, score, goals and other stuff.

So I guess it is better to wait for Bilu Ball to implement leagues, teams and leader boards instead of wasting time with haxball.