In all our previous chapters, we have discussed 3D rendering in-depth but have not discussed 2D rendering. In this chapter, we will discuss the canvas 2D context, which is a very important aspect of game development. The canvas 2D context offers a very powerful drawing API.
We will also discuss the concepts of HTML-based multiplayer games. We will then discuss Node.js and the Socket.IO API to implement a spectator player who can see what is happening in the game. In this chapter, we will cover: