Flash 2D engine to use to make a Flash Angry Birds clone (to run on mobile)
There are several differ开发者_StackOverflow中文版ent physics engines available for Flash. What would be one you'd recommend to build a catapult (with slingshot) Angry Birds clone -- that will run well on mobile, once packaged via Air?
Has anyone used the World Builder Alchemy port of Box2D vs Box2d For Flash?
Worked on an annoyingly hard slingshot game some time ago(before Angry Birds) called StuntmanJoe and haven't used Box2D, just basic vector maths.
Also, a couple of year ago, did a basic Box2D game called BlockStock. Used the pure as3 port (not the Alchemy one) and for the simple game it worked well.
The World Construction Kit makes it a lot easier to get started with though. Lee Brimelow has a nice little started tutorial.
What I would recommend though is understanding a few basic Box2D concepts like:
- Coordinate system (is different from flash)
- Box2D Body Definitions (b2BodyDef) and Polygon Definitions(b2PolygonDef)
- forces, impulses, joints
With the world construction kit, you can still whip out a demo without knowing much about these, but it will be really useful to understand how Box2D runs a little bit.
The Alchemy port should be slightly(~5/10 frames per second faster, depending on context), but I'm afraid I haven't tried it on mobile yet.
At Flash Camp London I've seen a very basic angry birds like flash demo running on an Android phone and the framerate was above 20fps, which was encouraging. I imagine you should keep in mind the kind of content that runs well on mobiles and a few tricks that should improve the framerate a bit (like cacheAsBitmap and cacheAsMatrix, where possible).
For Android, you can have a look at this LFPUG presentation and get some tips/advices/gotchas.
For iPhone, I wouldn't consider Flash for a responsive Box2D game. I would rather recommend Cocos2D for iPhone than Flash.
HTH
Angry Birds actually uses Box2D as it's physics engine. There's many different versions available - including a native version for mobile development. For the most responsive times, you're probably looking at native.
I've used it myself and not had any problems with it, but if you're looking to package it with AIR for mobile, any framerate issues you're going to encounter are probably to do with Flash itself on the mobile rather than Box2D
Just use Box2D flash http://box2dflash.sourceforge.net/
It's a good port of original Box2D. Plus you can use Quick Box2D to make some routine connected with box2d easier: http://code.google.com/p/quickb2/
精彩评论