I received a message in my inbox, asking for further details about networking in the BGE. The content hasn’t any sensitive information, so I think it is best to answer here:
I can understand why it is hard to follow, the goal was not for people to understand how it internally work, but I was hoping to develop a framework that people could use, making things simplier. Turns out I gave up both on the framework and the BGE. Ha.
In my implementation, I used the callback approach: because we don’t know exactly when we will receive a message, you can register a function that would be called by my system when a message finally arrive. The game could continue while my library was doing the waiting somehow.
- The BGEz project: https://gitlab.com/bgez/bgez
- The BGEz networking module: https://gitlab.com/bgez/bgez/tree/develop/bgez/network
But since I don’t plan on maintaining this extension, either try to reverse engineer the BGEz framework, or learn how to make your own.
Note: If someone wants to reverse engineer the framework, you should definitely read the test suites that we wrote, we tried to cover most of the code base, testing most use cases. It should give good hints on how things are designed and how it works. You will then be left with understanding implementation details.
I would still recommend making your own thing, since I think you have more chances of doing something yourself than waiting for someone else to do it for you. If it is not there, don’t wait for someone to do it, else forget about it.
Now if you don’t know anything about scripting, let me tell you that unless someone makes an easy script/addon for you, you are fucked. You will have to learn a lot about programming and networking.
So if you are serious about making multiplayer work in a game engine, you must know that the BGE doesn’t help you at all here. You should try to learn about the following:
- Get familiar with Python programming
- Get familiar with concurrent programming (notably how to handle asynchronous code)
- Get familiar with Python’s networking modules
- Learn how to use these modules in the BGE
- Search a way to use Python + a concurrent model + socket/networking library inside the BGE
This can take up to multiple months of learning + experimenting, your mileage may vary.
But maybe some people can shim in here and provide all kinds of links and/or explanations too