Tile map with physics

Oct 5, 2008 at 3:23 PM

hi all..

I have a little question :)

I want to make a tile map and also use physic effects. Do I have to add an extra physic mesh to each tile and to my avatar so that the physic "engine" can work with them?

what i have in mind is creating a tile map with some physical riddles...

Can i also check the collisions with Farseer? Is it useful to make every check of collision with Farseer or is there a better to do it with my own collision detection?



thanks

Coordinator
Oct 5, 2008 at 4:26 PM

When you use Farseer Physics, you will get all you could ever wish for with collision. :)
It contains some very advanced algorithms for detection of collisions. It also has a phase split (broad and narrow phase) so that you only check collision with a minimal number of geometries.

You could create your game with "buildingblocks" that has physics enabled. Then you enable physics on your player character and tadaaa, you have a game.

Take a look at the samples included with Farseer Physics. They are very easy to understand and makes a good foundation for a game design.

If you have any questions regarding Farseer, you are welcome to ask.

Oct 5, 2008 at 5:14 PM
hi
before checking the samples (i have a time problem at the moment :) ) one more question
can i only build blocks (boxes) or also make slope tiles and some "uneven" underground?

thanks in advance..
Coordinator
Oct 5, 2008 at 5:17 PM
All shapes in Farseer is threated as polygons. You have boxes, trianges, circles and every other shape you can think of.
Farseer uses a collection of points that define the outline of your shape. There are some very easy to use factories to help you create rectangles and circles.
Oct 5, 2008 at 5:18 PM
thanks
i will test it tomorrow..

sounds great :)