Sunday, April 12, 2009

Warhawk Leaderboard: Version 2



This is the updated version of the Warhawk stats widget I posted a while ago. It's been through a lot of changes with 2 new modes: Head-2-Head and MyStats which let the user chose which players' data to display. There's also more control over how the data is sorted and which fields are displayed. The data itself can be displayed as text values or as a bar chart.

Although I did all of the coding and design myself, I discussed the design and functionality of the widget with people at Eike Consulting before starting this new version of the widget. One thing that was very important was to ensure that this would run on the Playstation 3. This meant I had to work within the constraints of Flash Player 7. We also anticipated this being downloaded thousands of times each day so I wanted to keep the file size as small as possible. By removing the Accordion component, I ended up with a smaller file than the original version.

The whole widget is built on an extension of the MVC framework I used for the Mystery Clock. This should allow me to easily add new or change existing functionality without breaking the widget.

Wednesday, April 1, 2009

Trace statement finder/remover

Having my actionscript code split across different files for each class is great but it does make it harder to find where rogue trace() statements are coming from.

I made this handy Perl tool to scan through all the .as files in a directory looking for these trace statements. It has three modes:

Find - print a report giving the file and line number of all trace statements
Comment - comment out all of the trace statements in the directory
Remove - remove trace statement lines from the file

It will ignore any previously commented out trace statements. You can download the code from here.