question

madmojoman avatar image
madmojoman asked

PlayStream Events to Custom Game server

The situation I have is that I want to give an update to a player's Player Data (Title) a unique key and value to any new players when their account is created for the game title. I have a custom game server that I would like to be able to handle the processing to make certain they are given a unique value related to other player's data from a given segment, and that they are given that value in a specific order. So if there are 2+ players creating an account at the same time they are not given the same key value.

The plan is to setup a sort of queue system where a new player will be tossed into this queue to be handled on a first-come, first-set basis. I'd like the custom game server to be able to know when a player account has been created and give them the proper key-value. But I can't seem to locate any way of subscribing to any PlayStream event. (I found some notes on PlayFabPlayStreamAPI.Start not really being supported, and a PubSub thing that's in preview right now.) But nothing I could use immediately just to get a simple notification to the game server.

Has anyone setup something similar for this situation? Is a solution available? Or can someone write up a simple guide to getting, either from PlayFab PlayStream events or a CloudScript function, to send a message to Custom Game Server on PlayFab's Legacy Multiplayer area, please?

Custom Game ServersPlayStream
1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

madmojoman avatar image madmojoman commented ·

I decided to change out the current CloudScript option that doesn't work and get the client to update the server when it needs to handle that stuff instead as a part of my current login/registration checks. So, I guess nevermind on the ideas on how else to do it.

But I am still interested in whether there's some way other than PubSub to have a custom server alerted to or aware of PlayStream events?

0 Likes 0 ·

1 Answer

·
Citrus Yan avatar image
Citrus Yan answered

Hi @madmojoman,

>>But I am still interested in whether there's some way other than PubSub to have a custom server alerted to or aware of PlayStream events?

You can utilize Webhooks to notice a custom server of certain PlayStream events, PlayFab will forward the event data to any web URL you want via POST in the request body as JSON when they occur. Moreover, you can also set up a Rule to react to certain events by executing a CloudScript function that makes webhook calls to any Web API endpoint with related event data, this will give you more flexibility to handle these events.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.