   2d character physics?
  Hey everyone. There is useful stuff on this site. I wan't to know what I need to learn to get my character to jump, with good looking motion? I'd also like to know how to deal with other aspects of 2d physics.Thanks.   
  What launguage are you using?   ;  c++   ;  The first thing I would do is get a book on the basics of game programming that deals with C++. There is actually a book about starting game prgramming with C++.   I am assuming that you can read c enough to apply the code to c++ so a book that uses c wouldn't hurt either. If you don't want to buy a book there are plenty of tutorials on the web(including on this site) dealing with this. Try looking for a small tutorial that teaches you to program a basic side scroller and you will pick up what you need there. Check out the articles section here for many great tutorials.Hope this helps,-Jake   ;  Ok, I hope I find it. Thanks.   ;Quote:Original post by SuupaBuuI wan't to know what I need to learn to get my character to jump, with good looking motion? I'd also like to know how to deal with other aspects of 2d physics.It depends on how much you know, and how realistic you want it to be? The simplest thing would be to implement simple projectile with gravity, or you could also do it in the linear way.   ;Quote:Original post by alniteThe simplest thing would be to implement simple projectile with gravity, or you could also do it in the linear way.By the linear way you mean finding the start point, the it was fired at, and then calculate the positions along the curve?And by gravity, you would basically set it to go in a straight line after it was fired and then just apply the gravity to it every frame?Just a thought (haven't actually done anything like this myself), but you might want to go with the gravity approach as it will certainly help later on if/when you decide to apply physics to other entities.   ;Quote:Original post by EndarBy the linear way you mean finding the start point, the it was fired at, and then calculate the positions along the curve?No. By linear I meant simply by adding a constant displacement value each frame to simulate jump. Like y += 5. Then after it reaches a certain height, subtract it by the same value y-= 5. Won't be too realistic.Quote:And by gravity, you would basically set it to go in a straight line after it was fired and then just apply the gravity to it every frame?Yes.