Added a spawner function that creates infinite obstacles.