question

Gilbert Villanueva avatar image
Gilbert Villanueva asked

Can the server trigger an event in the client side?

Scenario: We have a boss character that is attacked by multiple players at the same time, how can we design our code with PlayFab to update the boss character's health in all the players client app when a player attacks the boss? Is that possible with PlayFab?

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

·
brendan avatar image
brendan answered

No, currently we do not provide a data or statistic system that would allow you to aggregate information across all players. Trying to use a "fake player" account for your boss character is not supported, and would cause performance issues (which would force us to throttle the title's calls). Right now, you would need to use an external data store for this - I'd recommend a Redis Int, specifically.

We will be introducing an updated statistics service soon, which will have greatly increased capabilities in this area soon. Keep an eye on our blog page for more info on this.

2 comments
10 |1200

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

Gilbert Villanueva avatar image Gilbert Villanueva commented ·

Thanks for the quick response. I noticed that you guys have PubSub coming which is perfect for what we need. Do you guys have a timeline on this?

0 Likes 0 ·
brendan avatar image brendan Gilbert Villanueva commented ·

I'm not sure I follow. PubSub will allow you to push arbitrary data down to connected clients. It wouldn't enable aggregation of data from all players to a single data store.

PubSub is in private preview right now. We'll be moving it to Public Preview as soon as we can, but it's dependent upon how quickly we can get substantive feedback on the implementation. Once it gets to Public Preview, it'll be available for everyone to try. After that, we'll give it some "bake" time to look for issues before we move it to General Availability - the time for that will depend on how much live usage it gets. General Availability is the point where it'll officially be supported for live titles.

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.