Get Updates By E-mail 

gravity

iPhone Game Physics Tutorial: Radial Gravity

  •  
  •  
  •  
  •  
  •  

Physics can be a great way to enhance your game.

The problem is that implementing physics in your game can be extremely challenging, but I found a couple of great examples showing how to enhance an iPhone or iPad game using radial gravity with Box2D.

The examples are from Nick Vellios, and as you can see in the example above they show how to implement radial gravity on an object so that other objects are drawn towards it (much like how planets are drawn to the sun).

The examples include:

How To Add Radial Gravity To Box 2D
Radial Gravity w/ Box2D SOURCE

And a third example on inverse radial gravity (think of objects exploding in all directions)
Bombs With Box 2D and Cocos2D

Cocos2D is used as the rendering engine in the examples.

By the way, can anyone remember the name of the nifty puzzle game that used radial gravity and won numerous indie gaming awards about 12 years ago? (yeah i’m stretching)

Thanks for reading, if you like this please share it!


  •  
  •  
  •  
  •  
  •