Advertisement
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Question How MCPE/PMMP server guesses if the client finished loading?

Comments in 'General Discussion' started by Lem0nTea_, Dec 4, 2014.

  1. Lem0nTea_
    Offline

    Lem0nTea_ New Member

    Joined:
    Nov 12, 2014
    Posts:
    3
    Minecraft User:
    Lem0nTea_
    I've heard PocketMine-MP sends chunk data to client after client finishes loading and prints '(client) joined the game' message. Also sometimes server doesn't recognize even if the player finished loading and got all world data.

    But, original(?) MCPE servers don't have this issue.

    Do you have any idea? I'm analysing Raklib/PMMP codes but I don't know much about RakNet protocol and UDP socket algorithms...
  2. shoghicp
    Offline

    shoghicp Staff Member PocketMine Team

    Joined:
    Aug 22, 2013
    Posts:
    436
    Plugins:
    14
    Minecraft User:
    shoghicp
    The client is spawned after 56 chunks have been sent and acknowledged by the client. This is from the server-side perspective, the client won't notify the server in any way. When the client did not spawn, it was due to some RakLib bugs with packet recovery (that were fixed in the latest builds).

    Old servers did not use this way to stream the world, the client spawned after he generated the client-side world and sent a notification to the server. Then, the server sent the world again.
    L3m0nte4_ likes this.
  3. L3m0nte4_
    Offline

    L3m0nte4_ New Member

    Joined:
    Dec 25, 2014
    Posts:
    12
    Minecraft User:
    lem0ntea_
    Wow, thanks for information. How did you get all Raknet packet structures? Did you see original OculusVR/Raknet repository or disassembled MCPE elf library?
  4. shoghicp
    Offline

    shoghicp Staff Member PocketMine Team

    Joined:
    Aug 22, 2013
    Posts:
    436
    Plugins:
    14
    Minecraft User:
    shoghicp
    OculusVR/RakNet repo was published AFTER we had done most of the work on networking, we just used it to confirm some of the names we had on the code. We abused Wireshark + guessing work to get the structure.
    iJoshuaHD likes this.
  5. iJoshuaHD
    Offline

    iJoshuaHD Notable Member Plugin Developer

    Joined:
    Nov 7, 2013
    Posts:
    1,206
    Plugins:
    4
    Minecraft User:
    iJoshuaHD
    the term abuse is fascinating xD
    iksaku likes this.

Share This Page

Advertisement