简体   繁体   中英

Farseer and double precision

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.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM