13. ‘Library Search Path’ checkpoint !

We usually include 3rd party library files (.a) by drag and drop or by Adding new file in Xcode Document directory window,  when they are moved to new folders when we update to latest library files, we normally delete the old one and add the new one.

There is one glitch here i.e. Xcode’s ‘Library Search Path’ setting under Target’s build setting still points to old location, which leads to wrong product. Since it will take the library folder (.a) file from old location only even though you have added new library file (.a) in your project.

To fix this issue, just remove the old location from ‘Library Search Path’ and you are good to go…

4. iPhone Physics Engine Library

We have open source Chipmunk library to implement physics engine in iPhone gaming apps.
Here is the source

This source is the powerful physics 2D engine to use in iPhone game programming. We can have every motion of any real world object in whatever place it is. We can add gravity, friction, external force which will reflect in the motion of the object. And also we can have collision detection between objects present in the current screen.

The source is self explanatory, but I have summarized the usage of this api for handy use and i’ll keep updating this as far as I explore.

rigid bodies: A rigid body holds the physical properties of an object. (mass, position, rotation, velocity, etc.) It does not have a shape by itself. If you’ve done physics with particles before, rigid bodies differ mostly in that they are able to rotate.
collision shapes: By attaching shapes to bodies, you can define the a body’s shape. You can attach many shapes to a single body to define a complex shape, or none if it doesn’t require a shape.
joints: You can attach joints between two bodies to constrain their behavior.
spaces: Spaces are the basic simulation unit in Chipmunk. You add bodies, shapes and joints to a space, and then update the space as a whole.

Please let me know if you want further explanations.