4
votes
1answer
533 views

Collision Filtering in Box2D

I have four bodies in my Box2D World. Each are polygon shape, with some physics parameters. Now when the game start, I need one of the bodies from the World (BodyA) to not be allowed to collide with ...
-1
votes
1answer
214 views

Parallax With Box2d iphone

I am creating the simple game. In that game car will move and obstacles will come in the car way we will have to save that car from that obstacles. What I have done. I have created the car with the ...
1
vote
1answer
402 views

Cocos2d: Using single timer/scheduler for multiple sprites

want to know if is it possible to use single timer or scheduler method for multiple sprites ? Like I am now working on a game and there could be any number of sprites and i want to perform some ...
-2
votes
1answer
2k views

How change the size of sprite in cocos2d?

I want to change the scale of sprite like a paper in 'Paper Toss' game. 'Paper Toss' is the game is available on the App store. I want to make a sprite like a paper and change the scale of sprite ...
1
vote
1answer
553 views

How make a laser path prediction line like a “slingshot cowboy” game?

How so I make a laser path prediction line like a “slingshot cowboy” game in cocos2d or box2d and select the target like "slingshot cowboy" game.
1
vote
1answer
291 views

How do I identify a collision with a specific body?

How can I identify when the ground body collides with another b2Body? I can use b2ContactListener to be notified of collision events, but how do I tell which bodies collided?
1
vote
0answers
248 views

Design pattern for procedural terrain assets

I'm developing a procedural terrain class at the moment and am stuck on the correct design pattern. The terrain is 2D and is constructed from a series of (x,y) points. I currently have a method that ...
2
votes
2answers
236 views

Moving 2d camera in the y direction

I'm developing a simple game for the iphone and am struggling to work out the best way for the camera to follow the main character. The following picture hightlights the three main components: ...
0
votes
2answers
1k views

Constant rotation of a revolute joint in box2d

I would like to have a line with one end attached to a location and have it rotate constantly (with the same speed) with a maximum of 45 to -45 degrees (i.e. I would like to have it swing like a rope ...
2
votes
2answers
755 views

Efficient Bullet Firing Class

I've been struggling with this for a while. I have been trying to create a bullet pool class for a game I have made that doesn't cause a significant fps drop. I have tried creating a bullet pool ...
5
votes
4answers
1k views

How to port a game from IPad to Iphone [closed]

I just finished developing a 2D side scroll game for the IPad using Cocos2d and Box2d. Now we want to make an IPhone 4 version of the game, but I'm still not sure what is the best way to do it. I ...
1
vote
0answers
174 views

Which is the best model to present the destruction of the building in Box2D? [closed]

We'd like to create a "world-destruction" game. The problem is in choosing the best model for building destruction. On my mind the building would be an array of objects( tiles). Each object would ...
2
votes
1answer
1k views

2D physics performance on iPhone/Android using Unity 3D?

I've been looking into making 2D games with Unity. One thing which concerns me is the performance of the physics engine. Since Unity is a 3D game engine I'm going to have to assume it uses a 3D ...
1
vote
1answer
559 views

What's the difference with how Box2D and Farseer behave in terms of collisions?

I've ported my engine to iOS and have been using the C++ version of Box2D. Everything runs fine except on collisions, it seems Box2D and Farseer handle collisions somewhat differently. Anyone know ...
1
vote
1answer
582 views

Dynamic bodies with Parallax Scrolling

I have an object that has a dynamic body. Currently, I'm setting it's position to follow the sprite when the parallax layer move. After a certain event, the object suppose to fall to the ground. ...
3
votes
1answer
747 views

shake / Vibrate a body in box2d?

How do you vibrate or cause a shake effect to a body of type static or dynamic or kinematic. I tried applying forces to a dynamic body in the timeStep, which did not work, as well I tried ...
0
votes
2answers
238 views

Slow motion of a spherical object on an blunt slant obstacle

In cocos2d environment and box2D when an spherical object falls on a blunt slant obstacle, it moves really slowly, that's nauseating, if you have coded to not to have any interaction with world while ...
-1
votes
1answer
290 views

Is it any good to make play game in zoom condition?

I'm developing a game with large obstacle and sprites(in cocos2d+box2d for iPhone), then after zooming out my sprites and layer (by increasing cameraZ), I make my game to play by user, which causes ...
1
vote
2answers
1k views

Looking for the reference tutorials for the joints in the Box2D for iphone

I can't find the tutorials of joints class in the Box2D for iPhone. I am unable to run a Testbed for iPhone Box2D. (void)ccTouchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { if ...
1
vote
1answer
246 views

Mouse joint isn't restricting the ball from going to the other part of the screen

I'm developing a application in cocos2d using the Box2D framework, but unfortunately I am having issues. I'm not able to restrict the orange ball in the half screen area, taking the image below as ...
3
votes
2answers
3k views

Getting started with Box2D for iOS

I just want to run any Box2D "Hello World" or test apps. I've downloaded the source twice (zip file the first time and via svn the second time), followed the build instructions (do stuff w/ cmake, ...
3
votes
1answer
1k views

How do you create your levels containing curved slopes in Box2d?

I have just started developing games for iPhone in Cocos2d and am currently working on a Box2D prototype. I know this is not an easy start, but I have experience in the AS3 port of the physics engine. ...