Completing the 2D Card Game
This chapter resumes from where the previous ended. It assumes you've been working through the card game project and that you now have a working version. This version is currently a single player game where the player must find three card matches within a grid of cards. If you don't have a project to work with, you can start from the project files I've created, found in the book companion files at Project_Files/Chapter11/Project. Figure 11-1 shows the project created so far. In this chapter we'll transform that single-player project into a networked multi-player version. In short, we'll adapt the project so two players across either a local network or the Internet can play the same game together, with each player participating in turns and being able to see the actions of the other player on their turn. To achieve this, we'll make use of the Unity API and its range of networking classes. Specifically, we'll examine a trio of classes: the Network class, the MasterServer class and the NetworkView class.