views:

2051

answers:

3

Hi, I am looking for a tutorial which will show me how to do simple 2d physics like the ones in this (http://www.teagames.com/games/tgmotocross/play.php). The part that I am most interested in is how the collision detection is done between the character / player and the terrain, as well as how to store / generate the terrain.
The language of the tutorial doesn't matter - I am just interested in how to do this in general.
Many thanks.


EDIT: To clarify, I already know how to perform collision detection between two sprites, and enough physics to write a 2d game - I am looking specifically for a tutorial / example on how to implement the smooth terrain which can be collided with (I understand how destroyable landscapes are done, and I presume that this would be related somehow). Also, I am aware of the N tutorials but that uses discrete shapes whereas I am interested in a smooth landscape.

+3  A: 

I suggest that you take a look at the Farseer Physics Engine which is a 2d engine for .NET written in C#. You can look here for some examples of this package in use. Very easy to use and understand. A great place to get started understanding such things. Also, the people making the product are very easy to get ahold of and chat with if you have questions!

Andrew Siemer
+1 I was going to suggest them but you beat me to it!
RCIX
+1  A: 

I assume that you already:

  1. understand Vectors
  2. understand Physics

Take a look at this.

Nick D
+1  A: 

I have found that this link is somewhat helpful (mostly for a worms type game) - at the bottom it says that if you want to find the normal at the collision point (which would probably be needed to orientate a vehicle correctly) you have to scan the area around the collision point and create a plane for further maths.

a_m0d