question

emreedemir avatar image
emreedemir asked

Leaderboard, Dynamic Respone To Client

I am trying to make touarnament system , When i create leaderboard for tournament everyting good, but how can i notify client Tournament is finished dynamicyly,when player is offline everting ok i am sending push notification player open the game and Client codes execute the Tournament finished remove tournament section from player's menu,but player is online ,how to execute code remove tournament section player's menu ,i wonder,should i check to is tournament is finish everytime on client code ?,doesnt it enforce playfab seding request to often?

Leaderboards and Statistics
10 |1200

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

Ivan Cai avatar image
Ivan Cai answered

Currently, playfab does not support for real-time communication between server and client. The tournament has been finished due to the reset of leaderboard, whether you are daily or weekly, or reset manually. You can create a cloudscript function that will perform a check to see when the leaderboard is reset, instead of checking on the client. SingalR allows bi-directional communication between server and client. Servers can now push content to connected clients instantly as it becomes available. If the player is online, you can use SignalR to give the player a prompt message stating that the tournament has ended, and the player confirms to trigger the remove section function.

10 |1200

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

emreedemir avatar image
emreedemir answered

is it possible adding trigger to client when reset time of leadearboard

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.

Ivan Cai avatar image Ivan Cai ♦ commented ·

In general, you can use rules feature can trigger a playstream event/custom event to execute cloudscript. However, one event related leaderboard reset is "com.playfab.player_ranked_on_leaderboard_version", it is triggered for the top-ranked players(not all players) on a leaderboard when the leaderboard version changes. You can try to use these two events to achieve it.

0 Likes 0 ·

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.