PC C++ SDK Integration Overview
Product Introduction
TapSDK PC is a C++ SDK specifically designed for PC games running through the TapTap launcher. It provides deep integration with the TapTap platform, including basic features such as user authorization, license verification (for premium games), and consistent random number generation, as well as extended features such as compliance, achievement, leaderboard, cloud save, relation, and online multiplayer.
Basic Features
Launch Verification
- Game Ownership Verification: Verify whether the user owns the game
User Authorization
- TapTap Login Authorization: Get user authorization
- User Information Retrieval: Query the user's currently approved scopes, get basic user information such as OpenID
License Verification (Premium Games)
- DLC Ownership Verification: Check if the user owns specific DLC
- DLC Store Display: Guide users to purchase DLC
- Game and DLC Status Monitoring: Monitor changes in the playable status of games and DLC
Consistent Random Number
- Cross-device consistent random number: Ensures the same random number sequence is generated when the application runs on different devices
Extended Features
Compliance
- Real-name verification: Guide unverified users through real-name verification via the TapTap client
- Game time limit: Restrict online time for minors
- Payment amount limit: Restrict payment amounts for minors
Achievement
- Achievement unlocking: Supports direct unlock for standard achievements and step-based incremental unlocking for incremental achievements.
- Achievement display: Open an achievements page in the TapTap where players can view achievements and completion status.
Leaderboard
- Score submission: Submit player scores in batch on developer-defined dimensions
- Leaderboard fetching: Switch between public/friends collections, query by period, with pagination
- Current user rank: Fetch the current user's rank, or load nearby scores around the current user
- Open leaderboard page: Open the leaderboard display page in TapTap
Cloud Save
- Save to TapTap Cloud: Players can read saves from any device to continue their game, avoiding player churn due to save loss.
Relation
- Relationship lists: Fetch the player's mutual-follow friend / following / fan lists from TapTap, with pagination support.
- Unread message count / new fan count: Fetch the player's TapTap unread message count and new fan count for in-game display. Listen to events for real-time count changes.
- User profile: Open the TapTap launcher's user profile window to display a target user's basic info. Can follow, unfollow, or invite other player online from this window.
- Friend chat: Open the TapTap launcher's chat window for one-on-one conversations with a friend. Supports text, emoji, image, and other message types.
- Friend invitation: Open the TapTap launcher's "invite to game" / "invite to team" window to invite a specific friend to launch the game or join a designated team.
Online Multiplayer
- Room management: Create rooms, auto-match, and join specific rooms, with full in-room player management.
- Player communication: Players in a room can send and receive messages, with person to person and broadcast support. You can build state-sync games on top of this.
- Advanced Feature: For real-time competitive games, the SDK provides frame sync at 30 FPS.
System Requirements
- Operating System: Windows 7 or higher, 64-bit
- Runtime Environment: Games must be launched through the TapTap launcher
- Network Requirements: Internet connection required
- SDK Type: Dynamic Link Library (DLL)
Integration Preparation
1. Get Developer Resources
Before starting integration, you need to:
- Register a developer account at TapTap Developer Center
- Create a game application and obtain the following information from "Your Games" → "Game Services" → "Application Configuration":
- Client ID: Unique identifier for the application
- Client Public Key: Public key string for SDK initialization
2. Download SDK
Visit the TapSDK PC C++ Releases page to download the latest version of the SDK.
The SDK includes the following files:
taptap_api.h: Header file for basic features API (initialization, callback registration, user authorization, license verification, consistent random number, etc.)taptap_achievement.h: Header file for achievement feature APItaptap_cloudsave.h: Header file for cloud save feature APItaptap_compliance.h: Header file for compliance feature APItaptap_leaderboard.h: Header file for leaderboard feature APItaptap_onlinebattle.h: Header file for online multiplayer feature APItaptap_relation.h: Header file for relation feature APItaptap_api.dll: Dynamic library file (Windows)taptap_api.lib: Import library file (Windows)
Basic Integration Steps
Language Support
The PC SDK is provided as a Dynamic Link Library (DLL) and supports integration with multiple programming languages:
- C++
- If you only need basic features such as user authorization, license verification, and consistent random number, include the header file
taptap_api.h. For specific integration steps, refer to Quick Start. - If you need to use compliance features, include the header file
taptap_compliance.h. For specific integration steps, refer to Compliance Quick Start. - If you need to use achievement features, include the header file
taptap_achievement.h. For specific integration steps, refer to Achievement Quick Start. - If you need to use leaderboard features, include the header file
taptap_leaderboard.h. For specific integration steps, refer to Leaderboard Quick Start. - If you need to use cloud save features, include the header file
taptap_cloudsave.h. For specific integration steps, refer to Cloud Save Quick Start. - If you need to use relation features, include the header file
taptap_relation.h. For specific integration steps, refer to Relation Quick Start. - If you need to use online multiplayer features, include the header file
taptap_onlinebattle.h. For specific integration steps, refer to Online Multiplayer Quick Start.
- If you only need basic features such as user authorization, license verification, and consistent random number, include the header file
- Other Languages: Implement through each language's DLL calling mechanism.
Add SDK Files
Add the downloaded SDK files to your project:
C++ Project:
#include "taptap_api.h" // Must include basic features header file
#include "taptap_achievement.h" // If achievement features are needed
#include "taptap_cloudsave.h" // If cloud save features are needed
#include "taptap_compliance.h" // If compliance features are needed
#include "taptap_leaderboard.h" // If leaderboard features are needed
#include "taptap_onlinebattle.h" // If online multiplayer features are needed
#include "taptap_relation.h" // If relation features are needed
Other Languages:
- Place
taptap_api.dllin the same directory as the executable or in the system path - Load the DLL and declare function signatures according to language-specific features
Documentation Structure
This documentation contains the following content:
- Basic Features: SDK basic features integration, basic configuration, detailed API documentation, and usage examples
- Compliance: Real-name verification, anti-addiction, and payment limit feature integration, detailed API documentation, and usage examples
- Achievement: Achievement feature integration, detailed API documentation, and usage examples
- Leaderboard: Score submission, leaderboard fetching, opening the leaderboard page, detailed API documentation, and usage examples
- Cloud Save: Cloud save feature integration, detailed API documentation, and usage examples
- Relation: Relationship lists, user profile, friend chat, invitation, and other feature integration, detailed API documentation, and usage examples
- Online Multiplayer: Online multiplayer feature integration, detailed API documentation, and usage examples
Before getting started, please read Quick Start to understand the integration process.