TapTap PC
A game on TapTap PC is a Windows executable that uses the TapTap client for login, DLC, achievements, cloud saves, leaderboards, compliance and online battle. Pygame Studio packages that executable and, when TapTap PC is picked as the publishing platform, puts the SDK bridge the game code needs into the package.
An example already online: Just Eat 100 Apples
- On Windows, open Project → Build (
Ctrl+B) and stay on the Desktop App tab. - Fill in App Name, App Icon and Output Dir as usual.
- Set Publishing Platform to TapTap PC.
- Click Build — the engine packs the SDK folder into the bundle as well.
Output:
<Output Dir>/build/Windows/dist/<App Name>/├─ <App Name>.exe the game└─ _internal dependencies, including the TapTap SDK bridgeTapTap PC is Windows x64 only, so the package that goes to the platform is the one built on Windows.
Use the TapTap PC SDK
Section titled “Use the TapTap PC SDK”The bridge is studio.sdk.taptap.pc. It needs the client_id and public_key of the TapTap developer entry, must be initialised before the main loop starts and has to be driven once per frame:
import pygamestudio as studio
CLIENT_ID = '...'PUB_KEY = '...'
def main(): pc = studio.sdk.taptap.pc if not pc.available(): return # editor, another OS, SDK missing
# TapTap sometimes asks for a relaunch through its client: True means it # did, and this process should exit. if pc.restart_app_if_necessary(CLIENT_ID): return
pc.init(CLIENT_ID, PUB_KEY)
class Game(studio.Game): def on_update(self, dt): pc.run_callbacks() # deliver async results every frame studio.load_scene(studio.get_screen())
def on_quit(self): pc.shutdown()
Game().run()
if __name__ == '__main__': main()client_id and public_key may also live in project.pygs, in a section the editor never writes:
{ "taptap": { "client_id": "...", "public_key": "..." } }Results arrive in two ways — events and requests:
pc.on('authorize_finished', lambda data: print('login', data))
request = pc.achievement.unlock('first_win')pc.wait(request, timeout=5.0) # or check request.done laterEvery call and namespace (user, achievements, cloud saves, DLC, leaderboards, relations, online battle, compliance) is listed under TapTap PC SDK.
Publish
Section titled “Publish”-
Compress the built files into an archive.

-
Open the TapTap developer console, create the game and open PC package management, then upload the archive and wait for review. Once the package has passed and you have tested it yourself, fill in the game information and publish.

Troubleshooting
Section titled “Troubleshooting”| Symptom | Cause and fix |
|---|---|
pc.available() is still False after building | The build was made without TapTap PC selected, or on another operating system. Rebuild on Windows with the platform selected. |
init() returns NoPlatform | The TapTap client is not installed (or not running) on that machine. It can be downloaded from taptap.cn. |
init() returns NotLaunchedByPlatform | The game was started directly. Start it through the TapTap client; restart_app_if_necessary() handles the relaunch TapTap asks for. |
| Results never arrive | pc.run_callbacks() is not called every frame, or it is called before init() succeeded. |
TapSDKNotAvailable raised unexpectedly | The call was made outside a TapTap build, or the SDK was not packed in. Guard with pc.available() to avoid the error. |