ZH version is available. Content is displayed in original English for accuracy.
Advertisement
Advertisement
⚡ Community Insights
Discussion Sentiment
100% Positive
Analyzed from 288 words in the discussion.
Trending Topics
#point#fixed#floats#deterministic#erin#large#world#cubed#float#slower

Discussion (4 Comments)Read Original on HackerNews
Erin added the cool large world support with double positions, but broadphase and internal solver are in floats still. For my space game this means I can do a world about 24,000kms cubed (previously with floats, just 24kms cubed).
Arguably this is enough, and Box3D with floats + double positions enabled is within 3% of single precision float performance in CPU cost.
So it's PROBABLY not the case that the fixed point implementation has any real benefit, unless 24,000kms cubed is not big enough. It's probably going to land slower than 3% vs. the single precision float implementation.
So this is simultaneously an honest exploration of what would happen if we go fixed point, but also a joke between Erin and I (in good spirits, we are friends) to see how far we can push the fixed point performance :)
Personally, I believe that fixed point is going to land slower than float, but we'll see what the AI comes up with over the next day.
ps. Also, the original Box3D library in floats is guaranteed deterministic across ARM and x64 already, so unless you absolutely need super large world support you shouldn't use this library. :)
cheers
- Glenn
I did kind of expect the loss of SIMD to make it paradoxically slower than the floating point version, I am curious what kind of equivalent integer/fixed-point tricks exist!
> Also, the original Box3D library in floats is guaranteed deterministic across ARM and x64 already
Oh, that rocks!