Network game tools are provided by the
lionengine-network module, giving an oriented network game type
development with specific classes and architecture.
In this section we will see how to use these main tools, and the way of we should use them.
What is the most primary thing we always need in a multiplayer game ? What are the first data exchanged ? Dialog between player of course ! Let's see how is working the integrated chat system.
This is here where network message type are defined.
For each message type, we need to handle its decoder from the type.
We can here listen to network connection in order to send special messages.
Represents the player connected through the network.
This is how should work the world over the network. Usually, clients send their data to the server, which updates the world, and then send the updates to the clients. Client can also update the world by themselves in order to reduce bandwidth usage.
You can now test the chat by starting two applications, one as server and the other as client. You can also add new clients.
Read next page: Levels editor