1.1. Overview of Each Module

The following illustration shows a hierarchy of the main modules (libraries) in Pia.

An overview of each module is provided below.

PiaCommon

The PiaCommon module provides features, such as memory management, that are shared by all modules. This module provides common features intended for reuse in other modules, and only some of its features are used directly from applications.

It includes the following features.

  • Memory Management
  • Scheduler for (periodic) dispatches.
  • Error Handling
  • A log output feature for debugging.

For more information about the various features, see 2. PiaCommon Guide.

PiaLocal

PiaLocal is a network management module with features for local P2P communications. This module extends the UDS library in the SDK to provide more advanced functionality.

It includes the following features.

  • The LocalNetworkFactory for performing local communications using PiaSession.
  • Host migration features for continuing a local network even if the local host disconnects.

  • A feature for searching for nearby networks during communication (planned).

PiaLocal uses the UDS library of the CTR-SDK internally. You can achieve the same level of performance by using just PiaLocal without directly using the UDS library. However, this practice is not compatible with the receive-only clients (spectators) feature in the UDS library.

For more information about the various features, see 3. PiaLocal Guide.

Examples of Titles Using This Module: [3DS] The Legend of Zelda: Tri Force Heroes, [3DS] Animal Crossing: New Leaf, [3DS] New Super Mario Bros. 2, [3DS] Super Smash Bros.

PiaInet

PiaInet is a network management module with features for Internet P2P communication. It is used in combination with NEX server services.

It includes the following features.

  • The NexNetworkFactory for performing Internet communication using PiaSession.
  • A NAT traversal feature that links to NEX server services.
  • A host migration feature that links to the NEX matchmaking API.

For more information about the various features, see 4. PiaInet Guide.

Examples of Titles Using This Module: [Wii U] Splatoon, [Wii U] Mario Kart 8, [3DS] Animal Crossing: New Leaf, [Wii U/3DS] Super Smash Bros.

PiaTransport

PiaTransport is a transport management module that provides a variety of features for sending and receiving data. It is used in combination with PiaSession.

It includes the following features.

  • UnreliableProtocol, which does not guarantee arrival of data.
  • ReliableProtocol, which does guarantee arrival of data.
  • ReliableBroadcastProtocol, which efficiently transmits data from the host to multiple clients.
  • Packet bundling, keep-alive, and round-trip time (RTT) measurement features.
  • Signature and encryption features.
  • TransportAnalyzer, which analyzes game communications.

For more information about the various features, see 5. PiaTransport Guide.

Examples of Titles Using This Module: [Wii U] Mario Kart 8, [3DS] Animal Crossing: New Leaf

PiaSession

PiaSession is a session management module for managing groups of users playing a game. In PiaSession, session refers both to the group's matchmaking session on the matchmaking server (or on a local communication network) and to the P2P mesh network for P2P communications between the players. When a session is created and players join that session, the corresponding matchmaking session (or local network) and P2P mesh network are automatically created and joined by the players. You can also manage the matchmaking session (or local network) and P2P mesh network separately if necessary.

It includes the following features.

  • A session feature that can manage both online matchmaking sessions and P2P mesh networks.
  • A feature that can manage both local networks and P2P mesh networks.
  • A host migration feature for continuing a session even if the host disconnects.
  • Relay communication features that let a client join a session even if NAT traversal fails.
  • A random matchmaking feature equivalent to the auto-matchmaking feature in the NEX matchmaking API (only for Internet communications).
  • A joint session feature for matchmaking among sessions, which enables matchmaking among teams (only for Internet communications).

PiaSession uses the NEX matchmaking API for Internet communications and the UDS library API for local communications. For more information about the various features, see 6. PiaSession Guide.

Examples of Titles Using This Module: [Wii U] Splatoon, [Wii U] Mario Kart 8, [3DS] Animal Crossing: New Leaf, [Wii U/3DS] Super Smash Bros.

PiaSync

The PiaSync module provides features for synchronized input communication (communication for sharing key input between stations during a game).

It includes the following features.

  • A SyncProtocol class for synchronizing user input (key input and other arbitrary data) using PiaSession.
  • A redundant packet correction feature for improving packet loss tolerance while minimizing increases in communication bandwidth.
  • A feature for dynamically changing the delay buffer.

For more information about the various features, see 7. PiaSync Guide.

Examples of Titles Using This Module: [Wii U] Wii Sports Club, [3DS] The Legend of Zelda: Tri Force Heroes, [3DS] New Super Mario Bros. 2

PiaClone

The PiaClone module provides features for synchronizing game object states between stations during a game.

It includes the following features.

  • CloneProtocol, which manages the overall state synchronization process.
  • UnreliableCloneElement and ReliableCloneElement, which allow you to share game object states between stations.
  • EventCloneElement, for notifying stations about in-game events.
  • SendClone and ReceiveClone, which you can use to send and receive states, respectively.
  • AtomicSharingClone, for controlling (locking) which stations are allowed to change the state of a game object.
  • SequentialSharingClone, for allowing any station to send and receive data without limitations on which stations are allowed to change game object states.
  • A feature for synchronizing the clock time between stations.

For more information about the various features, see 8. PiaClone Guide.

Examples of Titles Using This Module: [Wii U] Splatoon

PiaReckoning

The PiaReckoning module provides features for using dead reckoning to interpolate game object states (such as position and orientation), which can then be shared with PiaClone.

It includes the following features.

  • ReckoningCloneElement, for interpolating game object states determined using dead reckoning.
  • Simple3dReckoningStrategy, for estimating 3D positional information about game objects.

For more information about the various features, see 9. PiaReckoning Guide.

PiaChat

The PiaChat module provides voice chat features.

It includes the following features.

  • A conference feature, where all participants in a session can talk at the same time.
  • Voice activity detection (VAD), a feature for reducing the amount of chat data transferred by detecting silence.
  • An echo-cancellation feature.

For more information about the various features, see the 10. PiaChat Guide.

Examples of Titles Using This Module: [Wii U] Mario Kart 8