Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

They discovered a quantized version of Newton’s law because their processor had no floating point unit. Pretty creative.

> S(0)=0 (reference position) S(1)=v₀-½g (initial velocity) S(t+2)=2S(t+1)-S(t)-g

Thus, the value of the previous screen frame (t+1) is added twice, the value of the screen frame before that one (t) is subtracted, and the constant g is subtracted.




It's really interesting. I wonder why they didn't use a lookup table?


At first glance it looks like they applied a linear multi step method to estimate the value of their equation of movement. There is a huge and ever-growing number of LMM formulas and I don't think Donkey Kong placed a premium on minimizing any kind of error.

https://en.wikipedia.org/wiki/Linear_multistep_method




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: