XNA C# 2D Platformer Game

大兔子大兔子 提交于 2019-12-03 04:13:42

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.

You probably need a bit more than collision detection for a game like Braid. I would assume that you also need a physics engine. I would recommend that you take a look at Farseer Physics engine, which is 2D engine that works very well with XNA. It supports a number of different techniques for collision detection.

Have you checked the examples in the collision serie on the XNA creators club, in particular the pixel-collision sample?

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!