Skip to content

New SDK Preview

We have worked diligently to enhance the Balancy SDK. The core of the SDK has been completely rewritten in C++, making it more flexible and powerful.

Why We Rewrote the SDK

Here are the key reasons for this major update:

  1. Performance: The new SDK is significantly faster and more efficient. It uses less memory and CPU resources, ensuring a smoother experience.
  2. Cross-Platform Compatibility: The new SDK is cross-platform and can be integrated into any game engine, giving you more freedom in your development process.
  3. Simplicity: We have made the new SDK easier to integrate and use, with a simple and intuitive API, incorporating feedback from our users to streamline the process.

Since the new SDK is still in development, we value your feedback. If you have any questions or suggestions, please reach out to us.

How to start using the new SDK

TypeScript

  1. Install the Balancy SDK package:

    npm i --save @balancy/wasm@next @balancy/core@next
    
  2. Don't use ^ in the version, because the SDK is still in development. We'll fix the version soon. Below is the example of the correct version in package.json:

    "dependencies": {
     "@balancy/core": "1.0.0-rc.29",
     "@balancy/wasm": "1.0.0-rc.29",
    }
    
  3. Prepare a class that'll work with the file system. You can find an example in out public git project FileHelperClass

  4. Simple example how to run everything

    import {
       AppConfig,
       Balancy,
       Environment,
       Platform,
    } from '@balancy/core';
    import {FileHelperClass} from "./file-helper.class";
    
    (async () => {
       await Balancy.Main.initializeFileHelper(new FileHelperClass("balancy-test-root"));
    
       //TODO add your game id and public key
       const config = AppConfig.create({
          apiGameId: "6f5d4614-36c0-11ef-9145-066676c39f77",
          publicKey: "MzA5MGY0NWUwNGE5MTk5ZDU4MDAzNT",
          environment: Environment.Development,
       });
    
       config.platform = Platform.AndroidGooglePlay;
       config.deviceId = "TestDevice";
       config.customId = "Custom456";
       config.appVersion = "1.0.0";
       config.engineVersion = "TypeScript_1.0";
    
       Balancy.Callbacks.initExamplesWithLogs();
    
       await Balancy.Main.init(config);
    })();
    
  5. Clone the full working example from our public git project Balancy TypeScript Example