Kronos Matchmaking
Buy NowContact
  • About
    • Kronos LTS
    • Support
    • Accolades
  • Examples
    • Playable Demo
    • Sample Project
    • Example Content
  • Configuration
  • Testing & Debugging
  • Usage
    • Getting Started
    • Authentication
      • Authenticating Users
      • Customizing The Auth Widget
      • Creating Custom Auth Tasks
    • Matchmaking
      • Overview
      • Creating Matches
      • Starting Matchmaking
      • Canceling Matchmaking
      • Using Skill Ratings
      • Sending Match Invites
      • Joining Matches
      • Leaving Matches
    • Party
      • Overview
      • Creating Parties
      • Sending Party Invites
      • Joining Parties
      • Managing Party Players
      • Party Player Actors
      • Leaving Parties
    • Reservations
      • Overview
      • Using Reservations
      • The Host Reservation
      • Completing Reservations
    • Lobby
      • Overview
      • Lobby Setup
      • Set Players Ready
      • Lobby Player Data
      • Starting The Match
      • Updating Lobby Session
      • Leaving The Lobby
    • Widgets
  • Guides
    • Creating a Level Selector
    • Integrating with Lyra Game
    • Integrating with EIK
  • Advanced
    • Steam Sockets
    • Reconnect Parties
    • Custom Party Variables
    • Player Groups
  • Changelog
    • API Upgrades
    • Legacy
Powered by GitBook
On this page
  • Joining From Party Invite
  • Joining Parties Directly
  • Finding Parties To Join
  1. Usage
  2. Party

Joining Parties

PreviousSending Party InvitesNextManaging Party Players

Last updated 10 months ago

In order to access online features, the player must be logged in with the Online Subsystem. Please visit the page for more information.

Joining From Party Invite

Players who accept a party invite will join the party automatically.

Joining Parties Directly

You can directly join a party by using the JoinKronosParty node. Note that you only have to do this if you are not joining parties through party invites.

There is no hard requirement on where you need to call this from. Most games will probably have this hooked to the OnClicked event of a widget button.

#include "KronosMatchmakingManager.h"
#include "KronosMatchmakingPolicy.h"
// The session you want to join. You must get this somehow, for example by doing a SearchOnly matchmaking.
// Please note that search results cannot be replicated or sent via RPCs! This is an Online Subsystem limitation.
// Notice that this is passed into the lambda so that we can access it.
FKronosSearchResult SessionToJoin;

// Get the matchmaking manager.
UKronosMatchmakingManager* MatchmakingManager = UKronosMatchmakingManager::Get(this);

// Request a new matchmaking policy. This operation is async!
// If matchmaking is in-progress, it will be canceled first.
MatchmakingManager->CreateMatchmakingPolicy(FOnCreateMatchmakingPolicyComplete::CreateLambda([this, SessionToJoin](UKronosMatchmakingPolicy* MatchmakingPolicy)
{
    // Matchmaking params are irrelevant in JoinOnly mode.
    FKronosMatchmakingParams MatchmakingParams = FKronosMatchmakingParams();

    // Matchmaking flags to use.
    uint8 MatchmakingFlags = static_cast<uint8>(EKronosMatchmakingFlags::None);

    // Tell the matchmaking that we only want to join a session that we've got already.
    EKronosMatchmakingMode MatchmakingMode = EKronosMatchmakingMode::JoinOnly;

    // Start matchmaking.
    // Notice that we are using NAME_PartySession!
    MatchmakingPolicy->StartMatchmaking(NAME_PartySession, MatchmakingParams, MatchmakingFlags, MatchmakingMode, 0.0f, SessionToJoin);
}));

Finding Parties To Join

The matchmaking system of Kronos can also be used to find and join parties if needed. This approach works exactly the same way as with matches because internally there is not much difference between matches and parties. They are both just sessions on the backend. The equivalent nodes are:

  • StartKronosPartyMatchmaking: Start matchmaking for public party sessions and join the best result automatically.

  • FindKronosParties: Find public party sessions and let the user decide which one to join.

For more information please refer to the relevant sections in the documentation page.

Matchmaking
Authentication