I search for solutions in this order: Past Code, Unreal Source, Wiki, BUF, groups.yahoo, google, screaming at monitor. – RegularX

UE3:OnlineGameInterface (UDK)

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to: navigation, search
UDK Interface >> OnlineGameInterface

Contents

Package: 
Engine
Known implementing classes:
OnlineGameInterfaceImpl
This interface in other games:
UT3

This interface deals with the online games. It creates, destroys, performs searches for online games. This interface is overloaded to provide custom matchmaking services

Delegates[edit]

OnArbitrationRegistrationComplete[edit]

delegate OnArbitrationRegistrationComplete (name SessionName, bool bWasSuccessful)

Delegate fired when the online game has completed registration for arbitration

Parameters:

  • SessionName - the name of the session the that had arbitration pending
  • bWasSuccessful - true if the async action completed without error, false if there was an error

OnCancelFindOnlineGamesComplete[edit]

delegate OnCancelFindOnlineGamesComplete (bool bWasSuccessful)

Delegate fired when the cancellation of a search for an online game has completed

Parameters:

  • bWasSuccessful - true if the async action completed without error, false if there was an error

OnCreateOnlineGameComplete[edit]

delegate OnCreateOnlineGameComplete (name SessionName, bool bWasSuccessful)

Delegate fired when a create request has completed

Parameters:

  • SessionName - the name of the session this callback is for
  • bWasSuccessful - true if the async action completed without error, false if there was an error

OnDestroyOnlineGameComplete[edit]

delegate OnDestroyOnlineGameComplete (name SessionName, bool bWasSuccessful)

Delegate fired when a destroying an online game has completed

Parameters:

  • SessionName - the name of the session this callback is for
  • bWasSuccessful - true if the async action completed without error, false if there was an error

OnEndOnlineGameComplete[edit]

delegate OnEndOnlineGameComplete (name SessionName, bool bWasSuccessful)

Delegate fired when the online game has transitioned to the ending game state

Parameters:

  • SessionName - the name of the session the that was ended
  • bWasSuccessful - true if the async action completed without error, false if there was an error

OnFindOnlineGamesComplete[edit]

delegate OnFindOnlineGamesComplete (bool bWasSuccessful)

Delegate fired when the search for an online game has completed

Parameters:

  • bWasSuccessful - true if the async action completed without error, false if there was an error

OnGameInviteAccepted[edit]

delegate OnGameInviteAccepted (const out OnlineGameSearch.OnlineGameSearchResult InviteResult)

Called when a user accepts a game invitation. Allows the gameplay code a chance to clean up any existing state before accepting the invite. The invite must be accepted by calling AcceptGameInvite() on the OnlineGameInterface after clean up has completed

Parameters:

  • InviteResult - the search/settings for the game we're joining via invite

OnJoinOnlineGameComplete[edit]

delegate OnJoinOnlineGameComplete (name SessionName, bool bWasSuccessful)

Delegate fired when the joing process for an online game has completed

Parameters:

  • SessionName - the name of the session this callback is for
  • bWasSuccessful - true if the async action completed without error, false if there was an error

OnRegisterPlayerComplete[edit]

delegate OnRegisterPlayerComplete (name SessionName, OnlineSubsystem.UniqueNetId PlayerId, bool bWasSuccessful)

Delegate fired when the registration process has completed

Parameters:

  • SessionName - the name of the session the player joined or not
  • PlayerId - the player that was unregistered from the online service
  • bWasSuccessful - true if the async action completed without error, false if there was an error

OnStartOnlineGameComplete[edit]

delegate OnStartOnlineGameComplete (name SessionName, bool bWasSuccessful)

Delegate fired when the online game has transitioned to the started state

Parameters:

  • SessionName - the name of the session the that has transitioned to started
  • bWasSuccessful - true if the async action completed without error, false if there was an error

OnUnregisterPlayerComplete[edit]

delegate OnUnregisterPlayerComplete (name SessionName, OnlineSubsystem.UniqueNetId PlayerId, bool bWasSuccessful)

Delegate fired when the unregistration process has completed

Parameters:

  • SessionName - the name of the session the player left
  • PlayerId - the player that was unregistered from the online service
  • bWasSuccessful - true if the async action completed without error, false if there was an error

OnUpdateOnlineGameComplete[edit]

delegate OnUpdateOnlineGameComplete (name SessionName, bool bWasSuccessful)

Delegate fired when a update request has completed

Parameters:

  • SessionName - the name of the session this callback is for
  • bWasSuccessful - true if the async action completed without error, false if there was an error

Instance functions[edit]

AcceptGameInvite[edit]

function bool AcceptGameInvite (byte LocalUserNum, name SessionName)

Tells the online subsystem to accept the game invite that is currently pending

Parameters:

  • LocalUserNum - the local user accepting the invite
  • SessionName - the name of the session this invite is to be known as

Returns:

true if the game invite was able to be accepted, false otherwise

AddArbitrationRegistrationCompleteDelegate[edit]

function AddArbitrationRegistrationCompleteDelegate (delegate<OnArbitrationRegistrationCompleteArbitrationRegistrationCompleteDelegate)

Sets the notification callback to use when arbitration registration has completed

Parameters:

  • ArbitrationRegistrationCompleteDelegate - the delegate to use for notifications

AddCancelFindOnlineGamesCompleteDelegate[edit]

function AddCancelFindOnlineGamesCompleteDelegate (delegate<OnCancelFindOnlineGamesCompleteCancelFindOnlineGamesCompleteDelegate)

Adds the delegate to the list to notify with

Parameters:

  • CancelFindOnlineGamesCompleteDelegate - the delegate to use for notifications

AddCreateOnlineGameCompleteDelegate[edit]

function AddCreateOnlineGameCompleteDelegate (delegate<OnCreateOnlineGameCompleteCreateOnlineGameCompleteDelegate)

Sets the delegate used to notify the gameplay code that the online game they created has completed the creation process

Parameters:

  • CreateOnlineGameCompleteDelegate - the delegate to use for notifications

AddDestroyOnlineGameCompleteDelegate[edit]

function AddDestroyOnlineGameCompleteDelegate (delegate<OnDestroyOnlineGameCompleteDestroyOnlineGameCompleteDelegate)

Sets the delegate used to notify the gameplay code that the online game they destroyed has completed the destruction process

Parameters:

  • DestroyOnlineGameCompleteDelegate - the delegate to use for notifications

AddEndOnlineGameCompleteDelegate[edit]

function AddEndOnlineGameCompleteDelegate (delegate<OnEndOnlineGameCompleteEndOnlineGameCompleteDelegate)

Sets the delegate used to notify the gameplay code that the online game has transitioned to the ending state.

Parameters:

  • EndOnlineGameCompleteDelegate - the delegate to use for notifications

AddFindOnlineGamesCompleteDelegate[edit]

function AddFindOnlineGamesCompleteDelegate (delegate<OnFindOnlineGamesCompleteFindOnlineGamesCompleteDelegate)

Adds the delegate used to notify the gameplay code that the search they kicked off has completed

Parameters:

  • FindOnlineGamesCompleteDelegate - the delegate to use for notifications

AddGameInviteAcceptedDelegate[edit]

function AddGameInviteAcceptedDelegate (byte LocalUserNum, delegate<OnGameInviteAcceptedGameInviteAcceptedDelegate)

Sets the delegate used to notify the gameplay code when a game invite has been accepted

Parameters:

  • LocalUserNum - the user to request notification for
  • GameInviteAcceptedDelegate - the delegate to use for notifications

AddJoinOnlineGameCompleteDelegate[edit]

function AddJoinOnlineGameCompleteDelegate (delegate<OnJoinOnlineGameCompleteJoinOnlineGameCompleteDelegate)

Sets the delegate used to notify the gameplay code that the join request they kicked off has completed

Parameters:

  • JoinOnlineGameCompleteDelegate - the delegate to use for notifications

AddRegisterPlayerCompleteDelegate[edit]

function AddRegisterPlayerCompleteDelegate (delegate<OnRegisterPlayerCompleteRegisterPlayerCompleteDelegate)

Sets the delegate used to notify the gameplay code that the player registration request they submitted has completed

Parameters:

  • RegisterPlayerCompleteDelegate - the delegate to use for notifications

AddStartOnlineGameCompleteDelegate[edit]

function AddStartOnlineGameCompleteDelegate (delegate<OnStartOnlineGameCompleteStartOnlineGameCompleteDelegate)

Sets the delegate used to notify the gameplay code that the online game has transitioned to the started state.

Parameters:

  • StartOnlineGameCompleteDelegate - the delegate to use for notifications

AddUnregisterPlayerCompleteDelegate[edit]

function AddUnregisterPlayerCompleteDelegate (delegate<OnUnregisterPlayerCompleteUnregisterPlayerCompleteDelegate)

Sets the delegate used to notify the gameplay code that the player unregistration request they submitted has completed

Parameters:

  • UnregisterPlayerCompleteDelegate - the delegate to use for notifications

AddUpdateOnlineGameCompleteDelegate[edit]

function AddUpdateOnlineGameCompleteDelegate (delegate<OnUpdateOnlineGameCompleteUpdateOnlineGameCompleteDelegate)

Adds a delegate to the list of objects that want to be notified

Parameters:

  • UpdateOnlineGameCompleteDelegate - the delegate to use for notifications

BindPlatformSpecificSessionToSearch[edit]

function bool BindPlatformSpecificSessionToSearch (byte SearchingPlayerNum, OnlineGameSearch SearchSettings, byte PlatformSpecificInfo[68])

Creates a search result out of the platform specific data and adds that to the specified search object

Parameters:

  • SearchingPlayerNum - the index of the player searching for a match
  • SearchSettings - the desired search to bind the session to
  • PlatformSpecificInfo - the platform specific information to convert to a server object

Returns:

true if successful serializing the data, false otherwise

CancelFindOnlineGames[edit]

function bool CancelFindOnlineGames ()

Cancels the current search in progress if possible for that search type

Returns:

true if successful searching for sessions, false otherwise

ClearArbitrationRegistrationCompleteDelegate[edit]

function ClearArbitrationRegistrationCompleteDelegate (delegate<OnArbitrationRegistrationCompleteArbitrationRegistrationCompleteDelegate)

Removes the delegate from the list of notifications

Parameters:

  • ArbitrationRegistrationCompleteDelegate - the delegate to use for notifications

ClearCancelFindOnlineGamesCompleteDelegate[edit]

function ClearCancelFindOnlineGamesCompleteDelegate (delegate<OnCancelFindOnlineGamesCompleteCancelFindOnlineGamesCompleteDelegate)

Removes the delegate from the notify list

Parameters:

  • CancelFindOnlineGamesCompleteDelegate - the delegate to use for notifications

ClearCreateOnlineGameCompleteDelegate[edit]

function ClearCreateOnlineGameCompleteDelegate (delegate<OnCreateOnlineGameCompleteCreateOnlineGameCompleteDelegate)

Removes the delegate from the list of notifications

Parameters:

  • CreateOnlineGameCompleteDelegate - the delegate to use for notifications

ClearDestroyOnlineGameCompleteDelegate[edit]

function ClearDestroyOnlineGameCompleteDelegate (delegate<OnDestroyOnlineGameCompleteDestroyOnlineGameCompleteDelegate)

Removes the delegate from the list of notifications

Parameters:

  • DestroyOnlineGameCompleteDelegate - the delegate to use for notifications

ClearEndOnlineGameCompleteDelegate[edit]

function ClearEndOnlineGameCompleteDelegate (delegate<OnEndOnlineGameCompleteEndOnlineGameCompleteDelegate)

Removes the delegate from the list of notifications

Parameters:

  • EndOnlineGameCompleteDelegate - the delegate to use for notifications

ClearFindOnlineGamesCompleteDelegate[edit]

function ClearFindOnlineGamesCompleteDelegate (delegate<OnFindOnlineGamesCompleteFindOnlineGamesCompleteDelegate)

Removes the delegate from the notify list

Parameters:

  • FindOnlineGamesCompleteDelegate - the delegate to use for notifications

ClearGameInviteAcceptedDelegate[edit]

function ClearGameInviteAcceptedDelegate (byte LocalUserNum, delegate<OnGameInviteAcceptedGameInviteAcceptedDelegate)

Removes the delegate from the list of notifications

Parameters:

  • GameInviteAcceptedDelegate - the delegate to use for notifications

ClearJoinOnlineGameCompleteDelegate[edit]

function ClearJoinOnlineGameCompleteDelegate (delegate<OnJoinOnlineGameCompleteJoinOnlineGameCompleteDelegate)

Removes the delegate from the list of notifications

Parameters:

  • JoinOnlineGameCompleteDelegate - the delegate to use for notifications

ClearRegisterPlayerCompleteDelegate[edit]

function ClearRegisterPlayerCompleteDelegate (delegate<OnRegisterPlayerCompleteRegisterPlayerCompleteDelegate)

Removes the delegate from the list of notifications

Parameters:

  • RegisterPlayerCompleteDelegate - the delegate to use for notifications

ClearStartOnlineGameCompleteDelegate[edit]

function ClearStartOnlineGameCompleteDelegate (delegate<OnStartOnlineGameCompleteStartOnlineGameCompleteDelegate)

Removes the delegate from the list of notifications

Parameters:

  • StartOnlineGameCompleteDelegate - the delegate to use for notifications

ClearUnregisterPlayerCompleteDelegate[edit]

function ClearUnregisterPlayerCompleteDelegate (delegate<OnUnregisterPlayerCompleteUnregisterPlayerCompleteDelegate)

Removes the delegate from the list of notifications

Parameters:

  • UnregisterPlayerCompleteDelegate - the delegate to use for notifications

ClearUpdateOnlineGameCompleteDelegate[edit]

function ClearUpdateOnlineGameCompleteDelegate (delegate<OnUpdateOnlineGameCompleteUpdateOnlineGameCompleteDelegate)

Removes the delegate from the list of notifications

Parameters:

  • UpdateOnlineGameCompleteDelegate - the delegate to use for notifications

CreateOnlineGame[edit]

function bool CreateOnlineGame (byte HostingPlayerNum, name SessionName, OnlineGameSettings NewGameSettings)

Creates an online game based upon the settings object specified. NOTE: online game registration is an async process and does not complete until the OnCreateOnlineGameComplete delegate is called.

Parameters:

  • HostingPlayerNum - the index of the player hosting the match
  • SessionName - the name to use for this session so that multiple sessions can exist at the same time
  • NewGameSettings - the settings to use for the new game session

Returns:

true if successful creating the session, false otherwise

DestroyOnlineGame[edit]

function bool DestroyOnlineGame (name SessionName)

Destroys the current online game NOTE: online game de-registration is an async process and does not complete until the OnDestroyOnlineGameComplete delegate is called.

Parameters:

  • SessionName - the name of the session to delete

Returns:

true if successful destroying the session, false otherwsie

EndOnlineGame[edit]

function bool EndOnlineGame (name SessionName)

Marks an online game as having been ended

Parameters:

  • SessionName - the name of the session the to end

Returns:

true if the call succeeds, false otherwise

FindOnlineGames[edit]

function bool FindOnlineGames (byte SearchingPlayerNum, OnlineGameSearch SearchSettings)

Searches for games matching the settings specified

Parameters:

  • SearchingPlayerNum - the index of the player searching for a match
  • SearchSettings - the desired settings that the returned sessions will have

Returns:

true if successful searching for sessions, false otherwise

FreeSearchResults[edit]

function bool FreeSearchResults (optional OnlineGameSearch Search)

Cleans up any platform specific allocated data contained in the search results

Parameters:

  • Search - the object to free search results for

Returns:

true if successful, false otherwise

GetArbitratedPlayers[edit]

function array<OnlineSubsystem.OnlineArbitrationRegistrantGetArbitratedPlayers (name SessionName)

Returns the list of arbitrated players for the arbitrated session

Parameters:

  • SessionName - the name of the session to get the arbitration results for

Returns:

the list of players that are registered for this session

GetGameSearch[edit]

function OnlineGameSearch GetGameSearch ()

Returns the currently set game search object

GetGameSettings[edit]

function OnlineGameSettings GetGameSettings (name SessionName)

Returns the game settings object for the session with a matching name

Parameters:

  • SessionName - the name of the session to return

Returns:

the game settings for this session name

GetResolvedConnectString[edit]

function bool GetResolvedConnectString (name SessionName, out string ConnectInfo)

Returns the platform specific connection information for joining the match. Call this function from the delegate of join completion

Parameters:

  • SessionName - the name of the session to fetch the connection information for
  • ConnectInfo - the out var containing the platform specific connection information

Returns:

true if the call was successful, false otherwise

JoinOnlineGame[edit]

function bool JoinOnlineGame (byte PlayerNum, name SessionName, const out OnlineGameSearch.OnlineGameSearchResult DesiredGame)

Joins the game specified

Parameters:

  • PlayerNum - the index of the player searching for a match
  • SessionName - the name of the session to join
  • DesiredGame - the desired game to join

Returns:

true if the call completed successfully, false otherwise

QueryNonAdvertisedData[edit]

function bool QueryNonAdvertisedData (int StartAt, int NumberToQuery)

Fetches the additional data a session exposes outside of the online service. NOTE: notifications will come from the OnFindOnlineGamesComplete delegate

Parameters:

  • StartAt - the search result index to start gathering the extra information for
  • NumberToQuery - the number of additional search results to get the data for

Returns:

true if the query was started, false otherwise

ReadPlatformSpecificSessionInfo[edit]

function bool ReadPlatformSpecificSessionInfo (const out OnlineGameSearch.OnlineGameSearchResult DesiredGame, out byte PlatformSpecificInfo[68])

Serializes the platform specific data into the provided buffer for the specified search result

Parameters:

  • DesiredGame - the game to copy the platform specific data for
  • PlatformSpecificInfo - the buffer to fill with the platform specific information

Returns:

true if successful reading the data, false otherwise

ReadPlatformSpecificSessionInfoBySessionName[edit]

function bool ReadPlatformSpecificSessionInfoBySessionName (name SessionName, out byte PlatformSpecificInfo[68])

Serializes the platform specific data into the provided buffer for the specified settings object. NOTE: This can only be done for a session that is bound to the online system

Parameters:

  • GameSettings - the game to copy the platform specific data for
  • PlatformSpecificInfo - the buffer to fill with the platform specific information

Returns:

true if successful reading the data for the session, false otherwise

RecalculateSkillRating[edit]

function bool RecalculateSkillRating (name SessionName, const out array<OnlineSubsystem.UniqueNetIdPlayers)

Updates the current session's skill rating using the list of players' skills

Parameters:

  • SessionName - the name of the session to update the skill rating for
  • Players - the set of players to use in the skill calculation

Returns:

true if the update succeeded, false otherwise

RegisterForArbitration[edit]

function bool RegisterForArbitration (name SessionName)

Tells the game to register with the underlying arbitration server if available

Parameters:

  • SessionName - the name of the session to register for arbitration with

RegisterPlayer[edit]

function bool RegisterPlayer (name SessionName, OnlineSubsystem.UniqueNetId PlayerId, bool bWasInvited)

Registers a player with the online service as being part of the online game

Parameters:

  • SessionName - the name of the session the player is joining
  • UniquePlayerId - the player to register with the online service
  • bWasInvited - whether the player was invited to the game or searched for it

Returns:

true if the call succeeds, false otherwise

StartOnlineGame[edit]

function bool StartOnlineGame (name SessionName)

Marks an online game as in progress (as opposed to being in lobby or pending)

Parameters:

  • SessionName - the name of the session that is being started

Returns:

true if the call succeeds, false otherwise

UnregisterPlayer[edit]

function bool UnregisterPlayer (name SessionName, OnlineSubsystem.UniqueNetId PlayerId)

Unregisters a player with the online service as being part of the online game

Parameters:

  • SessionName - the name of the session the player is leaving
  • PlayerId - the player to unregister with the online service

Returns:

true if the call succeeds, false otherwise

UpdateOnlineGame[edit]

function bool UpdateOnlineGame (name SessionName, OnlineGameSettings UpdatedGameSettings, optional bool bShouldRefreshOnlineData)

Updates the localized settings/properties for the game in question

Parameters:

  • SessionName - the name of the session to update
  • UpdatedGameSettings - the object to update the game settings with
  • bShouldRefreshOnlineData - whether to submit the data to the backend or not

Returns:

true if successful creating the session, false otherwsie