My 2 Cents on HTML5 vs Flash web Games

I totally agree that HTML5 is a strong choice for web-based gaming in the future, but I believe that’s not the case for the present.

I attended a talk in GDC-Online where the title was:
“Creatively Bypassing the Limitations of HTML5 as a Gaming Platform”. [Available at GDCVault]

HTML5 offers variety of tools for the game development, but as you can guess from the title they are not easily achievable, you have to do some tricks to get them working, could it be for 3D, Shading, WebGL, Audio Streaming and so on and so forth.
In HTML5 era, consistency across browsers is a big concern. When it comes to the details, each browser has different implementation and yet they are doing some experiments; adding and dropping some features and APIs.

Even if we take IE out of the question, there are still some solutions working only with WebKit, or only with Firefox…

Adobe is taking a right choice and pushing both worlds, Flash and HTML5. I think they both will exist for a long time.

Adobe using Adobe AIR is now able to compile native apps for Android and iOS (and windows phone in future). This is amazing.

I have done a test using Three.js for mobile. A simple rotating 3D object, it’s really disappointing. Working on Android for 3-4 FPS and not working on iOS at all.
Instead AIR compiled mobile app of a very similar 3D rotating object, is very smooth on both Android and iOS.

To me HTML5 is very nice, lots of feature and very bright future. But still has to mature (specially as a gaming platform).

Flash is consistent across platforms, and lots of tools for development. Also something else that I wanted to point out is their new Profiling Application “Adobe Scout”, which is an amazing tool to profile your Flash App either on desktop or mobile. Not only frame by frame but also, per movie clip and you can drill down to the point to see what’s taking memory or CPU. This is a big advantage especially for game development. (

As a fan of both, I think each has their own advantages and disadvantages. Just don’t be bias and pick the right one for your needs. Don’t go for what the buzz is.

p.s: Adobe has dropped the XC APIs as a Premium Feature, and now they are available to all the developers and there is no loyalty.
“””As of January 2013, Adobe is no longer classifying the XC APIs as a Premium Feature. The XC APIs are now available as a standard feature without requiring a separate license agreement with Adobe, nor royalties.”””

Associative Arrays in ActionScript 3.0

Sometimes something very simple takes hours of your time just to figure out what’s going wrong.
I was doing a XML parsing and I was trying to save a part of information in a multi-dimensional Associative  Array.

And the problem was so easy that I would never ever guess something has been changed in AS 3.0 , till I stuck in the middle and spend hours to figure out what’s the problem.
A very simplified version of the issue is like this :

var my_arr:Array=new Array();
my_arr['test']    =    'xxx';
trace(my_arr.length); // returns 0

So as you can see, none of the properties and methods of Array won’t work for associative arrays. [refering to Adobe’s help].

Again referring to the same Help document you should use object Class whenever you need something like an Associative  Array.

Hope it will help someone out.

Unlearning is difficult

It has been a long time since I did my last projects in Flash / ActionScrip2.0 [cityofcaspian] & [Toboggan]. And since ActionScript 3.0 came out I hadn’t a chance to go and figure my own way out around it. You know most of the times a good chance would be a real project.

I have been busy mostly with PHP and CodeIgniter for the last 1 year and half. I’ll talk more about them later. But as I was taking the “Advanced Programming Practices” course at school, the professor told us that the project is a simulation of the RISK game and students are allowed to do it in whatever programming language they prefer, having in mind they need to provide certian artifacts to the professor and should improve their programming skills.

While he was telling us about the project requirements, I was totally sure that it could be done perfectly in Flash. But finding team mates with the same interests in a Masters program which  everybody is just blindly fascinated to Java, was so hard. But eventually it was such a great pleasure for me to find some other people who had experiences in Flash before and wanted to do it in Flash/ActionScript.

None of us had any experience in AS3.0, but I suggested as we are going to use ASdoc and ASunit, it’s better to do it in ActionScript3.0 and that would be a great chance for us to learn the new language.

Wow! It’s an amazing language, and it’s far from the old ActionScript2.0 which was simple but having lots of its own problems. Thinking in AS2.0 way but trying to implement it in AS3.0 application just not gonna work out… tons of “compiler errors”! I’m pretty sure if we didn’t know anything about AS2.0 we would have found our ways much faster.

We are finding our ways around after a while, but having the very strict time restriction has left us behind the schedule and what we expected from ourselves.

This ActionScript2.0 VS ActionScript3.0 document helped us alot.