I'm trying to make (figure out how to..) a 2d platformer in XNA.
I know how to create a tile grid and how to perform collision detection. I perform collision detection on the 9 bounding tiles of the player, but I'd like to know if there's a better way to perform collision detection.
I've read Braid doesn't use tiles but pieced images or something, how do you perform collision detection on those? and is that better than using tiles?
Assuming you don't mind using a third party tool to do the majority of the work for you, you may be better off using something like Box2D for C#.
http://www.box2d.org/ http://code.google.com/p/box2dx/
This library will give you collision detection and physics capabilities.
If you're going for a retro style then it's certainly fine to use tiles! However, if you want something more "modern", then you can go with a more conventional physics engine. Farseer Physics is a great engine, and several people have used it to make platformers. It's based on Box2D and similar engines, but offers a simpler API and several unique features (like texture to geometry) and i myself can testify to it's niceness having played around with it a bit.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With