<commit_before># PlayFab Custom Game Server
Out of the Box Game Server for PlayFab.com


#### Dependencies
* StrangeIoC For Unity (included)
* PlayFab Game Server SDK (included)
* PlayFab Supports Building to Windows Platform only for Game Servers 

#### Prerequisites 
* General Understanding of Unity
* Understanding of C#
* Understanding of StrangeIoC ( not required, but a bonus )
* Understanding of Dependancy Injection ( not required, but a bonus )

#### Overview
 This repository contains the source code for a Customizable Game Server made with Unity3D.  It runs in server mode (headless) and it's purpose is to provide server authoritive logic and / or Multiplayer networking functionality that can be uploaded to the PlayFab Game Servers tab.  This is an Out of the Box solution, that is super easy to customize.
 
#### Features
* Accepts and stores configuration params that are passed in to the commandline of the server
* Sets up Unity Networking and waits for incomming connections
* Manages connections and disconnections
* Provides PlayFab Session authorization
* Logger
* Local Debug Mode

 #### Getting Started Guide

When getting started with this custom game server it is good to know or at least understand what StrangeIoC is all about.  So I advise you to visit http://strangeioc.wordpress.com for more information about this framework.  However, it is not required to know as I'll explain the basics that you need to know to modify the game server.

StrangeIoC has an MVC (ish) style to it.  There are Views, and Controllers.  Controllers are generally called Mediators.  Since this is a game server there won't be any UI to it,  thus the views do not do anything other than provide a binding to the Mediators.  Mediators is where you will do most or all of your logic.

Once you've downloaded the project and opened up the code editor (whether it be Monodevelop or Visual Studio) you'll see some folders and I want to take a moment to review those with you.

* *StrangeIoC* - This folder contains the current version of StrangeIoC  (which is open source and free)
* *PlayFabSDK* - This is a special version of our SDK that was generated specifically for use in this project.
* *Contexts* - StrangeIoC has this notion of Contexts which are like modules for your applications.  I have created a few different contexts that provide additional functionalty for use with PlayFab and Unity Networking.
  * *MainGameServerContext* - This context is your main context and where you will place your views and mediators.  It is the heart of the application and from the main context all other contexts are loaded in.
  * *PlayFabContext* - This is a specially generated StrangeIoC context to integrate the PlayFabSDK so that it can be more easily called using the StrangeIoC paradigm.  Pretty much don't touch this unless you really know what your doing.  Furthermore it's autogenerated, so anytime we update the SDK, this gets regenerated and your changes will likely get overwritten when you upgrade.  So if you find the need to modify this, then please submit a pull request for us to evaluate your change.
  * *PlayFabServer* - This context has one functionality and one only,  it parses the command line arugments sent in from the PlayFab Instance Generator and stores them for use in ServerSettingsData.  Which you can Inject into your mediators and have instant access to it.
  * *UnityNetworkingContext* - This context sets up a Unity Networking Server and listens on the port that is passed into the PlayFab Server when the instance is generated.  This all happens at startup of the server.  It then stores the NetworkManager & the NetworkClient along with other important information about who is connected to the server.  It stores all its data in UnityNetworkingData object that you also Inject into your mediators.  We will get more into the details of this later.  

#### A quick setup step before I forget to tell you!
Because the server needs to authenticate your users, it needs to know what Title to do this against. The server won't know this so you will need to set this manually.  To do this, open up the StartUp scene in teh StartUpScene folder.  This is the main scene for the application and the only scene needed.  There are some advanced features of unity networking, which we won't cover in this documentation that allows scene switching and sync that to all clients. But for now let's keep thing simple.   <commit_msg>typo formatting<commit_after># PlayFab Custom Game Server
Out of the Box Game Server for PlayFab.com


#### Dependencies
* StrangeIoC For Unity (included)
* PlayFab Game Server SDK (included)
* PlayFab Supports Building to Windows Platform only for Game Servers 

#### Prerequisites 
* General Understanding of Unity
* Understanding of C#
* Understanding of StrangeIoC ( not required, but a bonus )
* Understanding of Dependancy Injection ( not required, but a bonus )

#### Overview
 This repository contains the source code for a Customizable Game Server made with Unity3D.  It runs in server mode (headless) and it's purpose is to provide server authoritive logic and / or Multiplayer networking functionality that can be uploaded to the PlayFab Game Servers tab.  This is an Out of the Box solution, that is super easy to customize.
 
#### Features
* Accepts and stores configuration params that are passed in to the commandline of the server
* Sets up Unity Networking and waits for incomming connections
* Manages connections and disconnections
* Provides PlayFab Session authorization
* Logger
* Local Debug Mode

#### Getting Started Guide

When getting started with this custom game server it is good to know or at least understand what StrangeIoC is all about.  So I advise you to visit http://strangeioc.wordpress.com for more information about this framework.  However, it is not required to know as I'll explain the basics that you need to know to modify the game server.

StrangeIoC has an MVC (ish) style to it.  There are Views, and Controllers.  Controllers are generally called Mediators.  Since this is a game server there won't be any UI to it,  thus the views do not do anything other than provide a binding to the Mediators.  Mediators is where you will do most or all of your logic.

Once you've downloaded the project and opened up the code editor (whether it be Monodevelop or Visual Studio) you'll see some folders and I want to take a moment to review those with you.

* *StrangeIoC* - This folder contains the current version of StrangeIoC  (which is open source and free)
* *PlayFabSDK* - This is a special version of our SDK that was generated specifically for use in this project.
* *Contexts* - StrangeIoC has this notion of Contexts which are like modules for your applications.  I have created a few different contexts that provide additional functionalty for use with PlayFab and Unity Networking.
  * *MainGameServerContext* - This context is your main context and where you will place your views and mediators.  It is the heart of the application and from the main context all other contexts are loaded in.
  * *PlayFabContext* - This is a specially generated StrangeIoC context to integrate the PlayFabSDK so that it can be more easily called using the StrangeIoC paradigm.  Pretty much don't touch this unless you really know what your doing.  Furthermore it's autogenerated, so anytime we update the SDK, this gets regenerated and your changes will likely get overwritten when you upgrade.  So if you find the need to modify this, then please submit a pull request for us to evaluate your change.
  * *PlayFabServer* - This context has one functionality and one only,  it parses the command line arugments sent in from the PlayFab Instance Generator and stores them for use in ServerSettingsData.  Which you can Inject into your mediators and have instant access to it.
  * *UnityNetworkingContext* - This context sets up a Unity Networking Server and listens on the port that is passed into the PlayFab Server when the instance is generated.  This all happens at startup of the server.  It then stores the NetworkManager & the NetworkClient along with other important information about who is connected to the server.  It stores all its data in UnityNetworkingData object that you also Inject into your mediators.  We will get more into the details of this later.  

#### A quick setup step before I forget to tell you!
Because the server needs to authenticate your users, it needs to know what Title to do this against. The server won't know this so you will need to set this manually.  To do this, open up the StartUp scene in teh StartUpScene folder.  This is the main scene for the application and the only scene needed.  There are some advanced features of unity networking, which we won't cover in this documentation that allows scene switching and sync that to all clients. But for now let's keep thing simple.   
{'fraction_non_alphanumeric': 0.03407689720883309, 'fraction_numerical': 0.0002241901132160072, 'mean_word_length': 4.30755502676978, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '388496', 'n_tokens_mistral': 2202, 'n_tokens_neox': 2052, 'n_words': 1405}