Title says it all, I made this as a project for my AP physics class. I'm attempting to simulate realistic two-dimensional kinematics using pico-8.
Please tell me if I've gotten the math wrong anywhere :D



Nice! I think you're missing a 0.5*dt^2*acceleration term when updating the position:
local dt=1 obj.x+=dt*obj.vx obj.y+=0.5*dt*dt*gravaccel+dt*obj.vy obj.vy+=dt*gravaccel |
If you wanted to make it work properly at different frame rates, you could also calculate the dt based on the actual time elapsed instead of assuming it's always one.
[Please log in to post a comment]