I’m a total newbie with Unity, but I’ve been working for fun on a table game. The game is like this: there are rounds, and in every round there are 4 turns, on every turn one player must do something (like kill, or watch, or revive) and then the next turn begins, and after the 4 turns end, a new round begins until someone wins.
To make the turns, I’m using IEnumerator methods with WWWForm and taking from a PHP all the info I need, and it’s working fine. The problem is, I don’t know how to make the other clients to notice that a new Turn begins.
I have searched and tried using the Network classes, but I’m don’t understand them and they aren’t working. I have also tried to use the Push Android system, but I need a developer Android license and that’s impossible to me right now.
The question is, which would be the easiest and simplest way that, when one player finishes a Turn, all the others get notified?
Extra information: I have tried to use deprecated methods, but they aren’t working either. I don’t understand how can something that seems so simple, be so difficult for me. My idea is just that, when a player takes his turn, he first attacks the DDBB to make the turn, and then he “communicates” to the other players that he has made his turn, and all those players attack the DDBB to check and load the changes on their screens.
Seems like your game would benefit from some Realtime connection. Suck as websockets or sockets. But if you want to stay with the PHP / DB solution. The only thing that I know is to do polling. Basically check the DB every 5 seconds if a new turn started
Uh, thats a good idea! I think Ill try the polling option, but if I would like to change and use Realtime connection, any good tutorial you could link me? thanks ^^