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

Used fixed point arithmetic in energy & health #747

Open
Indy2222 opened this issue Sep 26, 2023 · 0 comments
Open

Used fixed point arithmetic in energy & health #747

Indy2222 opened this issue Sep 26, 2023 · 0 comments

Comments

@Indy2222
Copy link
Collaborator

Indy2222 commented Sep 26, 2023

For the sake of determinism: for example float addition is not commutative due to precision issues.

Idea: implement a simple fixed point type in de_types which uses i32 as the storage. Use ~10 bits for fractional part. Ensure that the minimum and maximum representable value is small / large enough for the game purposes.

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

No branches or pull requests

1 participant