Thursday, April 2, 2009

Ninjasawus Is In The House

Our illustrator rocks! While I was experiencing the joy that is crunch-time , she was kind hearted enough to whip up my alternate persona.



Behold Ninjasawus - Master of inaccurate estimates and purveyor of optimism.

Tuesday, March 17, 2009

SWFObject , Firefox, and Blank Screens - Oh My!

Well I had a RTFM moment when my Firefox 3 browser recently stopped displaying my flash application a.k.a Blank Screen Syndrome.



I was using the following dynamic technique with SWFObject 2.1 with the width and height set to 100%.

<script type="text/javascript">
swfobject.embedSWF("myContent.swf", "myContent", "100%",
"100%", "9.0.0");
</script>

I won’t bore you with the weird and wonderful solutions attempted and failed through a particularly frustration few hours – none of which I will ever get back.

As a last resort I poured through the documentation with a desperate vigour and turned up this little gem:

because Firefox in standards compliant mode interprets percentages in a very strict way (to be precise: the percentage of the height of its parent container, which has to be set explicitly):

<style type="text/css" media="screen">
html, body, #containerA, #containerB { height:100%; }
body { margin:0; padding:0; overflow:hidden; }
</style>

Suffice it to say this fixes the no show <ahem> “bug” in Firefox 3.

In a rather poor sportsman like manner I will point out that this little titbit is not in the Documentation section of the wiki but rather the FAQ. The fix is also conspicuously absent from the sample code downloaded with the installation and even the fancy (and extremely convenient) SWFfObject Generator does not create these styles.

Stay tuned for more glorious RTFM moments.

Tuesday, February 3, 2009

ActionScript Logging

Logging: The practice of recording sequential data, often chronologically.

Personally I find it as exciting as watching a rugby match when only one team turns up to play - but every project I've worked on needed it; usually to assuage the otherwise painfully lengthy process of tracking down bugs in production code.

With my current Flash game project the need for moving beyond the trace command in the Flex Builder 3 debugger hit when I needed to test multiple players interacting on the same server.

As you can imagine the constraining of my enthusiasm for such a task was a herculean effort but somehow I managed to curb my impulse to roll my own logging solution. In fact my desperate and frenzied scouring of the open source AS3 logging solutions turned up a couple of notable contenders.

I was fist enamored with ThunderboltAS3 and its integration with Firebug; a rockin’ Firefox extension that I never leave home without. Alas Firefox is not the only browser I need to test on and the Thunderbolt console poo-pooed on Windows XP.


Fortunately I ran across Arthropod by Carl Calderon.


This little gem fits all my rudimentary criteria:
  • Has its own logging console.
  • Has colour coding.
  • ActionScript 3.0 – no flex framework needed.
  • Runs on Windows XP
All-in-all I’m pretty happy with it after a week of use and it allows me to move on to my next conundrum.

Tuesday, January 27, 2009

Flash Beginnings

So the boss comes to me and said:

We can make a multiplayer game for kids. With dinosaurs. In Flash.


You can imagine what went racing through my mind.




You have to understand I'm an ASP.Net programmer. I work on enterprise business software. But who am I to complain at a dream chance to finally make a game - how hard can it be right....right?

So we're two months into the project and I've finally decided on the technology stack:

FB (Flex Builder 3) for the IDE - I tried several but was most comfortable with this. Within FB I'm building an AS3 (ActionScript 3.0) only project. I didn't realise at the time how many headaches this would cause. For some strange reason a flex project is the standard manoeuvre in FB...daaaah. Apparently there’s an extra compiler pre-processing stage with flex projects...who knew. But I'm writing a game here folks, and I don't envision a huge amount of textual forms in it.

Server-side we have WebORB for .NET as the game server which allows me to leverage my current skill set with IIS and c#. The other servers out there of interest (SmartFox Server and ElectroServer) were java based and I have my hands full trying to grok AS3.

As for a database I've decided on Microsoft SQL Server (probably 2008 by the time we roll) fronted by web services - again using existing arrows in my technology quiver.

Stay tuned for more adventures in AS3...