Creating a new project
We need to make sure that we're logged in and ready to get to work on a new project. We'll then draw some sprites and assemble our awesome cannon (and cannonballs). The Scratch menu bar gives us the option to explore the existing projects from other users (using Explore) or create a new project ourselves (using Create):
Prepare for lift off
You are presented with a new project, including the Scratch cat as usual. We won't use the cat, so you can right-click on the sprite, and choose delete. A sprite is the official name for a 2D computer image. Most Scratch projects are built using sprites. You can find an overview of all the sprites used in a project in the bottom-left corner of the screen, underneath the stage.
Engage thrusters
We will draw our own sprites for this game. Let's start with a simple cannonball!
The cannonball will be the main actor in this game because it will be the object that "blows things up". There are a few ways to add a new sprite to the stage. We can draw a sprite, select a sprite from the Scratch library, or import it from our hard drive. It's also possible to take a picture with a webcam.
To draw sprites, we perform the following steps:
Click on the little paintbrush icon between the stage and the sprites window. This will open the costumes tab.
Check if the editor is in Bitmap Mode or in Vector Mode. To create our drawing, we will select Vector Mode.
Select the Ellipse tool (the circle) seen on the right-hand side of the drawing canvas. Click and hold the left mouse button and drag it. You will probably end up with something that's not quite a circle.
Undo your drawing with the back arrow button at the top of the drawing canvas. When things go wrong, you can always go a few steps back. You can even clear the entire screen (using Clear) and start over.
To create a perfect circle, hold Shift while dragging the mouse. Don't make your circle too big. It has to be able to move about the stage freely without bumping into the edges all the time.
Next, click on the crosshair button at the bottom of the toolbar. This button lets you center your image. Now click on the center of your cannonball.
We name the new sprite
cannonball
.
Your cannonball is now done and ready for business. It will look like a simple grey dot as in this screenshot:
Let's move on to creating a cannon to shoot from. The cannon will consist of two parts: the back of the cannon, which serves as the pivot point, and the barrel. The following are the steps to create them:
Create a new sprite by clicking on the paintbrush icon.
Start again by creating a circle. This circle should be slightly larger than your cannonball.
Next, select the Rectangle tool that is right above the Ellipse tool.
Draw a rectangle that is as high as the circle but about three times as wide.
Click on the Select tool and drag the rectangle to overlap the right half of the circle.
Make sure that the center point of the cannon is placed at the center of the circular element, near the back of the cannon.
We name this sprite
cannon
.Just keep in mind that the cannon consists of two separate shapes. You can color them separately, or you can color them together by first selecting both the shapes while holding the Shift key.
Objective complete – mini debriefing
We've now got ourselves a cannon and some ammunition to shoot with.