Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Simple 2d physics tutorial for terrain collision detection [closed]

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.

like image 626
a_m0d Avatar asked Feb 28 '23 15:02

a_m0d


1 Answers

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!

like image 183
Andrew Siemer Avatar answered May 01 '23 23:05

Andrew Siemer