So, you want to show text in your game?

1

Features on these Courses

Stats

822 visits, 982 views

Translations

This tutorial hasn't been translated.

Tools

The humble word.

Take a minute and just think about some of the different ways a game might display words. Or numbers for that matter. Scores, inventories, instructions, dialogue… There are numerous ways that text can be utilised within a game. And handily, Construct has numerous ways you can handle text.

At its most basic level, displaying text is as simple as either creating a text (not to be confused with TextInput) or SpriteFont object and typing something in its Text property.

This is great if you just have something static you want to display. For example, in the intro to Kiwi Story, a SpriteFont object is used to show the player what to do.

The two objects are highly customisable in terms of how you want your text to look. The Text object allows you to either use built-in fonts (though remember these may not be common to all devices) or install Webfonts to bundle with your project. SpriteFont uses an image for your font, so you can draw the letters however you wish – then set the character properties accordingly. Both types of objects offer BBCode formatting, but as the SpriteFont object renders images for the text, the tags available differ to those for the Text object.

You can also change text and formatting in your game using the various actions associated with both objects – the manual will detail what all of these actions do.

So there you go, a good starting point for using text in a game is to simply try out the Text and SpriteFont objects. (You’ll need to be familiar with Text at least for the rest of this course!)

  • 0 Comments

  • Order by
Want to leave a comment? Login or Register an account!