Hints Library

Tulenber 6 March, 2020 ⸱ Intermediate ⸱ 3 min ⸱

- Buy ammo or you can’t shoot. Far Cry 3: Blood Dragon

From the beginning, one of the main goals of this project was gathering game mechanics, and this post is the next step on this path. It will be about the library, which will help to do small, but a popular feature of loading screens - hints.

Far Cry 3: Blood Dragon

And the last example is a pretty screen from ‘The Legend of Zelda Breath of the Wild’:

The Legend of Zelda Breath of the Wild

In many games, this feature is a first game mechanic that meets the player at the first screen of the game - the loading screen. The next screen which likes to use hints is the level loading screens, so the player could have fun awaiting the game. Of course, the better choice is to place there something more interactive, like combo practice in Bayonetta, but if there are no such options, hints look better than an empty screen. And, even if the next generation of consoles promise us loading in a blink of the eye, network connections hardly become so fast that we get rid of content loading screens. So, this is a small but handy feature, which helps to know the game better, creates the right mood, and sometimes remembered for many years, like in Far Cry 3: Blood Dragon, from the beginning of this post.

Usually, this mechanic does not contain any specific implementation and sequentially displays lines from a pre-formed list. However, the bright minds of game designers may generate the idea of learning through them the particular mechanics for a temporary event. Based on these thoughts, we will make the requirements for the library.

Requirements

Game design:

  • Multiple lists with hints for different screens
  • Two types of behavior
    • Sequential - every time show a new hint
    • Random
  • Dynamic change of hint after a short amount of time
  • Update of hints list without rebuild of the project

Programming:

  • Simple embedding
  • Simple updating
  • Simple extending
  • No external dependencies

KhtHints

The implementation, as well as configuration and a full description, can be found at tulenber/KhtHints

Simple embedding and updating are provided by including it as a git submodule(Chapter from official git book about submodules). But no one can forbid you to copy the directory.

Configuration takes place via the JSON file through the TextAsset and Resources.Load() interface, respectively, the file should be located in the Resources folder, in this case, local.

For an absence of external dependencies, there is a separate Singleton class, created according to the Unity and Singleton post. The Manager class is a Singleton heir and implements the main logic.

Conclusion

The current implementation does not cover all possible ideas from the side of game design. As you can see, the hints from ‘The Legend of Zelda Breath of the Wild’ at the beginning of the post include not only the text but also the title. However, the library is quite suitable as a set of basic functionality, which is easy to integrate and expand, which was the initial task. There are several questions left for the current implementation that need to be checked and corrected. Also, it’s better to implement interaction with Asset Bundles, but this topic is for another post. See you next time! =)



Privacy policyCookie policyTerms of service
Tulenber 2020