Where to start on C# physics

I am new to game development but I wanted to make a 2D playformer using monogame in my spare time. I know a bit of C# but am not super in depth with it. I though a good place to start would be working on the physics for my game and try to get something playable to work off of. I was wondering where I should start with physics and how I should program it into my game.

What kind of game you are exactly making?

If you really need physics, checkout Box2D, Farseer and Chipmunk.
If you are going to make something like Mario or Megaman this should get you started http://xnafan.net/2013/04/simple-platformer-game-in-xna-tutorial-part-one/

A good book:

I have it, just need time to get into it :stuck_out_tongue:

Or try some of the available packages as mentioned already

I really should try getting an affiliate link set up lol

I want to make a platformer like Mario but with more features and states. I want to learn the ins and outs of the physics behind it so I can modify it if I need to

Here’s a tutorial creating physics engine in C++, but it shouldn’t be too hard to follow it in C#.


Still, I don’t think that you need “real” physics for platformer. Physics just make them feel weird, unless it’s puzzle game relying on physics. Start with the tutorial I linked earlier and work from there on. What you really need is way to detect collisions, SAT (Separating Axis Theorem) for example.
Here’s another good link: http://www.realtimerendering.com/intersections.html

1 Like

SAT sounds like a good place to start. Thanks for the help

This is also an awesome series on platformer-physics:

I like using speculative contacts for platformer physics. https://wildbunny.co.uk/blog/2011/03/25/speculative-contacts-an-continuous-collision-engine-approach-part-1/