This page collects a bunch of videos of 3D real-time (game appropriate) rendering I've done in Flash. I've explored three distinct approaches
to 3D in Flash (which is to say, without a video card, with Flash's performance characteristics, using file sizes less than around a Meg).
They all share some art style similarities, but technologically, they're pretty different.
I will update later with some explicit explanations of some of these rendering techniques. For now, though, I will
say this. Flash, today, is a lousy environment to make an OpenGL-style renderer, by which I mean, if you make a renderer that takes a giant soup of 3d textured triangles (possibly with
some sort of lighting algorithm), transform them by an arbitrary 3D camera, apply a z-buffer, and draw them to the viewing area, with the camera changing orientation and location per frame,
it's going to look like
a haggard version of OpenGL / D3D. This isn't to slight all the developers who have worked really hard going down this road; obviously, given these
constraints they've done some pretty impressive work. Obviously, too, most existing expertise and tool paths are built with such an environment in mind.
But it's not exploring Flash's unique strengths, which do exist.
I've gone a different route to see what I could get Flash to do. The main idea I've started with is this:
Flash has a crazy / fascinating performance profile. Compared to almost any other real-time rendering environment that I'm familiar with, its access to RAM wildly, wildly
outstrips its computational horsepower. For widespread deployment, Flash files have to be almost excruciatingly tiny compared to most other game platforms. On the
other hand, Flash itself functions as a surprisingly robust mini-Photoshop, with a lot of features that make procedural art creation at level load time
a highly doable prospect, and in fact a highly desirable one.
So those have been the core ideas I've started with when exploring the art styles below. I'm not going to say anything I'm doing is a good general purpose
solution to much of anything, especially with the next version of Flash starting to provide GPU access. But these art styles run today, and they run on normal
PCs with reasonable amounts of RAM and CPUs, all with no access to GPUs, and without worrying about the massive performance disparities that can exist between different
GPUs.
Also, an explanation for why I only have video on this page, rather than live code: it's a lot of work to tweak .swf files to prevent decompiling.
The FPS approach
While working on Incarius, in the summer of 2010, I started getting much better at certain ways of making stuff draw really fast in Flash - not any one thing, but
a collection of techniques and ideas.
Springboarding from those techniques, I started a long weekend exploring whether some of those ideas might let me add a lot more depth to backgrounds
in Altar of Isaac, complimenting my existing techniques.
The results were more promising than I had expected, and, leaving my original goals aside, I kept pushing the tests further and further until, several days later,
I had a pretty competent First Person Shooter engine in flash. It's far from perfect, and it's probably in the long run more limited than my Altar of Isaac stuff,
but I'm still pretty proud of it. I have a number of half-completed improvements to it not present in these videos; I think, with some more work,
it's a viable way of making shooters or first person games that lie somewhere between Doom and Quake 1 in terms of their rough visual quality, although the
techniques I'm using are rather far afield from both of those games.
The Altar of Isaac approach
After finishing Sparks and Dust, sometime in mid-2009, I was mulling over what worked well with it and what didn't, technologically. Keeping in mind everything
that I liked about it, from an art perspective, I started from the ground up on a new way to get somewhat similar results but with vastly better performance and
flexibility. After a whole lot of inspired iteration, I came up with the approach that eventually evolved into the techniques at the core of Altar of Isaac.
Compared to Sparks and Dust, this approach has proven to be vastly more versatile, easier to make interesting content for, and substanially higher performing. For example,
the same code can get pretty good results in a top down setting, too.
It's also a pretty reasonable basis for some more stylized rendering approaches, like in this version of Anvil.
This technique still has all sorts of limitations. It is still, after all, an attempt at a kind of 3D in Flash. Nevertheless, it's pretty good looking in a wide range of settings, and the file sizes are appropriately small for normal Flash scenarios; for example, the top down examples are each roughly 64k flash files.
These next two videos were made really early on after I started exploring this technique, so they're even rougher, in some ways. I think they still show off some interesting stuff.
Now I just need to get some games using these techniques out the door.
The Sparks and Dust approach
This is the first real approach I took to get 3D going in Flash. I prototyped this technique over Thanksgiving of 2008 after
finishing Magnesium Gardens, relying on art style ideas from my work with my C# engine. I think it's a cool look, and it was enough to
make Sparks and Dust visually distinctive. Ultimately, though, these techniques were far, far more specific and fragile than my later ones.
The technology was pretty limited in what I could make for levels and game play. Likewise, the performance
was comparatively appalling, enough that it hasn't been worth my while to make a Sparks
and Dust 2 on this code. It was a great testbed for this combination of art style and technology, but the code approach was a dead end.