Practical Methods of Saving, Loading, Writing and Receiving Open Worlds using PUN

Howdy folks,

I've been working on an open world 2D game and am on the verge of adding chunk loading, but am wondering what's the best approach to giving players chunk data.

My original idea was simply to have the MasterClient receive a message saying a player wants to load an area and send them an array of [128x128] bytes but thinking about it now it doesn't seem practical. It would be much better for the player to load the area using the world seed, and only receive changes made to the world by other players.

I was wondering if anyone had any past experience working on something like this and could offer any insight.

Comments

  • Hi @VenetianBears,

    It would be much better for the player to load the area using the world seed, and only receive changes made to the world by other players.


    Yes, this is probably the best approach and the way to go in this case. When having the seed, the client can create the world and apply modifications made to it afterwards. Our PUN 2 Early Access version includes an example for a procedural demo made with PUN. In this example we are using the Custom Room Properties to store the seed of the world, some options for the world generator and modifications made to the world. Depending on what kind of modifications you want to allow in your game, I guess you can basically use the same approach, so feel free to take a look at the demo and ask questions about it.

    Another option you can think of is using Network Culling. This way you can optimize receiving messages on clients and prevent them getting flooded with information they currently don't need.