We have discussed how to communicate with text messages. In many cases, we need to share some pieces of information with other players. For example, we want to update others with our location. In previous chapters, we used serialization and deserialization methods to put information inside the private and public messages in some special format. This is a useful method where we can only send out and receive text messages.
Recently the SmartFoxServer introduced the
sendObjectToGroup functions to broadcast data object to all players or specific players. The data communication flow of the two methods is basically the same. The difference is public message serializes all data into strings and