Boxplayer with gravity, friction and collision detection