How to connect to multiplayer *another players "base*

Hello community! Wonderful community :slight_smile:

Got somewhat a complex simple question here and hopefully someone has the answer.
Say for example clash of clans game base model. You can connect to other players “bases”. Question is how would I implement that into my game. Like once my game is started, I select my base layout, arrange as pleased and then I would like to connect to another players base and collect there treasure.
Hopefully this got the point across of what I’m trying to accomplish. If not please feel free to ask questions:)

Thanks guys and gals!!! :slight_smile: