Score Panel

score panel rectangle

We need to use the Draw event so the player can see how many lives they have, the score (and later if they have ammo). Start by adding the rectangle (fill and outline)...

  • Set Color: a light color
  • Draw Rectangle: x1 = 0, y1 = 0; x2 = 100, y2 = 45; filled
    this will draw a rectangle filled with the background color X1 & Y1 are where it starts drawing, X2 & Y2 are how wide/high the area is. These are starting values but you can play with them if you want to give your player bonus lives and need more room in the panel.

  • Set Color: set to black (= the outline color)
  • Draw Rectangle: same values as previous - can duplicate, but change to "outline" not "filled".

draw lives and score

Now draw life images and the score.

  • Draw Life Images: x = 10, y = 5, image = "life"
    draw little life sprites to show how many lives the player has
  • Draw Score: x = 10, y = 25, caption default

Room

Place the controller object somewhere in an empty spot in your rooms (top left is good as that's where it'll show up).

Test out your game - you should see something like this in the top left corner...

Get this stage of your project checked off.