question

next2heaven avatar image
next2heaven asked

Listen for Messages in Javascript

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.

next2heaven avatar image next2heaven commented ·

Good grief, accidentally posted this without details.

So my issue is that there will be a small number of users on their phones connected to an Unreal Engine client. I need Unreal to send out messages to the users in the game which I'll figure out but was confused on how to listen for these events (or data...not sure of the language) in Javascript on each of the phones. I don't see how to setup a listener for those. Maybe I have it wrong on how that works.

0 Likes 0 ·

1 Answer

·
brendan avatar image
brendan answered

So, it sounds like your question is specifically how to connect non-Unreal client devices to an Unreal client and exchange data between them. Is that the case? While we can support any of our own technologies, we're not really the right source for support of the Unreal engine itself. If you're actually asking about how to use Rules in PlayStream or similar, could you clarify the question?

4 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.

next2heaven avatar image next2heaven commented ·

Sorry, so my question is about sending messages between 'users' I guess. The main game on Playstation will be controlling the logic while users simply use a website to control various parts. I know that I can send data through the PlayFab service but my main question is how to listen for these data changes (sepecifically in javascript). Should I be looking at the Groups part of the API? Or somewhere else to listen for changes to a current game. Or is that not possible? I would think it would be as this is similar to how a chat room would work...in that it's listening for changes to the log.

0 Likes 0 ·
brendan avatar image brendan next2heaven commented ·

It really depends upon the specifics. How many users need to be able to exchange data? How often? How large is the data? If there's a difference between the data size/rate being sent from one or another part of the connected devices (if one is acting as a kind of "server"), what are the differences?

Since this is an Unreal game, and you mentioned a chat room (basically, a relay service) as being similar, I'm guessing it's a realtime game that'll have a data exchange rate of more than a few times a minute, continuously throughout the session. The most likely answer in that case is that you'll want to use Photon Realtime to have a "Room" that clients join, so that they can pass messages back and forth. Unless you need server-side authority over the session, in which case, you'll want to use custom game server hosting. In the latter case, you can use our matchmaker with those servers, whether they're hosted with us or not.

0 Likes 0 ·
next2heaven avatar image next2heaven commented ·

I see. So the PlayFab service is for dealing with all the events, users, inventory, etc but it relies on 3rd party services for realtime multiplayer parts of a game (like seeing others move in the world) correct?

0 Likes 0 ·
brendan avatar image brendan next2heaven commented ·

For the PlayFab core service - the Web API calls used to interact with the data, stats, events, etc. in PlayFab - that's correct. We do also support realtime via custom game server hosting and our Photon integration. We'll be expanding on that in future, as well (for example, the updated server hosting we mention in our blog: https://blog.playfab.com/blog/playfab-roadmap-2018-q3-july-september-edition).

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.