Farseer Physics awful confusion

I was trying to create a platformer using farseer and it all worked before I started to implement the jump and the gravity. I had to set gravity to 100000 for it to work at least a bit. And all my other variables like movement speed, jump speed, etc. were multiplied by at least 1000 to work just a tiny bit. What is going on with farseer physics? (latest version btw) Can anyone help me please?

I suggest you turn the gravity back to 9.8 (meters/sec/sec) and solve this from a different angle. Always work on KMS (kilogram-Meters-Seconds) when using physics so you have an intuitive understanding of what is going on (too bad if you rise in a country that doesn’t use SI on everyday life :sunglasses: ).
The common mistake is to try and work in pixel units, so a farseer body ends being something like 128x128 meters! At this scale when the body falls it accelerates only ~10 pixels per second. With a sceen of 1080x1200 meters It’s like looking a ball fall from one kilometer away. That’s why you don’t see anything moving.
Also, make sure you pass the gameTime.Elapsed.TotalSeconds to farseer.Step(…)

Give reasonable values to your bodies, a 1.5m-1.8m for a sprite/person, set a resonable density and let farseer set the mass automaticaly, or set a realistic mass of about 50-80kg.
Use a calculator/converter if you are not familiar with Meter/Kilo.
Scale this up to draw your sprites in relation to screen resolution, as a bonus your game now runs of every screen out there , from mobile (800x480) to HD (1080p) & 4K.

oh don’t worry, russians do use SI-system :smile: oh yes, the mistake of 1:1 ratio is the exactly what I have (I tried to avoid all the conversion and stuff) okay, I will definitely try all of this out, thanks a lot!
P.S: scaling to screen resolution isn’t a good idea, imho; I render everything to a render target and then stretch it all over the screen

hell yeah! it worked! great! but there still is one problem, it all is toooo slow, is it a good idea to still multiply variable by, may be, a hundred?

Which variable? Why by a hundred and not by a hundred and forty two? Where this constant comes from?
Farseer is well tested library, used by a lot of games today. Given right input it gives you very accurate results (I don’t suggest it for academic black hole simulations, it is a 2D engine with performance/games in mind). Double check that the values you feed it is correct and the new positions after one step. Then check that the representation of the physics model on the screen is correct.

Double check with this calculator.


Place a body at a height (let’s say 1 meter) and call farseer for one frame (with fixed timestep this would be 0.0166666sec).
The body must move down by ~0.001362m and have a velocity of ~0.16344m/s (or something close to that)

It’s bad idea to adjust physics model to your game and not the other way. First of all you are using a magic number (100) that you have no idea where it come from. This is the kind of coding that will come back to bite you in the future. Second, by scaling one aspect of the world you have to go through your physics book (and farseer code) to see how this affects other variables. If you double distances should you also double or quadruple time, forces, masses?