Skip to content

Updates

Balancy ensures that your game is always up-to-date by automatically synchronizing with the latest data. Understanding how updates work will help you manage your game more effectively and avoid potential issues.

How Balancy Updates Work

  • Content Delivery: Balancy leverages CDN technologies (Cloudflare and Cloudfront) to distribute game configurations globally.
  • Optimized Updates: Updates are structured around Templates. Each template's documents are grouped into a single config for efficient updating. For instance, adding a new GameEvent only updates the GameEvents config.
  • Document Changes: Any modifications to a Document mark its Template as "Dirty."
  • Deploying Changes: Deploying updates all Dirty Templates and increments their version. Be aware of cross-environment version synchronization:
  • After synchronizing environments via migration, if the GameEvents template is at version 5 and changes are made in the Dev Environment, deploying will increase the version to 6.
  • Migrating this updated data to the Stage Environment also updates its version to 6.
  • If changes are made directly in the Production Environment, the Game Events version could jump to 7 upon deployment.

Client-Side Plugin Behavior

Scenario Without Pre-downloaded Data

  1. Initial Check: At startup, Balancy compares locally cached configurations with the latest CDN versions, downloading updates as needed.
  2. Mapping: Once synchronization completes, the updated configs are mapped to their respective classes.

Scenario With Pre-downloaded Data

This scenario requires careful handling to prevent issues. Follow these best practices for guidance.

  1. Version Checks: Balancy compares the CDN configurations against those cached in Persistent Data and pre-downloaded in Resources. It skips downloading a config if its version is up-to-date.
  2. Final Mapping: Configurations with the highest version from either Resources or Cache are selected and mapped to classes.

Potential Issues and Solutions

Problems may arise under these circumstances:

  1. Different Environments: Using the Download Data feature in one environment and launching the game in another.
  2. Independent Changes: Both environments undergo changes without synchronization.

Solution: - Regular synchronization between Production and Stage environments is crucial. Ensure that only one environment undergoes changes post-synchronization to maintain consistency. - Continuously using the Download Data feature is beneficial for offline gameplay but requires diligent management of environment synchronization.

Rationale Behind Current Flow

The original workflow was designed to facilitate: 1. Development in Dev. 2. Migration from Dev to Stage. 3. Data downloading from Dev or Stage for testing. 4. Final testing in Stage before migrating to Production for live deployment.

This approach allowed for different configurations during app reviews. However, due to the complexities and confusion it introduced, we are revamping this system to replace environments with more flexible Branches/Versions. This change aims to resolve the challenges encountered with the current setup.