Calculating and Displaying Scoring Results
Whether a game is implemented as a piece of software or a cut-out piece of cardboard, almost all games, regardless of origin or format, feature intrinsic ways to give players feedback on their performance throughout a game session. Whether it reflects the number of goals scored or the player’s ability to keep a steel ball from dropping between bumpers, the scoring process is where a game connects to its players at a most visceral level.
In this chapter, we’ll be introducing two new powerful tools for your game development toolbox, both completely new to version 5 of Babylon.js: the GUI Editor (GUIE) and coroutines. The GUIE is a solution to a problem that we’ve already seen previously when implementing our GUI. Think back (or just refer to the code) to the Planning Screen GUI implemented in src/route-planning/route-plan-gui.js
and recall that there is a large amount of boilerplate, typo-prone, and ultimately tedious...