Making A 2d Physics Engine
To start out I want to say I am making a 2D side scrolling video game. The game is coded in C# and the framework is with XNA. I was wondering what is an easy way to make a basic physics engine might be, and where to put it. My experience with XNA isn't to extensive but I know enough to make a game without physics, so naturally the now I wish to add physics (a jump feature that then pulls the player down). My goal is to end up with similar physics to Terraria or Super Mario. Any ideas on where to start? I know I will need at least a vector to pull the player down and another to push the player up, but thats as much as I know..
MyPhysicsLab Documentation. 2D Physics Engine Overview. MyPhysicsLab provides classes to build real-time interactive animated physics simulations. This page gives an introduction to the 2D Rigid Body Physics Engine which is contained in the namespace myphysicslab.lab.engine2D. Contents of this page. Eventually, Build New Games asked me to write an article on physics for video games. Game development is only a hobby – not my profession – so I did the only sensible thing and started building a legitimate physics engine in native JavaScript as research. This article will guide you through the essential physics of game engines. Making a 2D Physics Engine: The Series. This is the fourth article in the Making a 2D Physics Engine Series. If you haven't already read all the articles in the series before this one, I strongly recommend that you take a detour and skim through them.
Tshepang1 Answer
Unless you need the player to push things around and by physics, you mean just jumping, then implementing jumping as in traditional sidescrollers is simple.
You might want to do something like this: Comments font too small word for mac.
Making A 2d Physics Engine For Kids
Of course, you might want to refactor and beautify this code, make the position and velocity changes dependent on seconds elapsed etc.
If you don't know how to implement the collision functions, consider reading up on keywords '2D collision detection' or 'sidescroller/platformer tutorial'.
2d Physics Engine Tutorial
Not the answer you're looking for? Browse other questions tagged c#xnaphysics-engine or ask your own question.
Comments are closed.