Hi all
Working with the multiplayer functionality and have run into a problem, that someone have hopefully some idea how to fix.
The setup
My initial idea is to just have a host connected at all times. Which will handle the communication and solve the problem of not being able to select a new host when the current one leaves. Whether there is a work around I don't know, so this is what I aim for at the moment.
On the front page I have an ordinary chat functionality with a chat window and a list of people that are connected. And they can chat with each other.
The problem
My problem occurs as a peer for instant click to show high score it goes to a new layout where the chat functionality is not available, when they then go back the peers doesn't show up In the list of connected peers. However testing it there is still connection between the host and the peer, and they can still chat.
So what I would like is for the host to broadcast the peers when someone enters that layout again. And I can get it to work to some degree meaning that I can broadcast the peers, but it will only broadcast the last connected peer alias several times for each peer count.
I have tried using a "for 0 to Multiplayer.peercount" and hoped that it would then be able to broadcast each peer alias. But can see any way of picking a peer so I can make sure that it broadcast the correct one.
Have some alternative ideas of how to solve it, which I haven't tried yet, but I think will work. But have anyone tried anything similar and solved it some clever way?