Categories
News

Space invaders, and next week is the last this term.

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.

Scratch_Space_Invaders_screenshot

Categories
News

Mesh networks

This week we looked at using Scratch’s “Mesh” network system to get our computers talking to each other. We’ve put some notes up on the Resources page about it, in particular to pay attention to messages from the Windows firewall when you’re getting started.

If you’re like most people, you probably only have one computer you can use at a time at home. If you want to work on something with Mesh a simple trick is to open Scratch twice. One can be the Host, and the other can Join it; it’ll work the same as if you had each copy running on different computers.

Next week we’ll do a little more with Mesh. At this stage, though, we’ve shown you pretty much every part of Scratch. It’s time to start thinking of what you want to build. Imagine a game or anything you like and think about what it needs to do. Talking to friends about it (even if they’ve never been to CoderDojo) is a great way to work things out in your head. If you’re completely stuck, you can at least start drawing any sprites you’ll need, and when we’re back next week we’ll figure out what to do.

See you then!