Sign in to follow this  

2D Collisions and Physics

This topic is 3860 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Are there any good, free 2d physics and collision-response engines out there for C#? I'm looking to start my next game in XNA soon, and 2d physics are a must. I've seen the Farseer engine, but it seems rather incomplete at the moment. Wrapping an engine that was made for a different language is also an option for me, I have plenty of time for this project. On another note... would it be hard to create my own 2d physics engine? My math skills are decent, but I'm not sure how I would go about creating it. For my game, I am aiming for Breakquest-ish physics (www.nurium.com). All suggestions and advice are welcome.

Share this post


Link to post
Share on other sites
from personnal experience, it should be feasable to write your own. I've got demoes, if only I could access my webspace... :/

Share this post


Link to post
Share on other sites
Do you know of any tutorials, books, or articles that could help me get started?

Demos would be great. Unfortunately, after I downloaded one from your website, I now get "The web site you are trying to access has exceeded its allocated data transfer" when I try to download a second one.

Thanks for the response.

Share this post


Link to post
Share on other sites
If you enjoy this type of thing, check out N Tutorials' collision detection and response page. It provides a fantastic way to really understand what's happening. It skimps out a bit on the math side, but there's already more than enough info out on the web about vectors.

Or, you could use a 3D engine. They're pretty easy to get working in just 2D with no real performance issues. That's what I'm doing for my game. I just set forces, velocities, and positions to have no z component (or no x and y component for rotation and torques) every frame. No issues.

Share this post


Link to post
Share on other sites
I haven't tried it, but you might want to look at Physics2D.Net.

As for engines NOT in C#, there's Erin Catto's Box2D. Considering the fact that it only handles boxes, it's pretty impressive that it's been shown at GDC twice.

And inspired by Box2D, we also have Chipmunk. Chipmunk is written for the mac, but the videos are worth taking a look at :D

Hope this helps.

I found these at gphysics.com

- edit -

Hi, Oliii.

Share this post


Link to post
Share on other sites
I think you'd be best trying a 3rd party engine. Getting into the physics / collision will take lots of your time.

still can't access my webspace... maybe too much traffic.

Share this post


Link to post
Share on other sites
Here's a little discussion about sphere / box collision. And also collision response with rigid body dynamics, all in one code block.

http://www.gamedev.net/community/forums/topic.asp?topic_id=440708

It's based on Chris Hecker's physics tutorials, and a simple intersection detection algo.

another discussion talking about the swept SAT, more precise collision test.

http://www.gamedev.net/community/forums/topic.asp?topic_id=346956

It's based on this tutorial for polygon intersection detection

http://www.harveycartel.org/metanet/tutorials.html

Share this post


Link to post
Share on other sites

This topic is 3860 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this