Posts Tagged sprite

Unity App Structure from a Flash Perspective

Tags: , ,

Unity apps are structured very strangely. They’re a lot different than Flash or standalone apps and definitely take some time to get used to. Today’s article is an introduction to how a Unity app’s code is structured from the perspective of a Flash developer. It should give a basic understanding of where your code goes and how the basic architecture of a Unity app looks.

Read the rest of this article »

3 Comments

Rendering Spriter Sprites With Starling

Tags: , ,

Spriter is a tool for creating sprite animations out of multiple images. By moving, rotating, and scaling them over a timeline you can create much more efficient 2D animations than traditional full-frame animation. While Flash animation has worked similarly for years, it’s largely incompatible with the Stage3D API that is quickly becoming mandatory to achieve adequate performance. Today’s article will show you how to use Spriter in your Stage3D-powered Flash app via a Starling and some custom classes I’ve created.

Read the rest of this article »

5 Comments

Use Any Sprite As a Stage3D Texture

Tags: , , , , , , ,

Textures are usually simple bitmaps, but what if you wanted to use something more dynamic? How about a SWF you’ve created in Flash Professional? How about a Sprite or MovieClip you’ve created in code? Today’s article will show you how to do just that.

Read the rest of this article »

1 Comment

Stage3D Draw Calls: Part 1

Tags: , , , , ,

There’s no doubt that Flash 11’s new Stage3D API can produce some amazing results by giving us access to the power of the user’s video card/GPU. However, it’d be a mistake to blindly assume that it is always faster than the traditional Flash display list (i.e. Stage). Today’s article begins a series that discusses the topic of “draw calls” and how they heavily impact the performance of your application.

Read the rest of this article »

24 Comments

Simple 2D With Stage3D

Tags: , , , , , , , ,

Along with Flash Player 11’s new Stage3D class have come hardware-accelerated 2D rendering engines. Impressive results have already been demonstrated by advanced engines like Starling and ND2D. Today’s article shows a simple Stage3D-based sprite class to help learn more about how these engines are implemented and provides a simplified alternative to the more complex 2D engines that still delivers hardware-accelerated performance.

Read the rest of this article »

10 Comments

Holding DisplayObjects

Tags: , , , , ,

I recently received an e-mail from asking which is faster: a DisplayObjectContainer or a Vector of DisplayObject. To ask this is to question whether or not we can do better than the Flash Player’s native container of DisplayObjects using AS3. It turns out that we can. Read on for several ways to improve on DisplayObjectContainer‘s speed.

Read the rest of this article »

4 Comments

The Size of Empty

Tags: , , , , , , , , , , , , , , , , , , , , , , , , , , ,

I was reminded about the flash.sampler API by Grant Skinner’s recent post about it. While only available in the debug player, it can still tell us some valuable information about what goes on in the release player. Today I’m using the getSize function to find out how much memory overhead various classes impose, even when they are empty.

Read the rest of this article »

15 Comments

Utility Functions For DisplayObjects

Tags: ,

Hot on the heels of my articles about utility functions for objects and classes, today’s article has a set of utility functions for DisplayObjects.

Read the rest of this article »

10 Comments

Shape vs. Sprite

Tags: , ,

Flash 9 and AS3 provide a lot of nice structure that Flash 8 and AS2 lacked. Instead of just MovieClip and TextField, we have a whole hierarchy of DisplayObject derivatives, including MovieClip and TextField. Most AS3 programmers know that Sprite is a more efficient class than MovieClip and have grown to use them when animation is not required. However, I find that very few AS3 programmers ever use some of the other, more obscure DisplayObject derivatives. Today I’ll talk a little about one of them: Shape.

Read the rest of this article »

19 Comments