Trying to write my own platformer game engine,