Farseer and double precision

218 views Asked by At

I've been searching around the internet for several hours to find some Farseer implementation which uses double precision, no results. My game is going to have big, open world and I need that precision much.

Where to find such a Farseer implementation or any other Box2D implementation accessible in XNA and Monogame?

For now my options are:

  • Keep on looking
  • Modify Farseer (seems the best, so far)
  • Apply offsets to bodies, so their positions will never exceed the float capacity (this might be problematic, because I could want to have different parts of the world loaded simultaneously - like player 1 and player 2).

Thanks in advance.

1

There are 1 answers

0
Michał On BEST ANSWER

Ok, I edited the Farseer. It seems to work (on the samples attached). It is not exactly double precision - I didn't edit some internal functions of XNA - it is not, strictly speaking, legal :) But if you want, you can actually find these references by "(float)" query after ctrl + F, and create your own implementations for given methods (shouldn't be difficult - 3 or 4 short methods). I edited engine versions for XNA, Mono and XBox, and edited XNA samples.

Here's the link, if somebody needs it: https://dl.dropboxusercontent.com/u/75904715/farseer%20double%20precision.rar