3.7 KiB
3.7 KiB
Mobile Update System
This document explains how the in-game update system works for mobile platforms (Android/iOS).
How It Works
┌─────────────────────────────────────────────────────────────┐
│ BOOT SCREEN │
│ ┌─────────────────┐ │
│ │ Check for │──→ No update? ──→ Proceed to game │
│ │ updates │ │
│ └────────┬────────┘ │
│ │ │
│ ▼ Update available │
│ ┌─────────────────────────────────────┐ │
│ │ Can patch in-app? │ │
│ │ YES → Show "Update Now" button │ │
│ │ NO → Show "Open Store" button │ │
│ └─────────────────────────────────────┘ │
└─────────────────────────────────────────────────────────────┘
Platform Behavior
| Platform | Update Method | Notes |
|---|---|---|
| Windows | External launcher | Use TektonLauncher.exe |
| Linux | External launcher | Use TektonLauncher |
| macOS | External launcher | Use TektonLauncher.app |
| Android | In-game patching | Downloads PCK files |
| iOS | In-game patching | Downloads PCK files |
| Web | N/A | Always uses latest deployed version |
Key Files
scripts/managers/game_update_manager.gd- Core update logicscripts/ui/boot_screen.gd- Update UI controllerscenes/boot_screen.tscn- Boot screen scene
Setting Up
1. Set Boot Screen as Main Scene (for mobile builds)
For mobile exports, you may want to use boot_screen.tscn as the main scene:
- Go to Project > Project Settings > Application > Run
- Set
Main Scenetores://scenes/boot_screen.tscn
Alternatively, keep your current main scene and call the update manager manually.
2. Configure URLs
Edit scripts/managers/game_update_manager.gd:
const VERSION_MANIFEST_URL := "https://your-server.com/version.json"
const ANDROID_STORE_URL := "https://play.google.com/store/apps/details?id=com.yourcompany.tekton"
const IOS_STORE_URL := "https://apps.apple.com/app/tekton/id123456789"
3. Using minimum_app_version
In version.json, set minimum_app_version to force store updates:
{
"latest_version": "1.2.0",
"minimum_app_version": "1.1.0"
}
If a user has version 1.0.0, they'll be directed to the store since in-app patching can't upgrade from below the minimum.
Creating Mobile Patches
- Export your game changes as a PCK file from Godot
- Upload to your hosting (same as desktop patches)
- Update
version.jsonwithpck_androidandpck_iosentries
"pck_android": {
"url": "https://your-server.com/patches/tekton-1.2.0-android.pck",
"size": 5242880,
"checksum_md5": "abc123..."
}
Limitations
- Cannot update native code - Engine/plugin changes require store update
- Cannot update main executable - Only assets and GDScript
- Storage space - Patches accumulate in user://patches/
- iOS App Store rules - Be careful about downloading executable content