Documentation for the Unreal C++ Library
|
Setting up a server and matchmaking a user is quite simple. All of the functionality is kept in UMultiplayerManagerComponent.
In order for your server to work with the PixoVR multiplayer platform and matchmaking system, you will need to add a UMultiplayerManagerComponent to your project. UMultiplayerManagerComponent should be added to your game instance.
In order for matchmaking to work, you will need to set the users and modules information.
The Pixo Multiplayer Plugin will get the module id and module version from ApexSDK if you're using the ApexSDK Plugin.
There are only two functions that you'll need to set the information.
void SetUserInfo(FString InUserName, int InUserOrgId): Used to pass the users information to the online subsystem.
InUserName
is the users name or custom username for use in multiplayer and networked scenarios. Passing an empty string will not override the existing set username.InUserOrgId
is the organization id of the user currently being matchmaked. Passing a value below 0 will not override the existing set user orginization ID.void SetModuleInfo(int InModuleId, FString InModuleVersion): Used to pass the modules information to the online subsystem.
InModuleId
is the modules id, generated by the Pixo Platform. Passing a value below 0 will not override the existing set module ID.InModuleVersion
is the current version of the module. Important to ensure matchmaking works. Passing an empty string will not override the existing set module version.The Pixo Unreal Multiplayer Plugin is just a customized OnlineSubsystem that can communicate with the PixoVR Multiplayer platform. The standard function calls for finding and connecting to servers work the same. We have, however, provided a easier custom function to allow you to find a match on a server.
bool FindSessions(int InOrgId, int InModuleId, FString InUserName, FString InModuleVersion): Used to find an on going session on a existing server or to establish a new server. All parameters are optional but allow you to avoid having to call SetModuleInfo or SetUserInfo.
InTimeoutInSeconds
is the amount of time (in seconds) before FindSessions will timeout.InOrgId
is the organization id of the user currently being matchmaked. Passing a value below 0 will not override the existing set user orginization ID.InModuleId
is the modules id, generated by the Pixo Platform. Passing a value below 0 will not override the existing set module ID.InUserName
is the users name or custom username for use in multiplayer and networked scenarios. Passing an empty string will not override the existing set username.InModuleVersion
is the current version of the module. Important to ensure matchmaking works. Passing an empty string will not override the existing set module version.Connecting to a server is quite fast when there is a free spot on an existing server. When a new server is being created, it can take over a minute. The default timeout is 120 seconds, but can be increased. Anything less than this will be defaulted to 120 seconds.
You can also still make a call to IOnlineSessionPtr::FindSessions
. When passing your SearchSettings
, adding the following values to your SearchSettings->QuerySettings
allow you pass the same values as what's found in UMultiplayerManagerComponent.
OrgID
is the organization id of the user currently being matchmaked. Passing a value below 0 will not override the existing set user orginization ID.ModuleID
is the modules id, generated by the Pixo Platform. Passing a value below 0 will not override the existing set module ID.UserName
is the users name or custom username for use in multiplayer and networked scenarios. Passing an empty string will not override the existing set username.ModuleVersion
is the current version of the module. Important to ensure matchmaking works. Passing an empty string will not override the existing set module version. Setting SearchSettings->QuerySettings.TimeoutInSeconds
can override the default timeout time of 120 seconds, but can never be less than 120 seconds.All other functionality remains the same as what is found in Unreal Engine. For more information, please refer to the Unreal Engine documentation.