Skip to content
Store Dev
Cập nhật lần cuối

Native C/C++

This guide walks through integrating the new C API of STOVE PC SDK 3.5.3 into a native C/C++ game from start to finish. Every explanation shows the actual source code of the sample game Brick Smash. Open the sample source alongside the guide to see exactly where each piece of code goes.

To test the contents of this document, the STOVE Launcher must be installed. The SDK works only with games launched through the STOVE Launcher.

Supported Environments

ItemContent
Operating SystemWindows 64-bit (x64)
LanguageC++17 or later
Development ToolsVisual Studio 2022 is recommended.
Required InstallationSTOVE Launcher

If you need 32-bit (x86) integration, contact technical support.

Sample Game: Brick Smash

Brick Smash is a brick-breaking game built with SDL3 and Dear ImGui. It is a simple game in which a paddle bounces a ball to break bricks, but it is designed to use every feature that StoreIndie games integrate at least once.

The menu is organized as follows.

MenuFeatures ShownGuide
Start GameBreak bricks; at game over, the number of bricks broken is submitted as a stat. Users who own the DLC get a wider paddle.Chapter 2 · Chapter 5
AchievementsShows the achievement list and completion status.Chapter 5
RankingsShows the leaderboard rankings.Chapter 5
StatsShows the current value of the stat.Chapter 5
ShopFetches and purchases in-game products.Chapter 6
InventoryShows the purchased items kept in the inventory.Chapter 6

When the game starts, it initializes the SDK, checks ownership, and registers regulatory notification callbacks such as shutdown and over-immersion notifications.

Sample Folder Structure

text
src/main.cpp          entry point, main loop
src/stove/            SDK calls (Session, GameSupport, IAP)
src/ui/               screens (menu, game, achievements/ranking/stats, shop/inventory, regulation overlay)
src/game/             game logic independent of the SDK
config/               configuration template
third_party/          STOVE PC SDK, signature verification library

All the code that calls the SDK is grouped together in src/stove/. Since the game logic in src/game/ is unrelated to the SDK, you can read the SDK integration code separately.

Sample Execution Flow

  1. StartStoveVerify (Release builds only) → load settings → create window
  2. Stove_RestartAppIfNecessary (if the game was started without the STOVE Launcher, the launcher restarts the game and the current process exits)
  3. Stove_Initialize → get user and version → fetch ownership → register regulatory notification callbacks
  4. Call Stove_RunCallback every frame
  5. At game over, Stove_SetStat submits the number of broken bricks, and the server evaluates achievements and the leaderboard.
  6. Stove_Uninitialize on exit

What to Register in STOVE Studio

To run the sample, register the following in STOVE Studio and enter the issued values in config/stove_config.ini. How to fill in the configuration file is explained in Chapter 2.

  • Stat: MAX_BROKEN_BLOCKS, value operation MAX
  • Two achievements: "First Brick Broken" (condition GTE 1) and "10 Bricks Broken" (condition GTE 10), linked to the stat above
  • Leaderboard: based on the stat above
  • Test product (for checking the shop)
  • DLC (optional)

Download

The same files are also available on the PCSDK Download page.

FileDescriptionLink
PC SDK 3.5.3Contains the headers, BaseSDK.lib, and BaseSDK.dll.StovePCSDK_Full_C_3.5.3.0_x64.zip
Signature VerifierThe signature verification library included in release builds.StoveSignatureVerifier_v1.0.5_x86_x64.zip
Sample GameSource code of Brick Smash.StovePCSDK_Sample_BrickSmash_C_3.5.3.zip (2026-10-17)

Table of Contents

The guide consists of four Basic Integration chapters and three Advanced Integration chapters. For a first integration, read Basic Integration in order from Chapter 1, and then pick only the Advanced Integration chapters the game needs.

Document Structure

DocumentContent
PCSDK DownloadSDK package, Signature Verifier, sample game, STOVE Launcher downloads, and release notes
Basic IntegrationChapters 1 to 4, required for every game that is sold
Advanced IntegrationChapters 5 to 7, for adding only the features the game needs
Reference106 functions, interfaces, enumerations, and result codes of the new C API used by StoreIndie games

Basic Integration

ChapterTitleContent
Chapter 1Preparing for IntegrationPackage contents, project settings, parameter objects and release rules, result checks, callbacks, strings, call formats, RAII helpers
Chapter 2Initialization · Termination · OwnershipSTOVE Launcher launch check, initialization, Stove_RunCallback, termination, ownership and DLC checks
Chapter 3Signature VerifierSignature verification library that prevents PC SDK DLL tampering
Chapter 4Shutdown · Game Time LimitsShutdown (Game Time Selection System) and Korean over-immersion notifications

Advanced Integration

ChapterTitleContent
Chapter 5Stats · Achievements · LeaderboardsStat updates and queries, achievements, leaderboards
Chapter 6PaymentProduct queries, purchase, purchase confirmation, inventory
Chapter 7Game Time Limits in VietnamVietnam age rating and over-immersion notifications

How to Read This Guide

  • Code blocks are taken as-is or excerpted from the actual Brick Smash source. Each excerpt names the file and function it comes from.
  • Function names, method names, and enumeration values are based on the SDK headers.
  • To check a header name or value mentioned in this guide, search for the same name in the package's Include folder.
  • This guide covers only the new APIs. The new APIs are functions that start with Stove_ and interfaces that start with IStove.

Inquiries

If you get stuck during integration, contact technical support. Include the SDK version, the result code (GetResultCode()), and the error message (GetErrorMessage()) to help find the cause quickly.

Email : store.support@smilegate.com