Archive for the 'actionscript' Category

From Flash to Unity: My first Unity game – Iron Man Upgraded

Unity has been on my radar for a few years now, but it was only when it was released for PC that I started to get involved. Over the past few months I’ve been working on a number of prototype games, and this is the first game that’s now live. So here we go! It’s called Iron Man Upgraded, and it was produced for Marvel by BAFTA-winning Brighton studio Littleloud.

Play it in your browser now!

Play it in your browser now!

Moving from Flash to Unity has been a fantastic experience, and the one thing that sticks out the most is that it’s so much fun! There’s also a huge wealth of Unity resources on the web, and the community is incredibly helpful. With the choice between JavaScript, C#, and Boo, it’s not difficult to move from making Flash content in ActionScript 3 to producing exciting projects in Unity. Did I mention there’s a free version of Unity? Go and get it. Now!

Unity has to be the hottest technology out there. With version 3 – out in summer – you’ll be able to export for PC, Mac, web, iPhone, iPad, Android, PS3, Wii, 360.. it’s stunning, and it’s a far cry from anything that could be produced in Papervision / Away3D.

Unity has to be the hottest technology out there. With version 3 – out in summer – you’ll be able to export for PC, Mac, web, iPhone, iPad, Android, PS3, Wii, 360.. it’s stunning, and it’s a far cry from anything that could be produced in Papervision / Away3D.

I have a session in a few weeks at FlashBrighton called ‘An Introduction to Unity’, if you’re local it would be great to see you there! I’ll answer any questions I can.
I’ll also be posting tutorials on Unity, on here and – so stay tuned!
Bookmark and Share

Flash Apps for iPhone announced!

Amongst other exciting announcements at the Adobe Max conference they’ve just announced Flash Apps for iPhone!

This is absolutely awesome news – ActionScript programmers can create apps for the iPhone. There’s more information here.

A few questions spring to mind:

  • What will performance be like?
  • Can we take advantage of all the hardware, such as accelerometers, GPS, etc?
  • When can I get my hands on it!?

For a while I’d been saying this was the most logical thing for Adobe to do, but I never thought they’d actually do it..



Funnily enough, all my questions are answered in the Developer FAQ!


The iPhone and iPod touch have processors significantly slower than those found on most desktop PCs and Macs. Thus, content may run slower than it does when running on a desktop personal computer. However, the exact differences will depend on the specific content.

In addition, the hardware specifications vary greatly between different versions of the iPhone and iPod touch. Because of this, it is important that you test your content early and often across all devices which you plan to target.

The hardware that’s supported:

  • MultiTouch
  • Screen Orientation
  • Saving images to Photo Library
  • Accelerometer
  • Geo-location
  • Cut / Copy / Paste

Additionally, we can take advantage of OpenGL ES. This could be extremely important for games!

In order to make development of high-performance applications easier, applications built for the iPhone also can take advantage of an augmented rendering pipeline that uses OpenGL ES. This augmented rendering pipeline enhances the Flash rendering model to allow developers to take advantage of the GPU on iPhones. By enabling this rendering path, you have the ability to modify your display objects to put them on a hardware surface

Flash suddenly got a lot more exciting.

Bookmark and Share

MinimalDesigner – Layout tool for Bit101’s MinimalComps

Keith has released a layout tool for the excellent MinimalComps.


I prefer to write pure AS3 inFlashDevelop, using the Flex SDK to compile. I’ve used MinimalComps on occasion, and I’ve been happy with the results. However when it comes to laying out anything particularly complex, I’ve had to fall back to Flex or CS3.

The release of MinimalDesigner should make using MinimalComps even easier now. Thanks Keith!

Bookmark and Share

AS3 BitmapData.hitTest() with rotation

I saw a tweet from @mesh today, asking about hitTest when one object is rotated. A bit of horrible hackery, and here’s the result. Warning, nasty thrown-together code! ;)

var red:Sprite = new Sprite();;, 0);, 150);,150);,0);

red.x = 40;
red.y = 40;


var green:Sprite = new Sprite();;, 0);, 150);,150);,0);

green.x = 300;
green.y = 40;


var useRotation:Number=10;

var redBmpData = new BitmapData(red.width, red.height, true, 0);

var useDimension:int = Math.ceil(Math.sqrt((green.width * green.width) + (green.height * green.height)));
var diffWidth:int = useDimension - green.width;
var diffHeight:int = useDimension - green.height;
var newBD:BitmapData = new BitmapData(useDimension,useDimension,true,0);
var angle_in_radians:Number = Math.PI * 2 * (useRotation / 360);
var m:Matrix = new Matrix();
m.translate((green.width / 2) * -1, (green.height / 2) * -1);
m.translate(green.width / 2, green.height / 2);
m.translate(diffWidth / 2, diffHeight / 2);
var translatedPoint:Point = m.transformPoint(new Point(0,0));

var greenBmpData = new BitmapData(useDimension,useDimension,true,0);

/*var sampleGreen:Bitmap =new Bitmap(greenBmpData);

stage.addEventListener(MouseEvent.MOUSE_MOVE, onMouseMove);

function onMouseMove(e:MouseEvent):void {
	green.x = mouseX;
	green.y = mouseY;

	if (redBmpData.hitTest(new Point(red.x, red.y),
	new Point(green.x-translatedPoint.x, green.y-translatedPoint.y),

	  )) {
		red.filters = [new GlowFilter()];
	} else {
		red.filters = [];

I’ll blog a better example of this, with comments and an explanation of what it’s doing in the next few days.

Bookmark and Share

Useful stuff: Papervision GUI, AS3 Code Snippet, UML editor, Firefox Plugin

Here’s a few useful things I’ve seen recently. Thought I’d share..


A GUI for Papervision! It looks rather similar to Lightwave, although orders of magnitude less powerful. I’ll be interested to see how this evolves. Could come in handy one day!

Swf Class Explorer

This was a useful utility on a recent project, as there’s no “ApplicationDomain.getAllDefinitions():Array”. Worth bookmarking.

Violet UML Editor

Jon from Unwrong showed me this rather nifty UML editor. Great for drawing quick, simple diagrams. Cross-platform, and free.

Talon: Firefox Plugin

A great plugin for Firefox, which allows you to right-click and capture a page (or region). From there you can upload/share/edit on Aviary, copy to clipboard, or save to desktop.

Bookmark and Share

Fluid Dynamics in Flash

This is one of the most entrancing Flash experiments I’ve ever seen. Eugine Zatepyakin, a Flash Developer in Moscow, has created a rather stunning fluid simulation in AS3.  It’s a fantastic toy, and really quite inspiring. I must take a look through the code when I get some time.

Fluid dynamics

Simply stunning.

It’s based on work by Mehmet Akten, which in turn is based on this paper: Real-Time Fluid Dynamics for Games.

Bookmark and Share

Bow Street Runner up for another award


It just doesn’t stop. The multiple-award-winning Bow Street Runner we made for Channel 4 is up for another award, this time it’s the Broadcast Digital Awards. We’re in the Best Use of Digital Technology category.

The nominees are:

  • BBC iPlayer
  • Bow Street Runner,
  • Current
  • Freesat
  • Mycbbc
  • Obama: The Inauguration, Sky News

Wow. That’s quite some company to have!

Bookmark and Share

Arduino, Wii, Flash, Servos, Lasers, Papervision..

Recently I’ve been getting into all things electronic again. Strangely, I was doing this a year ago

Creating the Shopper 13 game sparked my enthusiasm, and I’ve been gathering new parts to experiment with:
Servos and header pins Making things talk

In addition to that, I’ve also got a Wii Nunchuck hooked up to my Arduino which I’m currently controlling Flash and Servos via the accelerometer and analog joystick. Oh, and a Laser.. and some Papervision too. When I’ve got something interesting, I’ll post it. Hopefully that’ll be in the next few days :)

Well I have to start building my robot army somewhere..

Bookmark and Share

Wallace and Gromit at the Science Museum

I’ve been working on a game for the Wallace and Gromit installation at the Science Museum.

Here’s a photo I took a while back:
My 1337 arcade controller

It was a brilliant project to work on, and one of the most fun things I’ve done for a while. Everyone involved was fantastic, and the exhibition itself looks superb. The game is now installed on a row of consoles and is open to the public. The controls are made from arcade-quality components, and uses a Mini-Pac to talk to the PC via USB.

Here’s a very brief clip of it on BBC News 24 (00:30):

If you’re in the area, do go and check out the exhibition, it’s great!

Bookmark and Share

Papervision experiment #3: 3D colour cube v2

A combination of the last two posts, with a few extra tweaks. This time it produces quite a pleasing blur if you click and hold down.


Bookmark and Share