Hacker News new | ask | show | jobs
by 32gbsd 1099 days ago
A videogame that runs at 60fps with a custom engine in c. And it didn't even use real physics. Only hacks and approximations but it was lovely.
1 comments

>hacks and approximations Otherwise known as "heuristics". Otherwise known as "making a damn good guess". You don't always need precise math to get something done. I once wrote a program to estimate the average volume level in a WAV file. It was just a process of taking samples at different points in the file and then making a good guess. I compared with another program which used complex math to estimate the average volume. Neither approach achieved 100% accuracy. Maybe 80% overall.
I totally agree. When I had first looked at the math I could not for the life of me figure it out. But eventually - through lots of testing - came to a comfortable approximation of what I needed to achieve and I was fairly happy with it.