Update check: version feed from the git server's releases, title-screen banner, clearer version refusals
This commit is contained in:
@@ -100,6 +100,26 @@ phases M2.0-M2.7).
|
||||
Needed because every network change bumps the protocol (12 as of P5), and
|
||||
an out-of-date game can't join an up-to-date server: today that means
|
||||
`git pull` and a restart on every machine.
|
||||
|
||||
*Built so far (the check):* `scripts/core/updates.gd` asks the feed in
|
||||
Project Settings (`emberwild/updates/feed`, now the git server's
|
||||
`releases/latest` API; Gitea, Forgejo and GitHub answer alike) once at
|
||||
start-up. It reads the release's `version.json` asset (written by
|
||||
`tools/export.sh`: version, protocol, per-platform file, sha256 and size).
|
||||
The title screen shows the version bottom left and, when a newer one is
|
||||
out, a card with its notes and **Download** (this platform's zip, or the
|
||||
release page). A "Different game version" refusal now names the server's
|
||||
version and protocol and says whether you or the server needs updating;
|
||||
a dedicated server says in its log when it's behind (`check_updates` in
|
||||
server.json). Pause menu: **Check for updates at start**. Tests and bots
|
||||
never touch the network. Still to do: downloading, verifying and
|
||||
swapping it in (below).
|
||||
|
||||
**To publish a release:** bump `config/version` in project.godot and the
|
||||
four version numbers in export_presets.cfg, run
|
||||
`NOTES="..." tools/export.sh`, and make a release on the git server (tag
|
||||
`v<version>`) with the two zips and build/version.json attached. The repo
|
||||
(or at least its releases) must be readable without logging in.
|
||||
- **Knowing there's an update:** the game checks a small version file
|
||||
(version number, protocol, per-platform download URLs and checksums) at
|
||||
start-up and from the title screen. The server checks too. When joining
|
||||
|
||||
Reference in New Issue
Block a user