Don't use this for your projects. It's full of hard coded nonsense, extremely sensitive parameters, confusing code, inefficient workarounds, duplicated code, janky physics, bad implementation, and unorganized functions. Even I don't know what half the stuff I wrote does. All I know is that it (barely) works. This bowl of spaghetti I call code is the result of insomnia and boredom, and is a great example of how NOT to code. I'm sure you can find a better simulation somewhere. I could've done better, but this is just a proof of concept.
credit to the people who make 7up for fueling this train wreak