Timeline for Game Clock Precision
Current License: CC BY-SA 3.0
12 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Sep 23, 2012 at 20:50 | history | edited | House | CC BY-SA 3.0 |
added 463 characters in body
|
Sep 23, 2012 at 20:46 | comment | added | House | @BruceDawson Indeed, it wasn't meant to be used, only to show a concrete example of what I thought you were saying in your article, i.e. don't do it that way. It was made before you edited your article to be more clear. Suitable changes? | |
Sep 23, 2012 at 20:42 | comment | added | Bruce Dawson | The code above will fail miserably because it is using 'float' for game_time_elapsed. At that range the precision of a float is 256 s -- the next time that can be represented is 2^32+256. That's why I recommended two things: 1) Use a double so you have enough precision when the game has been running for a while. 2) Start at 2^32 so that the precision is consistent. The other reason to use 2^32 is so that you will instantly hit precision problems if you store elapsed game time in a float. | |
Sep 19, 2012 at 14:56 | vote | accept | Philip | ||
Sep 18, 2012 at 18:48 | comment | added | Philip | ah, now I get what he's saying. The precision for numbers from 2^32 to 2^33 is the same, so we have the same precision for 2^32 seconds. thanks for the different perspective. | |
Sep 18, 2012 at 16:35 | vote | accept | Philip | ||
Sep 19, 2012 at 14:55 | |||||
Sep 18, 2012 at 5:04 | history | edited | House | CC BY-SA 3.0 |
added 139 characters in body
|
Sep 18, 2012 at 0:18 | comment | added | Grimshaw | Im a fan of storing the times instead in big integers and converting the elapsed delta times to a float for calculations.. works nice i'd say ;D | |
Sep 17, 2012 at 22:41 | history | edited | House | CC BY-SA 3.0 |
added 62 characters in body
|
Sep 17, 2012 at 22:35 | history | edited | House | CC BY-SA 3.0 |
added 317 characters in body
|
Sep 17, 2012 at 22:30 | review | Low quality posts | |||
Sep 17, 2012 at 22:35 | |||||
Sep 17, 2012 at 22:30 | history | answered | House | CC BY-SA 3.0 |