Problem with procedural generation
Options
Hi,
I have a problem to send an array from one client to another, because my game generate an arena with an algorithm and each client of the server generate is own arena when launching the game. So, I would like to know if there is a way to generate my arena on the server, and send it to my clients. Or if my first client can generate and send the arena to the other clients.
I have a problem to send an array from one client to another, because my game generate an arena with an algorithm and each client of the server generate is own arena when launching the game. So, I would like to know if there is a way to generate my arena on the server, and send it to my clients. Or if my first client can generate and send the arena to the other clients.
0
Comments
-
Ok, I find the answer. The problem comes from my array, because it was an array with 3 dimensions and to solve that, I just have to transform my array to a 1 dimension array.0
-
In best case, you sync the seed for Random. Then generate the same level on all clients from that.
It "just" has to be deterministic, then you have just a few bytes to sync.0 -
Have a look at this test, which generates the level, based on a synced seed:
https://www.dropbox.com/s/xu6pt7wokjkicv0/LevelGeneration_U5.zip?dl=00