Using Stores and IAP - Amazon S3s3-us-west-2.amazonaws.com/.../10_Williams_BuildingCustomGame… ·...

Preview:

Citation preview

Marco WilliamsJuly 25th, 2016

• 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

• 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

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

• 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

Now lets do it .. Really!

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

• 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

• 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

• 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

• 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

• 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

• Broadcast updates from Game Manager to the client

• Pair it with CloudScript

• Use Built in Events

• Use Custom PlayStream Events

Questions? Q&A

Game Server Resources:

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

https://github.com/PlayFab/PlayFabGameServer

Recommended