Search Unity

Strategy game help needed

Discussion in 'Multiplayer' started by s_marcell, Jul 14, 2021.

  1. s_marcell

    s_marcell

    Joined:
    Mar 22, 2018
    Posts:
    20
    Dear everyone,

    I am making a p2p 2 player turn based strategy game where players have to build upon individual blocks that are generated randomly as part of the whole map with a certain seed based algorythm. This script relies heavily on child and parent relations so spawning the map from the server to all the clients with individual networked blocks seems to be a bad idea.

    So what I came up with as a solution is to use the server to tell each client the seed thus the map will be the same on each clients computer however these are not synchronized yet. The individual blocks and resources located on top of the blocks can be destroyed and built upon. So each of these prefabs would then spawn a gameobject with a network identity component and would be hooked up so when a certain block or resource has been destroyed the corresponding networked gameobject would as well and that's how all the clients will know what to destroy or modify on their own computers.

    I'm really not sure if that makes sense at all but if it does and you think it might work please tell me as well as any other tips on this solution.

    Screenshot (67).png This is just a glimpse of what the map looks atm so you get the idea what I'm trying to achieve. The level count can also be modified.


    Thanks in advance.