Skip to main content
added 75 characters in body; added 429 characters in body
Source Link
Jon
  • 534
  • 2
  • 9

What you really need to do here is bit packing and unpacking. Here is a decent tutorial so you can get the most out of each packet, as each bit you send should convey as much information as possible. JSON might be easy to read, but we are programmers and do not need to actually read the data in our packets (unless debugging!). We simply need to interpret the bits into a usable struct in whichever language we choose.

JSON might be the simplest solution, but it is quite far from the best. The best MMOS spend years optimizing this processThe best MMOS spend years optimizing this process. In fact, for MMOs, it may be preferable to use TCP! Here is an excerpt from the link mentioned,

UDP is another widely used transport protocol, but it cannot be applied to MMORPGs directly due to the lack of reliable and in-order transmission. To deal with packet loss and the reordering of game messages that need strict reliability and in-order processing, an excessive amount of effort is required if UDP is adopted.

Another thing you need to think about is encryption. Sending plaintext packets in JSON is a quick way to introduce vulnerabilities to your game. Packet editors are one of the oldest tools hackers have in their toolbox, and plaintext packets are just asking to be exploited.

Here are a few more resources to explore

http://ithare.com/udp-for-games-security-encryption-and-ddos-protection/

https://pvigier.github.io/2019/09/08/beginner-guide-game-networking.html

https://gamedevcoder.wordpress.com/2011/08/28/packet-encryption-in-multiplayer-games-part-1/

What you really need to do here is bit packing and unpacking. Here is a decent tutorial so you can get the most out of each packet, as each bit you send should convey as much information as possible. JSON might be easy to read, but we are programmers and do not need to actually read the data in our packets (unless debugging!). We simply need to interpret the bits into a usable struct in whichever language we choose.

JSON might be the simplest solution, but it is quite far from the best. The best MMOS spend years optimizing this process. Another thing you need to think about is encryption. Sending plaintext packets in JSON is a quick way to introduce vulnerabilities to your game. Packet editors are one of the oldest tools hackers have in their toolbox, and plaintext packets are just asking to be exploited.

Here are a few more resources to explore

http://ithare.com/udp-for-games-security-encryption-and-ddos-protection/

https://pvigier.github.io/2019/09/08/beginner-guide-game-networking.html

https://gamedevcoder.wordpress.com/2011/08/28/packet-encryption-in-multiplayer-games-part-1/

What you really need to do here is bit packing and unpacking. Here is a decent tutorial so you can get the most out of each packet, as each bit you send should convey as much information as possible. JSON might be easy to read, but we are programmers and do not need to actually read the data in our packets (unless debugging!). We simply need to interpret the bits into a usable struct in whichever language we choose.

JSON might be the simplest solution, but it is quite far from the best. The best MMOS spend years optimizing this process. In fact, for MMOs, it may be preferable to use TCP! Here is an excerpt from the link mentioned,

UDP is another widely used transport protocol, but it cannot be applied to MMORPGs directly due to the lack of reliable and in-order transmission. To deal with packet loss and the reordering of game messages that need strict reliability and in-order processing, an excessive amount of effort is required if UDP is adopted.

Another thing you need to think about is encryption. Sending plaintext packets in JSON is a quick way to introduce vulnerabilities to your game. Packet editors are one of the oldest tools hackers have in their toolbox, and plaintext packets are just asking to be exploited.

Here are a few more resources to explore

http://ithare.com/udp-for-games-security-encryption-and-ddos-protection/

https://pvigier.github.io/2019/09/08/beginner-guide-game-networking.html

https://gamedevcoder.wordpress.com/2011/08/28/packet-encryption-in-multiplayer-games-part-1/

Source Link
Jon
  • 534
  • 2
  • 9

What you really need to do here is bit packing and unpacking. Here is a decent tutorial so you can get the most out of each packet, as each bit you send should convey as much information as possible. JSON might be easy to read, but we are programmers and do not need to actually read the data in our packets (unless debugging!). We simply need to interpret the bits into a usable struct in whichever language we choose.

JSON might be the simplest solution, but it is quite far from the best. The best MMOS spend years optimizing this process. Another thing you need to think about is encryption. Sending plaintext packets in JSON is a quick way to introduce vulnerabilities to your game. Packet editors are one of the oldest tools hackers have in their toolbox, and plaintext packets are just asking to be exploited.

Here are a few more resources to explore

http://ithare.com/udp-for-games-security-encryption-and-ddos-protection/

https://pvigier.github.io/2019/09/08/beginner-guide-game-networking.html

https://gamedevcoder.wordpress.com/2011/08/28/packet-encryption-in-multiplayer-games-part-1/