6

Implementing the Game Mechanics

The focus of the previous chapters was solidly on building an application foundation for Space-Truckers. Now, it’s time to shift gears (as it were) and look at the way we want to implement the game for its first phase: Route Planning. As we usually want to do when faced with a single, daunting, complex problem, we break down this part of the game into two principal facets: simulation and game elements. Throughout this chapter, we’ll start by looking at the simulation part of the game before layering the game mechanics on top of the simulation in a way that gives us the freedom to iterate.

It’s a common tactic of reality shows and gameshows where the host will give a wind-up speech that seems to indicate that ...

Get Going the Distance with Babylon.js now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.