Archive for category AS3

AS3 vs. JavaScript Performance Followup (November 2013)

Tags: ,

It’s been about seven months since my last test of AS3 versus JavaScript and there have been several major releases of both browsers and the Flash Player. Today, we pit every major browser against each other and Flash Player itself to get an updated picture of which provides the fastest scripting environment on the web.

Read the rest of this article »

11 Comments

Send ActionScript Worker Messages 6x Faster With Mutex

Tags: , ,

While ActionScript Workers made their debut in Flash Player 11.4, the Mutex class didn’t arrive until the next version: 11.5. This class is specifically designed to solve a subtle problem that cropped up in the last article. As you’ll see in this article, it does the job quite well! The result is even faster message passing between workers/threads, which is often key to efficiently using multiple core CPUs.

Read the rest of this article »

9 Comments

Send ActionScript Worker Messages 2.5x Faster

Tags: , , ,

We know that sending messages between ActionScript workers is slow, but how can we make it faster? Today’s article discusses an alternative approach to message passing that yields a 2.5x speedup. Read on to learn about the approach and un-block your workers.

Read the rest of this article »

13 Comments

HTML5 Browser Support: October 2013

Tags: ,

Like it or not, HTML5 is all the rage these days. It seems like everyone, everywhere is talking about the “death of Flash” and the triumphant rise of HTML5 in its place. Many developers who would have used Flash are now considering building on top of HTML5 features like the <canvas> tag. This got me wondering: how well supported are these features across desktop and mobile browsers? I couldn’t find any existing stats on this, so today’s article is my own report. If you write your game in HTML5, what percentage of users will be able to see it? Read on for the answers.

Read the rest of this article »

8 Comments

ActionScript Workers Tutorial

Tags: ,

ActionScript workers add threading to AS3 so that you can take advantage of today’s multi-core CPUs. I’ve written a couple of articles about them so far, but skipped over the basics of actually setting them up and using them. This is surprisingly tricky! Read on for a crash course on how to use workers to speed up your app.

Read the rest of this article »

25 Comments

Easy Worker Communication With MessageComm

Tags: , ,

ActionScript Workers are great, but they can be tricky to set up and especially debug. Today I’m introducing a couple of helper classes to take some of the pain out of communicating between threads. Read on for the helper class source code (MIT licensed) and an example app that uses it.

Read the rest of this article »

4 Comments

ActionScript Worker Message Passing is Slow

Tags: , ,

Since Flash Player 11.4 was released we have finally been given the ability to run multiple threads of AS3 code to take advantage of modern multi-core CPUs. However, when we start writing this multi-threaded code we immediately run into the requirement to coordinate the threads by passing messages between them. As it turns out, this is quite slow in AS3. Read on for the performance analysis.

Read the rest of this article »

8 Comments

From DisplayObject to Stage3D Texture

Tags: , ,

Flash makes it pretty easy to use any DisplayObject as a Stage3D texture. This is a great feature since you can use powerful, traditional classes like MovieClip, Sprite, TextField, and Shape to build a texture—often with vector graphics—and then use Stage3D‘s GPU hardware acceleration to render them with maximum performance. But this path is fraught with subtle problems, any one of which could result in poor rendering quality that’s quite hard to debug. Today’s article takes you through the process step by step to make sure you end up with great results.

Read the rest of this article »

1 Comment

Reduce AMF Bloat With AMFObjectPooler

Tags: , , , ,

AMF is great for serializing AS3 objects. Its compact binary format is far more efficient than XML or JSON and it’s just as easy to use: just call writeObject or readObject. However, there are many ways to make it even more efficient. Today’s article presents one more way that eliminates some overhead you might not have thought out. Read on to learn more and for a helper class that will enable you to avoid it.

Read the rest of this article »

2 Comments

How To Shrink Field Names in AMF Data

Tags: , , , , , ,

To save precious bandwidth, keeping your AMF data size small is crucial. By default, AMF has a tendency to create bloated data sizes. In the last article, I showed a way to shrink your class names to a single character when stored in AMF data. Today I’ll show a you a trick to shrink your class field names to a single character. Read on to find out how.

Read the rest of this article »

2 Comments