A simple but big issue. I found that when subtracting or adding to a global variable by 0.2, that the sum jumps wildly and then corrects itself a lot. whether dropping by a random 0.00000000005 or when hitting 0 jumping to huge amounts of decimals, and not 0.
I spotted this when transfering the variable to a spritefont, and checked it with the debug to confirm the problem. It also occurs when telling the game to add 0.2 every second, eliminating player involvement.
Attach a Capx
https://www.dropbox.com/s/xy04jybonj1jz ... .capx?dl=0
Description of Capx
The Capx is really simple. You can just use the keyboard commands at the bottom of the events to see the issue in the debug. I hope this is good enough.
Steps to Reproduce Bug
- Create a global variable - number type
- Create any method of trigger- keyboard trigger/set to timer
- Run in debug and watch the variable when triggered over time.
A list of results from the most recent attempt to add by 0.2:
5.4... 5.6000000000000005... 5.800000000000001... 6.000000000000001... to...6.800000000000002... to... 8.799999999999999...9.099999999999998
0.2... 0.4... 0.6... 0.8... 1...
Operating System and Service Pack
Windows 10 64 bit
Construct 2 Version ID