Reader small image

You're reading from  Stencyl Essentials

Product typeBook
Published inApr 2015
Reading LevelBeginner
Publisher
ISBN-139781784399450
Edition1st Edition
Languages
Tools
Right arrow
Author (1)
Richard Sneyd
Richard Sneyd
author image
Richard Sneyd

Richard Sneyd (BA Hons.) is the founder and CEO of CyberMyth Games, an indie game development studio based in Country Cork, Ireland. His role within the company requires that he wears many hats, including that of a programmer, designer, digital 2D and 3D artist, sound designer, scriptwriter, texture artist, leader, marketer, and business man. He is also a fully registered, qualified, and highly experienced lecturer. His specialty subjects include 3D modeling and animation, computer game programming, 2D image processing, game design, desktop audio, psychology, consumer behavior, human resources, and business management. In addition to classroom teaching, he is actively involved in online education, regularly publishing new courses, and various other learning materials, such as books and tutorials, in conjunction with CyberMyth Games. He is enthusiastic about his work, and his students and colleagues think of him as a very dedicated and accomplished teacher. All of his courses and books are characterized by a steady, incremental flow of information, and a lucid teaching style that is easy to understand and follow for all. He is a husband to his wonderful wife, Jennifer, and father to a wonderful son, Darius.
Read more about Richard Sneyd

Right arrow

Rendering text to the screen


Now that we have created the logic that tracks the score based on how many coins the player has collected, it is imperative that we render this information to the HUD so that the player can view their score as they progress through the game. To do this, we will use the font we imported earlier. Follow these steps to draw the score value in the HUD:

  1. In the Player Handler, we must add a When Drawing event. Navigate to Add Event | Basics | When Drawing.

  2. The drawing blocks are now visible under their own category, called Drawing, in the blocks palette. Drag out a draw text at block and snap it into the when drawing event block, as shown in the following screenshot:

  3. For the text field in our draw text at block, click on the small, downward grey arrow to bring up the menu shown in the following screenshot. Navigate to and select Text | Basics | Operations | Text & Text (this is a concatenator, which means that it combines two strings of a text into one):

  4. In the first...

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Stencyl Essentials
Published in: Apr 2015Publisher: ISBN-13: 9781784399450

Author (1)

author image
Richard Sneyd

Richard Sneyd (BA Hons.) is the founder and CEO of CyberMyth Games, an indie game development studio based in Country Cork, Ireland. His role within the company requires that he wears many hats, including that of a programmer, designer, digital 2D and 3D artist, sound designer, scriptwriter, texture artist, leader, marketer, and business man. He is also a fully registered, qualified, and highly experienced lecturer. His specialty subjects include 3D modeling and animation, computer game programming, 2D image processing, game design, desktop audio, psychology, consumer behavior, human resources, and business management. In addition to classroom teaching, he is actively involved in online education, regularly publishing new courses, and various other learning materials, such as books and tutorials, in conjunction with CyberMyth Games. He is enthusiastic about his work, and his students and colleagues think of him as a very dedicated and accomplished teacher. All of his courses and books are characterized by a steady, incremental flow of information, and a lucid teaching style that is easy to understand and follow for all. He is a husband to his wonderful wife, Jennifer, and father to a wonderful son, Darius.
Read more about Richard Sneyd