2

I am newbie with Cocos 2D, Chipmunk and Box 2D.

I have started basic docs and started to develop games.

Currently I am working with chipmunk.

I stuck at few points And they are as follow.

In my application, there is a player Who kick the soccer ball and ball will move to distance according to force applied by kick of player.

I am confused for ..

  • How do I make players whole body static and can make his one lag moveable to let it kick the ball.

  • How do I calculate force and vector and distance etc.

  • How do i move to next screen if my ball goes to out of current screen.

Please let me know the url from which I can easily get all type of examples for chipmunk application.

Paul R
  • 208,748
  • 37
  • 389
  • 560
Arun Thakkar
  • 301
  • 5
  • 15

1 Answers1

2

First off, you should learn chipmunk first and then try to solve your problem. I see a lot of people just wanting their problem to go away without actually making an effort to solve it. Here's some google results on Chipmunk tutorials.

https://www.google.co.cr/webhp?sourceid=chrome-instant&ix=sea&ie=UTF-8&ion=1#sclient=psy-ab&hl=en&site=webhp&source=hp&q=chipmunk%20tutorials&oq=&aq=&aqi=&aql=&gs_l=&pbx=1&fp=37838802d5e34660&ix=sea&ion=1&bav=on.2,or.r_gc.r_pw.,cf.osb&biw=1680&bih=882

About the 3 questions:

  1. If you learn chipmunk or box2d, you can easily go and test different settings, from static bodys to joints to density. Depending on what you want to do, the solution differs. I suggest you look into that.

  2. You can use several functions on each body you register. For box2d, youd use body->getAngle(), body->getLinearVelocity(), and body->getPosition(). With these 3 functions you can calculater force, vector and distance from every object. Im pretty sure chipmunk has something like this.

  3. Really?? PSEUDOCODE: if (ball.position OUTSIDE screen.bounds) nextLEVEL();

Andres C
  • 919
  • 7
  • 14