New spawning mechanism.

Function updateSpawning()