6.2. Overview of PiaSession Features

This chapter compares implementation methods using PiaSession and the matchmaking specifications that can be implemented.

Comparison of Implementation Methods

There are two methods for implementing session processes: using the session API and using the mesh API. The characteristics of each method are described below. The session APIs of PiaSession internally call the mesh API of PiaSession and the NEX matchmaking API (or the UDS library API when using local communications).

Using the Session API of PiaSession

  • You can greatly reduce implementation for the application because matchmaking sessions and P2P sessions with the local network can be managed as batch processes.
  • Implementation errors and function call order problems are less likely on the application side because the use and calling order of the mesh API and NEX matchmaking or UDS library API called within the session API have been verified.
  • The API has features for automatically performing time-consuming matchmaking processes when implementating and verifying such things as friend join-in matchmaking and joint sessions.
  • You can combine the matchmaking error processing with Pia error processing.

 

Using the Mesh API of PiaSession and the NEX Matchmaking API

  • You can have greater control of the API calling order and timing by separately managing the matchmaking session and P2P session.
  • You can use the latest NEX matchmaking API features without waiting for PiaSession to support them.
  • The application must carefully verify the use and calling order of each mesh API and NEX matchmaking API.

 

The following table summarizes the primary features supported in each library. To compare the code, see 4.3. Migrating From the Mesh API to the Session API (PiaInet).

 

Matchmaking Features

Session API of PiaSession

Mesh API of PiaSession and the NEX Matchmaking API

Register and delete matchmaking sessions O O
Search for, join, and leave matchmaking sessions O O

Random matchmaking (auto-matchmaking)

O

O

Random matchmaking using the NEAREST_NEIGHBOR property O O

Random matchmaking using BROADEN_RANGE

O O
Random matchmaking with PROGRESS_SCORE O O

BROADEN_RANGE_WITH_PROGRESS_SCORE

Random matchmaking (broaden range and progress score)

O O
Random matchmaking with SCORE_BASED O O
Matchmaking session user password settings O O
Matchmaking session system password settings O O
Host migration O O
Friend join-in matchmaking O O
Matchmaking blacklist O O
Persistent gathering TBD O
Messaging △ (Sending works with P2P.) O
Matchmaking referee TBD O
Team matchmaking (session merging) O △ (Sample provided for NEX.)

 O: Supported   △: Partially supported

Implementable Matchmaking Specifications

This section describes the usage cases for implementable matchmaking using the session API of PiaSession.

If you are considering matchmaking specifications that differ greatly from those in the activity diagram (listed in UML) shown below, use a combination of the mesh API (Mesh class) and the NEX matchmaking or UDS library API, instead of using the session API (Session class).

Browse Matchmaking

Browse matchmaking is a matchmaking specification where the user chooses to either wait for another player or select a player from a list of searched candidates before beginning online play. Browse matchmaking can be used with either Internet or local communications.

The assumed workflows are presented in Figure 6-4. Activity Diagram for Browse Matchmaking.

Figure 6-4. Activity Diagram for Browse Matchmaking

For more information about creating, finding, and joining sessions using browse matchmaking, see 6.4. Basic Features - Browse Matchmaking.

Random Matchmaking

Random matchmaking is a matchmaking specification that randomly determines communication partners. The randomness can be filtered with settings such as same country or same level. Random matchmaking cannot be used with local communications.

The assumed workflows are presented in Figure 6-5. Activity Diagram for Random Matchmaking.

Figure 6-5. Activity Diagram for Random Matchmaking

For more information about random matchmaking, see 6.5. Basic Features - Random Matchmaking.

Friend join-in matchmaking

Friend join-in matchmaking is a matchmaking specification that selects joinable sessions using the friend presence feature when you want to search for online friends and join them. Friend join-in matchmaking cannot be used with local communications.

The assumed workflows are presented in Figure 6-6. Activity Diagram for Friend Join-In Matchmaking.

Figure 6-6. Activity Diagram for Friend Join-In Matchmaking

For more information about friend join-in matchmaking, see 6.11. Advanced Features - Friend Join-In Matchmaking.

Team Matchmaking

Team matchmaking is a matchmaking specification that assumes that a team is formed in advance and then that team joins another team. It uses the joint session feature of the session API.

The joint session feature cannot be used with local communications.

The assumed workflows are presented in Figure 6-7. Activity Diagram for Team Matchmaking Using the Joint Session Feature.

Figure 6-7. Activity Diagram for Team Matchmaking Using the Joint Session Feature

For more information about the joint session feature, see 6.12. Advanced Features - Joint Sessions.