Run multiple game on one Photon server on one single machine
Options
Ram
✭
I would like to know that is there any way to run multiple game on one Photon server on one single machine. I didn't find any way to do so. I have tried by doing different UDP port but photo didn't allow to run multiple instance on one PC. so please tell me how i can achieve this functionality.
If you have any reference URL pls give me
thanks in advance
If you have any reference URL pls give me
thanks in advance
0
Comments
-
Hi, Ram
there is no out of the box way to do so. you need to do some efforts to get this. you may find GameApplication class in master server code. it may serve as sample. you may have many such applications. user will send you application id during authentication and you will choose corresponding GameApplication. Same should be added on GS.
you may invent your own way to do this
best,
ilya0 -
That actually is possible and the easiest solution.Ram said:I have tried by doing different UDP port but photo didn't allow to run multiple instance on one PC.
You only can run one instance of Photon Control on the same machine, but you can run multiple instances of Photon itself on the same machine (for controlling them you would need to use the batch files instead of PhotonControl in that case). Of course you need to configure each instance to use different ports than any other instance in that scenario. I have never done this myself, but I remember that people have successfully achieved it in the past.0 -
The LoadBalancing demo in the SDK does exactly this.
It consits of a master server and a game server which in the default setup are all running on the same machine. If you take a look at the PhotonControl.exe.config, PhotonServer.config and each of the Photon.LoadBalancing.dll.config files you should be able to see how they're run on the same machine and just listening on different ports. An earlier version of this actually ran a single Master and two Game servers on the same box.0