How To Create Classes in ECMA5 in CreateJS Style

Currently there is a lot of hype put on ECMA6. ECMA6 is a big improvement which makes many of the old methods obsolete. However, at this stage if you want to develop html5 games it’s hard to find a stable html5 game framework which allows smooth development using ECMA6. ECMA5… Read more »

Generating Bitmap Images On The Fly For Canvas in Javascript

When we develop games or different tools we have to generate images on the fly or to alter existing images. In plain javascript we don’t have an existing Bitmap class and we don’t really need it. We have to perform the following operations: Let’s start creating a canvas object. We can create directly in… Read more »

Aeroplane Shooting Game Tutorial – Shooting Bullets

In this tutorial we are adding the functionality to make the player plane to shoot bullets. The easiest way would be to shoot a bullet each time the player press the fire button. A little more elaborate method is to shoot bullets when the fire button is down and to… Read more »

Aeroplane Shooting Game Tutorial – Player Movement

  This is the first part from the aeroplane shooting game tutorial. Here are the other sections: 1. Player Movement 2. Shooting Bullets 3. Adding Enemies 4. Collisions 5. Scoring and HUD. 1. Player Movement 1.1. Adding The Player Plane. From the beginning in an aeroplane shooting game we need… Read more »

Importing Spritesheets in Flash to Export them as MovieClips in SWC Libraries

There are several reasons we might have to export resources from flash: to create libraries to reuse them in other flash projects to use Flash Builder or Flash Develop for writing code and Flash to create graphical assets to use swc libraries in haxe projects Lets take the following sprite:

Center/Align Vertically Text in a TextField Control

Depending whether you are using the classic TextField control and the TLFTextField newly introduced in Flash 10, you can choose one of the following options:

If we are using an TLFTextField instead of the classic TextField, it’s getting easier, because we have the vertical align feature implemented by the… Read more »

Shuffle/Randomize Array/Vector in AS3

As3 Array/Vector classes don’t provide an implemented method to shuffle/randomize them. However, that’s not a hard task to do and there are quite a few methods to implement such an algorithm. One of the easiest methods is called Fisher-Yates shuffle. Probably it’s not the fastest way to shuffle an array,… Read more »