14
Marco Williams July 25th, 2016

Using Stores and IAP · •Build your own vs. PlayFab Custom Game Server •Getting Started •Create a client and Debugging Locally •Simple Messaging •PlayStream Custom Events

  • Upload
    others

  • View
    3

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Using Stores and IAP · •Build your own vs. PlayFab Custom Game Server •Getting Started •Create a client and Debugging Locally •Simple Messaging •PlayStream Custom Events

Marco WilliamsJuly 25th, 2016

Page 2: Using Stores and IAP · •Build your own vs. PlayFab Custom Game Server •Getting Started •Create a client and Debugging Locally •Simple Messaging •PlayStream Custom Events

• What is a Custom Game Server – Refresher• Build your own vs. PlayFab Custom Game Server• Getting Started• Create a client and Debugging Locally• Simple Messaging• PlayStream Custom Events• Configure Game server – Game Manager• 3rd Party Integrations• Calculating Costs• Subscribe to PlayStream Events• Q & A

Page 3: Using Stores and IAP · •Build your own vs. PlayFab Custom Game Server •Getting Started •Create a client and Debugging Locally •Simple Messaging •PlayStream Custom Events

• Server authoritative game logic• Persisted connections to the game client

• Messaging to and from the game client• Broadcast messages to all connected clients

• Engine agnostic (Unity / Photon / Unreal / custom)• Third Party Services Integrations

• Papertrail – Realtime logging• Redis – Save session state• New Relic – Server monitoring

• Built in to PlayFab

Page 4: Using Stores and IAP · •Build your own vs. PlayFab Custom Game Server •Getting Started •Create a client and Debugging Locally •Simple Messaging •PlayStream Custom Events

Pros – Build your own• Not built on Unity• You choose what type of

networking• Game Engine Agnostic

Cons• More work to implement• Custom work needed for

networking

Pros – PlayFab CGS• Easy to use Framework • Uses Unity Networking• Just add listeners for

Messaging

Cons • A bit bulky• Extra work needed to swap

out Unity Networking

Page 5: Using Stores and IAP · •Build your own vs. PlayFab Custom Game Server •Getting Started •Create a client and Debugging Locally •Simple Messaging •PlayStream Custom Events

• Built on Strange IoC – Dependency Injection Framework

• Unity Game Server

• Server CLI is already integrated

• Pre-Integrated SDK• Server, Admin & Client available

• MVC Design Pattern• Views – Store meta data• Mediators

• These are controllers• Use them to listen for network messages

Page 6: Using Stores and IAP · •Build your own vs. PlayFab Custom Game Server •Getting Started •Create a client and Debugging Locally •Simple Messaging •PlayStream Custom Events

Now lets do it .. Really!

Page 7: Using Stores and IAP · •Build your own vs. PlayFab Custom Game Server •Getting Started •Create a client and Debugging Locally •Simple Messaging •PlayStream Custom Events

• Client Does not need to use Strange IoC• Is Local Network• Using Match Maker API

Page 8: Using Stores and IAP · •Build your own vs. PlayFab Custom Game Server •Getting Started •Create a client and Debugging Locally •Simple Messaging •PlayStream Custom Events

• MessageBase – Basic Unity Network Message • Extend Message base for messages

• Complex Serialization• Class needs custom serialization• Overrides (serialize & deserialize)

• Keep Messages small • Limit in default channel

• - about 1400 bytes

• Other Message types & network objects• SyncList’s• NetworkLobbyPlayer

Page 9: Using Stores and IAP · •Build your own vs. PlayFab Custom Game Server •Getting Started •Create a client and Debugging Locally •Simple Messaging •PlayStream Custom Events

• Writing Player & Title Events• Write events for any significant actions in your game

• Data for analytics– Appuri– S3 Bucket

• Data for actions– Set Stats– Run CloudScript– Send Push Notifications

• Keep the messages small - 1k Limit

Page 10: Using Stores and IAP · •Build your own vs. PlayFab Custom Game Server •Getting Started •Create a client and Debugging Locally •Simple Messaging •PlayStream Custom Events

• Game Servers Tab in Game Manager• Uploading a Build• Build ID• Set Command Line Arguments for a Unity Server• Max Instances Per Host• Region

• Game Modes• Max Player Count

• Viewing Logs

Page 11: Using Stores and IAP · •Build your own vs. PlayFab Custom Game Server •Getting Started •Create a client and Debugging Locally •Simple Messaging •PlayStream Custom Events

• New Relic – Build in Addon• Turn it on in Game Manager

• PaperTrail – Real Time Logging

• Other Services• Redis - https://redis.codeplex.com/

• https://redislabs.com/redis-cloud

Page 12: Using Stores and IAP · •Build your own vs. PlayFab Custom Game Server •Getting Started •Create a client and Debugging Locally •Simple Messaging •PlayStream Custom Events

• New Relic – Build in Addon• Turn it on in Game Manager• CPU Usage & Memory Usage• How many Players can each instance handle• Do this in beta testing or a small load test simulation

• Amazon Pricing• https://aws.amazon.com/ec2/pricing/• Have to request instance type

Page 13: Using Stores and IAP · •Build your own vs. PlayFab Custom Game Server •Getting Started •Create a client and Debugging Locally •Simple Messaging •PlayStream Custom Events

• Broadcast updates from Game Manager to the client

• Pair it with CloudScript

• Use Built in Events

• Use Custom PlayStream Events

Page 14: Using Stores and IAP · •Build your own vs. PlayFab Custom Game Server •Getting Started •Create a client and Debugging Locally •Simple Messaging •PlayStream Custom Events

Questions? Q&A

Game Server Resources:

https://api.playfab.com/docs/custom-game-servers

https://github.com/PlayFab/PlayFabGameServer