I made this completely from scratch, with no pre-existing engine. Feel free to fix it if you wish, as it isn't THAT good.