Adding a Cut Scene and Handling Input
Much of the work we’ve completed so far has contributed to the whole largely unseen and unheard. The only action we’ve required – or even listened for – from users is a single button click. How boring – and quiet. That’s all about to change, though! In this chapter, we’re going to add some flavor to our app’s launch by adding a Splash Screen that tells the world that everything they’re about to see is “Powered by Babylon.js” in the process of providing players with their first experience with Space-Truckers. We’ll also be giving users agency in the game world by adding inputs for multiple different device types, along with the logic to process inputs into actions in the game.
This seems like a lot to cover in such a short chapter, but thanks to how easy it can be to accomplish tasks in Babylon.js, progress can come faster than you might think.
In this chapter...