Heyo, this is my first post and I have no idea how anything works. Pardon my ignorance :y
This is something I've been working on for the past couple of days. It has vacuum/gravity physics thus far. I'm trying to get proper collision physics in next but I encountered a weird bug with the distance on the way. Watch the distance meter (white) as you move away from the red circle, you'll see what I mean. A sound plays when the distance is less than or equals 11, but it does it in places it shouldn't. Advice is welcome!
Update: Now that the bug has been squished, time to figure out collision physics. Oh boy, trig :V
Thanks for the help so far, I'm probably going to need more later ^^;
I assume the x^2 or y^2 in your distance calc is overflowing the maximum value of pico-8. (from the quirks section of the manual: "PICO-8 numbers only go up to 32767.99")
So it winds up calculating the sqrt of negative numbers, and I won't pretend to know what pico8 does with that.
[Please log in to post a comment]