UPDATE: Source code supplied at the bottom of the post.
Today I’ve been working with Ely Greenfield the author of the M2D framework that taps in Molehill, the GPU acceleration for Flash that’s currently in beta. I used Tom Krcha’s fork of Ely’s code to setup my scenes.
Wow. Wow, wow, and WOW.
I initially set up a basic rendering of LOTS of objects that move to see what the engine could handle. Then I added rotation, alpha and velocity and even animated sprite sheets. Ely updated the core framework, sending me updates and instructed me on how to set up the animations.
Here’s a video showing the results:
M2D tests from Terry Paton on Vimeo.
So what do I think?
- These tests are not games, they are barely indicative of some animation techniques and data handling used in games. But by testing these to the extreme – 5,000+ objects at once – we get a good indication of what can be achieved.
- Although molehill’s going to mean some amazing things for Flash 3D gaming, I think it’s going to have a huge impact of what we can achieve in 2D gaming as well. I heart 2D.
- The performance of these tests well outperform what I have achieved in my own blitting engine, which I had either rotation OR alpha but not both – due to the amount of memory and handling I had to do to create the blits. M2D is handling this very well. This engine is still very much in development and giving Ely real test cases to optimise has meant great performance improvements already.
- There is still a lot of work to be done, many types and sizes of sprites need to be tested together, along with post processing of effects over the top (like the rippling water effect I’m using in my Deep Sea Diver 2 game).
Check out these links for more about M2D:
http://www.flashrealtime.com/m2d/
http://www.quietlyscheming.com/blog/2011/03/24/m2d-flash-molehill-based-2d-library-updated/
https://github.com/egreenfield/M2D
UPDATE: Here’s the source code to the tests I made in the video. I’m not putting any help with how to set them up so you have to know what your doing. They are Flash Builder projects.
Please leave a comment if you try them ![]()
http://www.pixelpaton.com/download/M2DTests.zip
