开发者

Is Box2D the best solution for my iphone game scenario?

I'm planning to build a basic rebound iOS game in Cocos2D. Will Box2D be best suited for the following scenario?

The layout will consist of a target at the top of the screen, with obsticles in the middle of the screen, blocking direct view of the target from the bottom. The user will shoot a b开发者_如何学Call from the bottom of the screen by rebounding it of the sides and around the obsticles, aspiring to hit the target. Similar to a breakout style of game.

As the game levels progress, the obsticles will be moving dynamically, left to right and back, up and down etc..

I understand that the collision detection can be achieved using Cocos2D alone. Can the rebounding and trajectory of the ball off obsticles and walls also be achieved without using a physics engine?

I will have no need for gravity in the game scenario. A reduction in the velocity/speed of the ball will be essential.

Please note, I am new to iOS dev, coming from a background in front-end web dev.

Advise and help much appreciated.

Thanks


You certainly can do all that without using an existing physics engine. Once you start doing collisions with moving objects and objects of different shapes, though, it starts to become advantageous to use an out of the box solution.

It's easy to setup box2d without gravity and it will give you all of the collision calculations and velocity stuff

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜