Friday, February 28, 2020

GCollision: What Went Wrong?

Working the past few months on the Collision Detection library came with intersting problems which could only be solved by putting in the time. Floating point precision is a lasting battle as we're trying to represent numbers bigger than the data types that hold them. The macros FLT_EPSILON and DBL_EPSILON are good values for comparisons -2 to -1 and 1 to 2. For near zero comparisons it would be better to use a constant different than those. For values less than -2 and greater than 2, a solution exists in the form a function. Another problem was covering all the unit tests for a query. Even with ~1,200 asserts for just one data type implementation, it doesn't feel enough.

Another thing was severely underestimating the time it takes to create a quality product with test driven development. I set out with a gargantuan library and trimmed a lot of by the end of these months of the project. I would have definitely chosen to make a semi-realistic to high goals instead of a somewhat impossible goal for the sake of my mental health and sleep.

No comments:

Post a Comment