Building the player
We are going to start by building our player object. We have briefly described the design already, but we have not broken the design down into something that we can start creating. First, we should bullet point each feature and what it entails to ensure we have all the Variables and Events we will need.
Arrow keys will move the player around the play area
Must remain in play area
Spacebar will fire weapon
A single bullet fired with each button press
Colliding with bullets or enemies causes damage
Should be different values based on type
Setting up the player sprite
Let's create the player sprite and prepare it for the game:
Create a new project and call it
Chapter_03
.Create a new Sprite and name it
spr_Player
.Click on Load Sprite and load
Chapter 3/Sprites/Player.gif
, with Remove Background checked. This.art
file has a spaceship with transparency and several frames of animation.Next, we want to adjust the collision area of the spaceship. The default collision is a rectangle...