question

Viacheslav Chiligin avatar image
Viacheslav Chiligin asked

Playfab action-event server system

Hello, I went through a lot of questions on the forum, but I still could not find an unambiguous solution to the problem.

What's the best way to send game events to the user?
Examples:
1. The player was taken to the clan and the event must be sent to him, so the user interface on his client is updated.
2. A friend of the player sent him help, and the list of currencies on the client has to update.
3. A friend request has been sent and a popup with the request must be shown.
Also, there are more similar events as well.
I have seen solutions using push notifications, but everywhere is written that you should not use this solution for the main logic of the game.

CloudScriptPush NotificationsFriends
10 |1200

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

1 Answer

·
Seth Du avatar image
Seth Du answered

It is not supported by default due to the RESTful nature of PlayFab, and you have to send a request to get a response. However, it is possible to send messages to the client via Push Notification, and with the help of Rules feature, certain event will trigger the actions like sending push notification to the target players. Please refer to Push Notifications - PlayFab | Microsoft Docs.

Meanwhile, if you mean the real-time messaging, you may consider implementing SignalR to realize this feature. Good news is that we provide an official sample on GitHub -- MessagingClient. It is the fundamental implementation of preview feature PubSub (Please note that this feature has been delayed as you can see it is not included in the roadmap).

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.