Integrating PUN cloud with own authoritative server.
Options
sosh
✭
Hi,
In our project we have a self hosted (non photon) server which handles persistent state and certain game logic.
My question is regarding the options available for the our server to communicate with the PUN cloud service, in order to be involved in game events in an authoritative way. I'll give two examples of what we are trying to acheive:
1. When a player joins a room, own-server should verify that the player has rights to join that room, otherwise join should be rejected.
In this case webhooks and PathJoin/GameJoin looked quite promising. (I.e. Photon would call our server when a player tried to join a room, and our server would have a chance to reject it). However, I read in another thread that " PathJoin cannot cancel join operation", so this seems impossible (if still the case).
2. Own-server should be able to send command to PUN cloud server to kick a particular player.
(I haven't found a possible approach for this yet)
Please could someone at photon advise on what might be the best approach for these requirements?
Thank you!
S
In our project we have a self hosted (non photon) server which handles persistent state and certain game logic.
My question is regarding the options available for the our server to communicate with the PUN cloud service, in order to be involved in game events in an authoritative way. I'll give two examples of what we are trying to acheive:
1. When a player joins a room, own-server should verify that the player has rights to join that room, otherwise join should be rejected.
In this case webhooks and PathJoin/GameJoin looked quite promising. (I.e. Photon would call our server when a player tried to join a room, and our server would have a chance to reject it). However, I read in another thread that " PathJoin cannot cancel join operation", so this seems impossible (if still the case).
2. Own-server should be able to send command to PUN cloud server to kick a particular player.
(I haven't found a possible approach for this yet)
Please could someone at photon advise on what might be the best approach for these requirements?
Thank you!
S
0
Best Answer
-
Hi,
1: possible, using Plugins as JohnTube mentioned ( but you'll need to host photon server yourself or use an enterprise Cloud, plugins are not available for public cloud applications)
http://doc.photonengine.com/en-us/onpremise/current/plugins/manual#onjoin
you can fail a join procedure using that callback. so a user that is blacklisted will never be able to join a given room if you decide it so.
2: not possible, unless you modify the server code, which I doubt is recommended. Instead, you should flag that player in your user management system, so that next time that players tries to log in, you constraint that player possible choices.
Bye,
Jean5
Answers
-
Hi @sosh,
You should try Photon Plugins.
1. Photon WebHooks are an example of a Photon Plugin implementation. It can be changed in the future to add the possibility to cancel or abort join operations. Meanwhile, you can do it in another plugin.
2. I think this is feasible with plugins but it's still not 100% out-of-box.
0 -
Hi,
1: possible, using Plugins as JohnTube mentioned ( but you'll need to host photon server yourself or use an enterprise Cloud, plugins are not available for public cloud applications)
http://doc.photonengine.com/en-us/onpremise/current/plugins/manual#onjoin
you can fail a join procedure using that callback. so a user that is blacklisted will never be able to join a given room if you decide it so.
2: not possible, unless you modify the server code, which I doubt is recommended. Instead, you should flag that player in your user management system, so that next time that players tries to log in, you constraint that player possible choices.
Bye,
Jean5 -
Thank you both for your replies.0