A major difference between an online virtual world and a traditional single-play game is the communication between players. Players connect to the socket server and share real-time information. Successful virtual worlds encourage users to interact and exchange useful information and resources. They allow players to divide their works inside the virtual world and group into different parties to explore different parts of the virtual world.
In this chapter, we will discuss several implementations of the communication methods with the help of SmartFoxServer. We will create a basic chat system and buddy list. We will also use some new server API to implement the item trading feature that was discussed in the last chapter.
We will use quite a lot of server build-in APIs in this chapter. It is because the server acts as an important role during the communication between players.