Turn timer implementation c++ sdk.(For turn based games)
Hi,
I am using photon c++ sdk for cocos2dx. Planning to make a 4 player turn based game for that i need turn timer.How should i solve it .I have two questions .
1)Is there way where i can write custom code for server ?
2)I should implement it at client side.(Because the game will be played in mobile phones with slow network) this might be not a right approach compared to implementing it at server side.
I am using photon c++ sdk for cocos2dx. Planning to make a 4 player turn based game for that i need turn timer.How should i solve it .I have two questions .
1)Is there way where i can write custom code for server ?
2)I should implement it at client side.(Because the game will be played in mobile phones with slow network) this might be not a right approach compared to implementing it at server side.
0
Comments
-
Hi @DevNeo.
1) Yes, you can use our Plugin API:
https://doc.photonengine.com/en-us/onpremise/current/plugins/manual
2) You could just use getServerTime() on the Client. That function instantly returns the current time on the server since the server start in ms by adding the time difference between client and server time to the current client side time.0