Warp-Speed through Space (well, a simulation thereof) Click the Green Flag to start, then Click the Big Star in the middle to jump to Warp-Speed Click the Stage at any time to freeze frame it. There's a couple of interesting side-effects if you click on one of the bigger stars (especially while it's moving).
Created by @gregatku for use in Coding Classes for Kids Unlimited, for whom I work as a Coding teacher. I am neither an astronomer nor a space traveller, so the many assumptions I have made about how things should look, may well be completely inaccurate? Regardless of whether my depiction of the view from a space-ship hurtling through space at warp-speed, is accurate or not, I still think it produces a nice effect, and more importantly, it shouldn't be too difficult for my students to reproduce. The "big star" shown rotating through its 3 costumes, is primarily so my students can see what their Vector drawn star will look like before they get into writing the the rest of the Code, because creating that star is probably most difficult task they will have. You might also wonder why it has 3 costumes in the first place? Well the 2nd & 3rd costumes are simply rotations of the 1st one, and they won't even get created until the 1st costume is one they're happy with. If there was only one costume the big flash point to the right of the costume would always point in the star's direction of travel, so each star has its costume picked randomly from the 3 to mix it up a bit & hopefully make it a little more realistic.. Initially there was only one Sprite called "Stars", but now it's called "Near Stars" and there's a 2nd one called "Distant Stars", which is initially created as a duplicate of the "Near Stars" sprite (after it is complete and working). Without it, it felt to me quite unrealistic and that there needed to some much smaller more distant stars, that moved considerably more slowly, and creating a duplicate of the first sprite and changing a few of the "pick random" blocks to achieve that effect, seemed to be the easiest way, requiring the least amount of work for my students. I hope that proves to be the case. Stars always appear to be white, so why have I put a slight red glow around the star in its costumes? Well there are plenty of celestial objects that exhibit a slight colour hue (eg. Mars), and red was specifically chosen so I could use color effect to pick a random hue for each star. However you will note that when the star gets closer to us (and therefore appearing larger) the colour hue has completely disappeared? This is because I assume that's the way it might actually look. This is controlled in the project by setting the brightness effect negative to start and then increasing it as we move closer to the star. You may also observe that for the "Distant Stars" the colour hue is missing completely, another deliberate choice (setting brightness effect to 0 initially, instead of a negative value), because I assume that's how it should look. There are only 2 variables in the project: 1) the Global (for All Sprites) variable "Freeze?" set to y when the Stage is clicked to freeze-frame the stars to create a nice Thumbnail for the project before saving it. And 2) the Local (for this Sprite Only) variable "speed". The project needs this variable to be Local so that each star (clone) has it's own unique speed. If it were a Global variable all stars would move at the same speed, or actually at a variety of speeds as each new star created would set the speed to a random value and all the clones would then move at that speed until the next one is created, resulting in jerky rather than smooth movement. NB: I always start my Global Variables with an Upper Case letter and my Local Variables with a Lower Case letter so I know which ones are which. The 2 costume Cockpit sprite is an optional extra for Advanced students or those who finish early. It requires one trivial change to the Near Stars sprite to broadcast the Warp Speed message after the star generating Clone is created, to tell this Cockpit sprite to switch to its second costume with a few panel items changing to indicate we are now travelling at Warp Speed.