feat : update readme

This commit is contained in:
2026-04-24 03:20:51 +08:00
parent 0de005cda5
commit 5b369e4613
+35
View File
@@ -50,6 +50,41 @@ When you're ready to deploy new features or assets to players:
4. The **GitHub Actions Workflow** (`deploy_patch.yml`) will automatically detect the push, build the patch manifest (`version.json`), and deploy it to the public `gh-pages` branch. 4. The **GitHub Actions Workflow** (`deploy_patch.yml`) will automatically detect the push, build the patch manifest (`version.json`), and deploy it to the public `gh-pages` branch.
5. Live game clients will detect the new version on boot, download the updated files, and apply the patch seamlessly. 5. Live game clients will detect the new version on boot, download the updated files, and apply the patch seamlessly.
### 4. Local Testing & Understanding the Patch System
When a player (or you) downloads an in-game patch, Godot downloads a `patch.pck` file to the system's `user://` directory.
- **Virtual File System:** Godot mounts this `.pck` file over the `res://` directory purely in memory. **It does not physically overwrite your local source files** (like `assets/data/version.json`).
- **Editor Bypass:** When testing locally in the Godot Editor, the `BootScreen` is configured to skip the remote network download and instead automatically parse your *local* `assets/data/version.json`.
- **Previewing Changelogs:** To preview how your changelog will look before pushing to GitHub:
1. Add your notes under the `## [NEXT]` section in `CHANGELOG_DRAFT.md`.
2. Run `py tools/generate_version_json.py` from the terminal.
3. Run the `BootScreen` scene in the Godot Editor. It will instantly display the updated local UI!
- **Syncing:** After the GitHub Actions CI builds a release online, remember to run `git pull origin main` to sync your local project files with the CI-generated files.
#### 🗺️ Architecture Flowchart
```mermaid
flowchart TD
%% Local Dev Flow
subgraph Local Dev Environment
A[📝 CHANGELOG_DRAFT.md] -->|py tools/generate_version_json.py| B[(📄 version.json)]
B -.->|Test in Editor| C{BootScreen}
C -- Editor Bypass --> D[Reads Local version.json directly]
end
%% CI Pipeline
subgraph CI/CD Pipeline
B -->|git push| E[⚡ GitHub Actions]
E -->|Compiles & Builds| F[📦 patch.pck]
F -->|Deploys| G((🌍 Public Repository))
end
%% Live Client Flow
subgraph Player Client
G -.->|HTTP Download on Boot| H[📂 user://patch.pck]
H -->|ProjectSettings.load_resource_pack| I[🧠 Godot Virtual File System]
I -.->|Overrides res:// in Memory| J[Game Starts Updated!]
end
```
--- ---
## 🚀 Ongoing Features (Incoming) ## 🚀 Ongoing Features (Incoming)