Mike Chambers

code = joy

Relative performance for collision detection techniques in ActionScript 3

with 17 comments

If you have read my blog any this week, you have probably noticed that I have been doing some basic research on collision detection within the Flash Player. As part of this, I have put together a simple test suite, showing the performance of a couple of different techniques for checking for collision. This is by no means meant to be exhaustive (and currently tilts towards boundary collision). However, I wanted to post the results as the current information is useful (if nothing more than to confirm existing assumptions), and perhaps generate more tests an ideas around collision detection.
Read the rest of this entry »

Written by mikechambers

June 26th, 2009 at 3:28 pm

Posted in General

Tagged with ,

Strategies for optimizing collision detection with BitmapData.hitTest

with 5 comments

Yesterday I blogged about how you can use the BitmapData.hitTest API to do collision detection between the visible parts of multiple DisplayObject instances. This works very well, but as some of the BitmapData apis can be cpu intensive (particularly new BitmapData and BitmapData.draw) you have to take care to make sure that performance does not get out of hand.

This post will discuss a number of approaches for optimizing collision detection when using BitmapData.hitTest.
Read the rest of this entry »

Written by mikechambers

June 25th, 2009 at 11:40 am

Posted in General

Using BitmapData.hitTest for Collision Detection

with 7 comments

The Flash Player contains a number of APIs for handling collision detection within Flash content. The DisplayObject class contains hitTest and hitTestPoint which can be useful if you need to detect bounding box collisions, or detect collisions between an individual point and bounding boxes or shapes.

However, BitmapData also contains a hitTest API, which can check collisions on BitmapData. Where the API really shines, is when you need to detect collisions between the visible areas of DisplayObjects (and not just of their bounding boxes). The API contains functionality for testing collisions between BitmapData and a Point, BitmapData and a Rectangle, and BitmapData and another BitmapData. It is the last item that I will focus on in this post.
Read the rest of this entry »

Written by mikechambers

June 24th, 2009 at 4:56 pm

Posted in General

What new game APIs do you want in the Flash Player?

with 73 comments

I have been learning some game development lately, and building my first game (well, at least my first game since Flash 4). I think game development and deployment are some of the real strengths of the Flash player, but ones which we haven’t specifically focused on in a while.

While working on my game, there were a couple of things I needed to do where additional player APIs could have made the development easier (as well as likely speeding up execution). This got me to thinking about other APIs that would be useful for game development. So, what new Flash Player APIs would you like to see that would make game development easier?

Here are a couple from me:
Read the rest of this entry »

Written by mikechambers

June 16th, 2009 at 12:03 pm

Posted in ActionScript

Tagged with , ,

FlashCamp San Francisco, May 29th : Flex 4, Flash Catalyst, Flex Builder 4

with 11 comments

We have just posted information about FlashCamp San Francisco, a free developer event that we will be holding in the Adobe San Francisco Office on Friday night, May 29th. This will be similar to the ApolloCamp event that we held for the Apollo Beta launch a couple of years ago, although this event will be focused on the next generation of Flex, including Flex 4, Flash Catalyst, and Flex Builder 4.

Register for FlashCamp San Francisco

From the event page:

FlashCamp San Francisco is a free one night event hosted by Adobe covering everything you need to know about getting started with building and designing rich Internet applications (RIAs) with Flex 4, Flex Builder 4 and Flash Catalyst.

Read the rest of this entry »

Written by mikechambers

May 5th, 2009 at 10:41 am

Posted in Conferences, General

Tagged with ,

Kevin Lynch’s Web 2.0 Keynote / Flash Catalyst Demo

with 17 comments

Here is Kevin Lynch’s Keynote from the Web 2.0 conference where he shows how to build a full application using Illustrator, Flash Catalyst, Flex Builder, Flex and the Facebook ActionScript 3 API.
Read the rest of this entry »

Written by mikechambers

April 3rd, 2009 at 10:10 am

Posted in General

Rich Runtime Install Sizes Matrix

with 26 comments

I have put together a table which lists a number of browser based rich client runtimes and their install sizes along with which platforms they are available on and supported.

The runtimes covered include:

  • Adobe Flash Player 10
  • Silverlight 2
  • Silverlight 3 beta
  • JavaFX 1.1.1

I have obtained the information from the runtimes’ websites. The download sizes are based on actual download size, and not the download size stated on the website (there were some discrepancies). Sections that are blank indicate that there is no supported runtime available for that runtime / platform combination.
Read the rest of this entry »

Written by mikechambers

March 30th, 2009 at 10:08 am

Posted in General

Halo 3 iPhone Application : Timetrocity

with 6 comments

Not Flash related, but I wanted to make a quick post and point out a new Halo 3 related iPhone application I have created. It is called Timetrocity and is basically a weapon and item respawn timer for Halo 3.

You can find more information about it here.
Read the rest of this entry »

Written by mikechambers

March 11th, 2009 at 11:19 am

Posted in General

Monitoring File Changes in Adobe AIR

with 17 comments

I have just uploaded a new class to the as3corelib library that makes it easy to monitor files for changes.

The class is called FileMonitor, and is in the com.adobe.air.filesystem package. Here is a simple example of it in use:
Read the rest of this entry »

Written by mikechambers

March 11th, 2009 at 10:54 am

Posted in General

Scripting with ActionScript 3 and Flash CS4

with 4 comments

Written by mikechambers

March 9th, 2009 at 1:41 pm

Posted in General

Tagged with