Two things! First, below are some notes on the space invaders game we did this week in the advanced class. Secondly, with Christmas coming there’s a shortage of mentors and many of you are busy too. So next week there’ll only be a beginners class, and it’s the last class this term. If you’re from the advanced class you are still, of course, more than welcome to come along and work on your own thing, ask questions, etc.
This week in the advanced class we worked through a basic space invaders game, shooting aliens walking across the screen. I’ve uploaded it exactly as it was shown if you want to refer to it again.
I found that over time during the game, the sprites drifted out of sync with each other. To keep them in lock-step with each other, you need to control the timing of their movement in a single place. The way I came up with was to put a script as part of the Stage that used broadcasts and some shared variables to communicate with the alien sprites. You can see that version here.