Step 1

Initial Setup


Let’s start by setting up a few variables and settings. When you make the array, be sure it has 6 elements.

Populating the array


Next, let’s add items into our array. This array is going to hold different images to use for asteroids.

Finishing the setup


Next, add the following code to finish our initial setup.

The set bottom block can be found by using the set x block. The bottom of the sprite tells the sprite to spawn with its bottom coordinate set. This lets it start at the bottom of the screen.

Testing the code


Go ahead and test out the code, you should be able to fly the ship! There should also be a cool star field effect!