split off Phaser initialization code from renderer/index.js