Scratch Module 2 Week 4 - Catch The Dots

Here's a deceptively simple game with a lot of scope for great game play. Changing variables, like the catcher or dot speed, or the delay before new dots arrive, can change the action, and there's so much more you can do too.


Here's my go at it. I've changed the starting position code, so that dots can start at any point on a circle around the collector (okay, an ellipse, but who's measuring?). I've also added power-ups, which appear at random to spice things up a bit.


In my final version, I also rearranged the code so that the timing was all on the stage, rather than duplicated in each sprite. To do this, I broadcast a message, red yellow or blue, which each of the relevant sprites listen out for. I like broadcast, but what I found was that it's very buggy - sometimes a broadcast would clone multiple sprites, when the code only asked for one. I got around this by keeping count of the broadcasts and the sprites, and only cloning if there were fewer clones than broadcasts. Just so you know ;)



Click the boxes below if you get stuck, and you'll see a picture of the code blocks for the different sprites. These are for the tutorial version, not mine, but if you're interested you can remix mine to see how I structured things.


Click here to see the code for the controller/collector sprite
Click here for the red dot sprite
Click to see the code for the Stage, which handles difficulty, scores etc.
Click here some hints to start using extra costumes to make a power-up dot