New to BOLT. Need some suggestions!

Hello I have been learning BOLT for Unity and multiplayer network coding over the past week and need some guidance on how to implement a desired feature for my game.

I will just analogize this to minecraft, but basically theres a big 3d array of tiles (integers) that need to be synced between all players.

One player starts the world from a world save -> it populates the 3d array with the right info -> the game starts.

Then when any player joins this session, it should use the same world. Any time a player breaks or places a block it should update it to everyone and re-render the chunk if it is close enough to another player.

There are a couple possibilities that I'm not sure are best. One way is only the server knows about the world data, and each player queries the world for info (GetTIle(x,y), HasTile(x,y), etc...). Then the players would only need to know about the tiles when they need to. This would also mean the server has to send a message to rerender chunks when they change.

The other way is each player has a synced copy of this big array, and simply queries into it (I assume much faster) and if they change a block it gets sent to everyone. They can all have their own chunk renderer that just works with their own array. The hard part of this is that now when the player loads in they have to be sent the copy of this array, which may be on the order of 2000x2000 32 bit integers.

Do you think BOLT can handle either of these solutions and in what way would you recommend doing it (using events/state/commands, etc.). It would be really great if you could be specific because I feel like on a high level I understand it I just need to translate it into code.

Thanks!

Comments

  • Each world can have a seed that generates the world, then you just sync over the changes from the world from the seed to clients (perhaps just the vicinity). This could be serialized in events, once a client receieves all the data they can start the game.