Influxis Flash Media Interactive Server 3.5 Hosting Specialists


Posts Tagged ‘Tamarin’

Project Variant and a question to the community.

Wednesday, September 23rd, 2009

Last week I posted on twitter a link to this vid:

VariantWhat the hell was that?  The most boring music video ever with the music too loud and a bunch of black at the end (sorry, I made that after a long night of coding at the wee hours of 5AM)?

Yeah, pretty much.

Yes, that was Actionscript 3 driving that hardware accelerated 3d engine.  Yes, that was a modified version of the AVM2 or Tamarin VM.  Yes, that was 200 Frames Per Second, with a pretty decent amount of polys.  Now for what it wasn’t:  that was not the flash player rendering that.  The awesome Irrlicht 3d engine was doing all of the heavy lifting on that.

Basically, Tamarin set up the Irrlicht 3d engine to run, which was a successful proof of concept that yes, AS3 could be the scripting language for a 3d engine which could rival Unity 3d.  Awesome!  It also allowed for you to use the Flash Projector to output an executable of your AS3 driven version of Irrlicht, and thus mimics the Adobe Integrated Runtime (a.k.a. AIR) model.  That’s doubly awesome!  Right?

So?  Um, what’s the problem Brosef Stallin?

Have you happened to use Tamarin lately?  If you haven’t. . . let me help you get started:

First link is a pdf explaining what the AVM2 does.

Then build it (note: this is the easiest part).

Then add your own Native Classes to it. Welcome to Manifest/Make file hell.

Or, just use the awesome project Red Tamarin to get yourself up and running.  You should look at Zwetan’s blog as well for some tasty morsels of knowledge (a seriously smart dude).

Other sources of interest on this subject include: RedRocketServer, Campell Anderson’s Blog, and the Mod-Actionscript Project.

So, if you didn’t notice the pattern here, let me spell it out for you.

1.  The AVM2 is in C++, and there is very very very little documentation on it.  The Red Tamarin project does the best job at this point of getting you in to the AVMPLUS and Shell libraries (check the avmcore.cpp and avmcore.h to find some morsels of goodness, and then the src/shell/avmshell.h).

2.  While it was cool that Adobe released the AVM2 to the public, they didn’t release the rest of the Flash Player to you.  It’s like trying to learn how an automobile engine works with just the transmission (I don’t know I’m not a car guy).  You don’t have any access to the display/GUI at all.  It’s almost a dead end.

3.  The only way to compile your .AS code with the avmplus.exe is via the command line open source Flex Compiler.  Which is very scary to a lot of people.  Yeah, I could write a python script or something for you, but it will still not be pretty.  And it would be too much work for all but the most Obsessive Hackers out there.

4.  Did I mention we had to modify the AVM2 for all of this?  So that means this will not work in the Holy Grail. . . the Flash Player.  Although, I could use the QT Framework and bust out a cross platform browser plug in that would run Irrlicht in the browser via your AS3 script.  But that’s a plug in that people have to download!  Gasp!  And then the whole reason for using flash kinda goes out the window right?  We give up the godlike(all together now) Flash Penetration Rate for a 3d engine that can output more then 20,000 polygons without having to jump through hoops of fire.

Now, I’m going to go interactive on you!  Get ready yo. . . a question!

What do you guys think?  Would you like Variant to be built out?  Would you use it if I spent my precious (imagine my adorable family crying right now) time on this?  Could we get someone from Adobe to weigh in on this?  I know that I could build this out for the new version of AIR that is going to be released with a Native Code API.  Do you guys even freakin’ care about high resolution/high framerate 3d in flash?  Would you like a new IDE like Unity 3d but with the option to treat every 3d object like a MovieClip?

Please, feedback is welcome.  Oh, and do you want the .exe example that is shown in the video to play with?

Good night and good luck.

P.S.

If you were interested in the AVM2 and would like to follow Red Tamarin please follow @zwetan

And if you are interested in Red Rocket Server, please follow @campbell

They deserve twitter love, they are awesome.