The developer has [this GDC talk](https://www.youtube.com/watch?v=Jf5O8S5GiOo) where he talks about the mechanics which you might find interesting. My impression is it's a lot of random hacks, which may fit with your description.