its been a while, but i think i just looked up some formulas and applied them
maybe, i wrote an article on the game that explores some of the inner workings here - https://nerdyteachers.com/PICO-8/Pico-View/?issue=14#superworldofgoo
Sorry! I totally forgot to reply to you. Since then I've taken a look at your code and bought a pico8 license and am now trying to make a little game of my own. I've found pico8 to be a great way to prototype games, to experiment with gameplay without having to deal with many of the details that can distract you during development