Chapter 11. Scoring and Game Rules

In previous chapters, we incrementally learned about all the technical skills and knowledge necessary to build a game with Stencyl. We have even implemented some game mechanics. However, it would not be a game if there were no clearly defined game rules or gameplay. In this chapter, we will:

  • Create and track a score value
  • Render it to the screen
  • Create a coin collection gameplay component to increment the score variable

Collecting coins

Before we can begin with programming the coin collection gameplay, we need an actor in our game that will represent the coins. Let's create one now, using the now familiar Actor Type creation workflow that we established in the earlier chapters, by performing the following steps:

Get Stencyl Essentials now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.