How to Build Space Invaders Video Game in 5 Minutes
Hello! This is Jeff for the Click Team and we’re going to be building Space Invaders in less than five minutes. So let’s get going and I’m just starting a new application in Multimedia Fusion 2 and opening up frame number one and I’m going to make the background of frame number one black so it’s nice and spacey and let’s have some library graphics to build our game motif. Give it some room over here on the edge. Okay, I will double-click on our active. We’re going to use this as our barricade. I want to make it in a little bit different colors so we can see nicely and let’s make it a great color. That dark purple doesn’t work very good on a black background and duplicate four rows of five, copy these, paste, and make another barricade paste. Okay, so I got three barricades here to kind of line them up a little bit. That looks decent.
Okay, let’s duplicate our invader. How about three rows of ten? That looks pretty good. Okay, these are all duplicates so I just have one object and we’ll set its movement to be invader. That’s pretty simple just like our player. I’m going to select its movement to the right direction and just left and right. Let’s run our game. I can move our player via the arrow keys and our invaders are moving across and down the screen. Let’s do the shooting. So here’s our bullet and when I press the space key I want to shoot our bullet. So I will do a new condition and test for the space key and launch an object and that will be the shot and it will launch. It is going to launch straight up.
Okay, now we need to test for when the shot hits the invader. Shot collides with the invader and this will be destroying the shots and let’s create an explosion relative to the invader and then let’s destroy the invader. Okay, let’s test for the shot collides with the barricade and we’re going to destroy the shot and destroy the barricade. Alright, let’s run our game and see how we look. Okay, this is looking pretty good. A couple of things that I don’t like is the invaders aren’t shooting back and I can shoot as many shots that I want despite pressing the space key, so let’s limit this compared to number of shot objects lower than three. Now, the reason you only see two on the screen is because we have one off-screen over here. So I can just do a start to frame and destroy it. So what happens now?
Now, you can see three of them on our play field. Okay, let’s make our invader shoot and I’m going to clone this object and I’m going to open up through the editor and I’m going to make this a red bullet so it matches our invaders and they’re going to do say, every 50th of a second and then we’ll pick any of these at random. They are going to launch an object and that’s going to be shot number two and they are going to launch it downwards. Okay, so now let’s test for this shot to collide with the player and let’s create an object, the explosion relative to the player and let’s destroy the shot and then let’s just destroy the player. And now let’s test for the shot collides with the barricade and let’s destroy the shot, destroy the barricade and I think we’re ready to play here. Okay, they’re shooting at us and their shots are destroying the barricade. My shots are destroying them and so if they shoot me, I’m destroyed.
So that’s a very simple Space Invaders game in just a couple of minutes. Thanks.
Transcription by:
Scribe4you Transcription Services