WIP - Fast and optimized BGE Networking

I’ve noticed a lot of people use pickle as a data format in networking in the BGE. This is very un-optimized and uses more bytes than it should to send data. In my BGMC 31 game, RAT4T4, I implemented a multiplayer system that sends data to a server in the form of a struct. Using this, I was able to compact the data of 9 players within 128 buffer size of the socket. Using pickle, the buffer size would have to be over 256 bytes for the same data for just 1 player. Clearly the benefit is obvious.

I will be attempting to create a user-friendly and modular networking system for the BGE based on the struct method that will be able to connect to my server which will be able to adapt to any type of data it receives from the clients.

Updates will be posted here soon.


Are they ? :smiley: In addition it’s not safe AT ALL ^^
Malicious code can be sent in a pickle packet, and if not handled corretly, control of all the machine / server can be taken soooooo easily :joy:

I use to do so, or I also json dumps eventually for mostly string containing packets

yes. security is a big issue I have yet to figure out

1 Like

Awesome buddy cant wait to see more updates!