• This project
    • Loading...
  • Sign in

tome / Tales of MajEyal · Merge Requests

GitLab

  • Go to group
  • Project
  • Activity
  • Files
  • Commits
  • Builds 0
  • Graphs
  • Milestones
  • Merge Requests 54
  • Labels
  • Forks
  • Snippets
  • Network
Open
MR Merge Request !848 opened
2022-07-29 00:53:16 UTC by Ryan Yappert @RootOfAllThings

Fix for floating point error accumulation (Invisibility, Stealth, Confusion)

A few properties are manipulated as floats but have important binary behaviors based on their status as zero or not. For example, invisible is the "invisibility power" and is used as a floating point number for seeing through it, but any creature with invisible != 0 will cause the (annoying) shader and be completely invisible to any creature without see_invisible, even if they only have 0.00001 invisibility power. This low value is usually not reached in normal gameplay, but for characters that repeatedly toggle invisibility or stealth (like Shalore with Secrets of the Eternals), accumulating floating point errors can sometimes cause them to be stuck in a state of permanent invisibility.

We introduce a new parameter for entities, attr_eps that sets a threshold for certain properties. Attributes that end up with an absolute value less than attr_eps get forced to zero (the assigned nil for the engine). This should prevent the floating point error. This is set per class and per property, and is currently set at 0.01 for invisible, stealth, and confused (which can similarly be applied often and prevents leaving areas).

Check out branch Download as
  • Email Patches
  • Plain Diff
Request to merge RootOfAllThings:floating_point_zero_fix into master (63 commits behind)
×

Check out, review, and merge locally

Step 1. Fetch and check out the branch for this merge request

git fetch https://git.net-core.org/RootOfAllThings/t-engine4.git floating_point_zero_fix
git checkout -b RootOfAllThings/t-engine4-floating_point_zero_fix FETCH_HEAD

Step 2. Review the changes locally

Step 3. Merge the branch and fix any conflicts that come up

git checkout master
git merge --no-ff RootOfAllThings/t-engine4-floating_point_zero_fix

Step 4. Push the result of the merge to GitLab

git push origin master

Note that pushing to GitLab requires write access to this repository.

Tip: You can also checkout merge requests locally by following these guidelines

CI build passed for fd4d0ceb. View details
CI build skipped for fd4d0ceb. View details
CI build canceled for fd4d0ceb. View details
CI build failed for fd4d0ceb. View details
CI build running for fd4d0ceb. View details
CI build pending for fd4d0ceb. View details

Ready to be merged automatically

Ask someone with write access to this repository to merge this request.

  • Discussion 0
  • Commits 1
  • Builds 0
  • Changes 2
  • Please register or login to post a comment
848 of 870
Prev Next
Assignee
No assignee
Assign to
No
Milestone
None
Assign milestone
0
Labels
None
Assign labels
  • View labels
1
1 participant
Reference: tome/t-engine4!848