is there a rhyme or reason to how he moves? I can't tell if he's effected by gravity or sections within windows or not.
The program detects floor by comparing the colours on the background below Baba's feet, but the detection is quite finicky to save processing power.