Adding More Game Elements

In the previous chapter, we developed a framework for unit movement that combined pathfinding and steering. We used this framework to implement move and deploy orders for the vehicles. Finally, we made our unit movement look smoother by interpolating the movement steps during intermediate drawing cycles.

We now have a game where the player can select units and command them to move around the map.

In this chapter, we will build upon this code by adding some more game elements. We will start by implementing an economy where the player can earn money by harvesting and then spend the money on creating buildings ...

Get Pro HTML5 Games now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.