Scratch Zero Wing

ALL YOUR BASE ARE BELONG TO US!  Really though. They do. Haha, well anyway, I did Zero Wing for the next Scratch project in my coding class. I did what I do best and started by ripping my own sprites from YouTube videos (don’t judge! the resolution is only 640 x 480 in these games!) and getting down a few of the base mechanics. This game sadly didn’t get finished to the point I wanted it to be, but I am actually debating at a later point when I have some time, going back and tidying it up and adding some more of the things that I had planned on doing to the previous one. This was also one of my cleaner games, if I do say so myself. Third time’s the charm!

This is the first scrolling game I actually did in Scratch. I used a basic scrolling function though, just with a simple “scrollX” variable. (Not even a “scrollY”, because I didn’t have time to add the backwards mechanic!) The background changes according to the width of the screen and scrolls between I think it was like 7 to 9 different backgrounds. This game also took the least amount of time I think to code, because I was able to use a lot of the same things that I had previously used. However, I did branch off of my original star throwing mechanic from my previous game and found a better script online. It was almost identical, with the difference being that it calls multiple hits, so instead of the usual “press X and wait five minutes for the missile to something or go off the edge”, it shoots constantly switching between four different numbers in a variable to shoot. So if Hit = 1 shoot of Missile1, if Hit = 2 shoot Missile2, etc. etc. up to four times. The other difference is that it reshoots the first one again instead of waiting for it to disappear off the screen. So that was a good improvement I think from the first game I did, which was like the other example I listed (shoot and wait).

I also implemented a powerup that drops off of one of the enemies in the scene. If the character touches it, then the powerup gives him two extra vehicles to the north and south of him, tripling the amount of firing power towards the enemies. I controlled these of course with a few broadcasts. Sadly though I didn’t get the opportunity to add more the powerup aspect of the game. I had the sprites loaded into the game though, and had planned on adding the “ice” powerup, which changed the missiles to more of a laser beam-type attack from all three of the vehicles (or one, depending on if you have the first powerup when you get it). I also didn’t get to add the more adventurish aspect to the game, where the character, upon going through narrow areas, will shrink inwards with the two other vessels and then spread back out.

To be honest though, the biggest issue I had with this game that literally took probably at least half of my time had to be the timing of the enemies. The worst part about this whole thing is that I now realize I could have implemented a VERY simple sprite that would’ve solved this entire problem, but at the time, what can I say? Staying up late is very bad for you. You realize everything the next day and wonder why you were so stupid the night before. But at least my room mate made me feel better by telling me that she too didn’t even realize at the time to equate the two, or she would have told me to use the same mechanic to solve all of my problems as well (instead of listening to me rant on about how angry I was, haha). So the problem I was having, if you haven’t guess it already, was the disappearing and reappearing of the sprites. When I used the simple “scrollX” script from a website it gave me a small piece of code to use (which I don’t remember now) to input and make the rest of it go away when it wasn’t on screen, but this didn’t work for me. So my time was drawing thin. What else to do? Oh yeah, that’s right. I went and found the ScrollX position of every single one of those sprites when it appeared on the screen, and made EACH one disappear and reappear when it touched that number. So in case you’re wondering how I did this, I watched the game. Over. And over. And over again. At least four times (AT LEAST) for each sprite, to make sure they showed up at the correct time when I told them to. Because if not, the sprite would chill out on the side of the screen forever and not actually do anything until it hit its Scroll X position.

So anyway, I realized the day after (when it was already submitted), that by far the easiest thing I could have done would’ve been to simply put a border around the sides, probably the color Yellow with a ghost effect set to 99. I then could have easily told it after it had hit it’s ScrollX position telling it to appear, that it needed to disappear whenever it touched this said color. And voila! My troubles would’ve been gone.SO simple. Even talking about it makes me angry! But like I said, I do want to come back to this game at a later point in time and add a LOT more enemies (because I didn’t have the time to add more than 9!) and the other things I mentioned previously, along with a boss. That’s school for you.

Yay! Pictures!

Comments are closed.