I’m making a multiplayer minesweeper game, and I’ve been trying to replicate mines from the server to the client, and it’s not working, any ideas on how I can improve the blueprint and if I am even doing it correctly
The most efficient approach would be to generate a random seed, change all your random calls to their seeded equivalent, then just send the seed to the client and let the client rebuild the minefield himself.
However, looking at your graph, this might not work if you’re iterating actors from a GetAllActorsOfClass() call, as it will not be consistently sorted…
Alternatively, assuming your Tile class has a variable “bIsBomb” (which becomes true when you call BecomeBomb), simply replicate that variable. You might want to make it RepNotify so you can use the “OnRep_bIsBomb” event to also execute on clients whatever you do in the BecomeBomb function.