refactor entity spawning and game control