Time for action – creating a second brick
There are a couple of different ways to create a new brick color in the game. We can create a new sprite with the color or we can add a costume color to the existing brick sprite. This exercise will take the costume approach so that we can use a single custom block to draw all the rows and colors. The steps are as follows:
- Let's ensure the brick has a valid name that will represent our changes. I recommend that you use the name brick instead of yellow brick.
- From the Costumes tab of brick, add a new costume by using the paint new costume icon.
- When the blank canvas of the paint editor opens, convert the image to vector and draw a solid red rectangle that is 45 pixels long and 25 pixels tall because that's how big the yellow bricks were. We did this exercise in Chapter 6, Making an Arcade Game – Breakout (Part I).
Tip
To give you more control and make it easier to draw the image to a specific size, zoom in on the image using the...