Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade Floats to Doubles #140

Closed
digimbyte opened this issue Oct 4, 2024 · 4 comments
Closed

Upgrade Floats to Doubles #140

digimbyte opened this issue Oct 4, 2024 · 4 comments

Comments

@digimbyte
Copy link

Tested versions

always present

System information

windows 10 - godot 4.3 stable

Issue description

Description:
Current use of 32-bit floats causes precision issues in large-scale calculations, world coordinates, and physics simulations. Switching to 64-bit doubles will solve this, improving accuracy without significantly impacting performance.

Solution:
Migrate critical math, physics, and transform systems to use doubles, allowing for more precise calculations in large environments and complex simulations.

Steps to reproduce

N/A

Minimal reproduction project (MRP)

N/A

@jss2a98aj
Copy link

This what building with precision=double is for unless I am mistaken. There is notable performance overhead among other downsides to it. As such it should only really be used for projects that actually need it.

@PaperPrototype
Copy link

yeah i think godot already supports large worlds with double precision coordinates. AFAIK it should reduce perf by about half (at least for math stuff)

@heavymetalmixer
Copy link

I think using Fixed Point numbers would be better for accuracy matters.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants
@digimbyte @Salvakiya @jss2a98aj @PaperPrototype @heavymetalmixer and others