Adding a bit of variety
In between each level now, there is a new intermission level, where you have to avoid the incoming asteroids. Fire doesn’t work, and eventually, you will be destroyed. However, as it’s a bonus round, it won’t deduct your lives count, and you’ll get a bonus for the longer your keep going.
One of the benefits of using Phaser, is you can keep calling the same stage over and over again, so long as you keep track of variables like lives, score etc outside of the stage. It means I can use the normal game stage with a bonus flag toggled to allow different behaviours when on the bonus level.
The only thing I needed to manage, was preventing the firing, removing the shield (so you explode immediately on impact), the start and end messaging, and deciding the what enemies (ships or asteroids) to launch.
There are a number of small ‘development issues’ including a flicker of enemies at, what looks like a random point. There’s obviously logic there, but so far I can’t figure it out, so these need to be sorted.
Gamejolt also allows you to upload a ‘work in progress’ so I’ll throw this out there to see how it’s received.
Don’t forget, you can view source of the game to see how it’s all implemented. The actual game loop logic is in game.js so feel free to have a look. Check it out by clicking the logo below. Note: it does not run on mobile devices yet.