question

paulucci-marco07 avatar image
paulucci-marco07 asked

GameServer Example Questions

@Brendan as it won't let me reply more, I continue here. I have set up a gameserver using the sample server provided by PlayFab, and was able to create a game from Postman.

However I'm very confused by this example.

- What am I supposed to do with this chat? Can I just remove it?

- Why is it logging a PFClient? Can't it just operate with secret key? Does this client have a purpose?

- Why is there an interface at all? Is this so I can run a local game server to debug my game logic?

- The entire tutorial on setting MVC with mediator and such. I see nothing about this on the actual working example.

Thank you.

apis
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

Technically, the threads in AnswerHub can go on basically indefinitely, so I'm not sure what you ran into that made it look like you couldn't respond. Nevertheless, to answer your questions:

1. The server shows using a chat channel. If you don't want one, feel free to remove it.

2. Not sure what you mean. There's a good bit of logic around the client in there, yes. What are you looking at specifically that you're wondering about? The server also uses the Server API for operations that are more secure, and which use the Secret Key.

3. Yes, part of the design is to allow you to run it all locally, for debugging purposes.

4. That's specifically the StrangeIoC part of the server logic. Have a look at the readme for more info on that: https://github.com/PlayFab/PlayFabGameServer/blob/3cb270ba33695d71a8fe45c4ff30842e21a37672/README.md

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

paulucci-marco07 avatar image paulucci-marco07 commented ·

@Brendan - I wasn't seeing the option for some reason. Anyways, i've made some progress. I managed to get a game server running and then connected a client to it as well.

- On my server logic, instead of creating a new user, shouldn't I log in with a preset user with a secret key? Instead of creating a new one like the ClientExampleScript does.

- How do I send data back and forth between my client app & game server? I'm unable to find any functions for this in the client matchmaking API.

- Should I be using StrangeloC? Considering the complexity of this, I would avoid making things more complicated for the team.

- I'm about to reach my 20 free game server hours. What happens if I extend it to 7500? PlayFab says I'm not getting charged until my game goes live.

Thanks again.

0 Likes 0 ·
brendan avatar image brendan paulucci-marco07 commented ·

You shouldn't be logging players in on your server - they log in with PlayFab directly from the client, and then either matchmake to your server and present a matchmaker ticket, or else send a Session Ticket to establish their identity with your server (using the Server API).

Messaging between your server and your client is simply via any network protocol you like. Our server sample uses the UnityNetworkingContext.

For StrangeloC, I'd just recommend not using it. It's a complication you don't need to worry about.

Custom game server hosting is not included in the core service. Server hosting, CDN usage, and Add-on Marketplace integrations that have cost (many don't) are separate, as they are potentially unbounded, and so cannot be included in the core service pricing. So outside the limited free server hours, you do have to pay for your usage.

0 Likes 0 ·
paulucci-marco07 avatar image paulucci-marco07 brendan commented ·

Thanks Brendan again.

- Alright then. So I guess shouldn't be logging in at all on my server, unless I'm testing the gameserver on Unity, right?

- OK. I've seen something about UNC, will research it further.

- K. Considering my game is far from done, may I request to switch my instance to t2.nano, so that I'm unable to test without having to pay as much? It's literally only me testing currently. If I should submit a ticket instead, let me know.

0 Likes 0 ·
Show more comments

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.