Taken from https://js13kgames.com/games/racer/index.html