MacWorld AS2/AS3 Speed Comparision Demo
|This past Monday, we had the privilege of having a Papervision3D demo shown as an AS2/AS3 speed comparison at FlashForward/Macworld expo by Grant Skinner and apparently, it went really well. Grant likes to give lots of notice with things like this (4 days?) and well, I just happened to be working on a space demo for Paperworld game engine we’re all cookin’ up over at the PV3D list.
Basically, they needed to find a sample of something showing a stark contrast between Actionscript2 and Actionscript3 and they needed it to be visually stunning. Well, I’d seen the differences myself, but I had no idea *how* well it would perform with many models in a scene. So, I told Grant to give me an evening, run some tests to make sure it’s what he’d be looking for. I spent the next 8 hrs, and a good half of the weekend with my jaw on the floor at the performance – I couldnt’ stop starring at it. I’d been waiting 8yrs+ to see Flash do, what I was seeing it do – I still can’t hardly believe it!
The first test was to put the Xwing model (949 faces) into an as2 container and see how it performed. It stayed around 2-8fps on average and rotating it was a joke. Very klunky to say the least. So, I figured if AS3 could smoothly render the xwing with a star field and a death star in the back ground, that’d be a sweet demo. What I ended up with was 100x’s better than I could have imagined. I can’t really take credit for the end result – Grant pretty well had an idea of what he thought would be a good demo and that’s how you see what you see 😉
7 Xwings, 7 Ties, Death Star, Endor and a fully rendered star field in PV3D and it ran at a staggering 26-30fps on my laptop 😉 Yeah, we had a good contrast demo. Then I attached a TargetCamera to the ships as a follow cam and made the ships clickable so you could jump from ship to ship and follow along as they flew back and forth and I finally realized – Flash doesn’t look like flash anymore 🙂
Also note, that while there is some image skewing of objects as they go away from center, that’s in no way a limitation of Papervision3D. On the contrary, that shows you the control you actually have over focus and zoom of the camera object. I just ran out of time to play with it and get it right.
View it online – BUT GO FULLSCREEN – it seems to play better at fullscreen. Just click the bottom right button in the corner.
Download the files from the link below and play around with it. On just about eveyrone’s system that’s tried the demo, it’s run between 15-30fps.
Falcon3D.swf – click and drag around the scene to move the camera view
AS2 – 949 Faces :: 2-8fps
AS3 – 8107 Faces :: 20-30fps