You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(demo_game): update font usage and build process for demo pack
This commit replaces the Inter-Regular font with Inter_28pt-Regular.ttf across the demo game assets, enhancing text rendering quality. The build scripts and documentation have been updated to reflect the new font integration and the addition of a demo build target, which compiles the demo pack and copies necessary assets. Additionally, error handling for missing font files has been improved to ensure a smoother build process.
Copy file name to clipboardExpand all lines: examples/demo_game/README.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ This is **not** a standalone game: it is a **tiny mod** (`.pk3` of configs) you
6
6
7
7
| Artifact | Description |
8
8
|----------|-------------|
9
-
| `idtech3_demo.pk3` | Config mod + **minimal native UI** (inside the zip as **`vm/ui<arch>.so`** and **`vm/ui.<arch>.so`**, same binary): enough to open a window without retail `ui.qvm`. The engine packs native shared libraries only inside zips; it **extracts** them to **`vm/native_cache/`** under your game home path (toggle **`com_nativeLibraryExtractPk3`**, default **1**) then loads that file, because `dlopen` cannot read zip entries directly. Also **Duktape** (`demo_js.cfg`), optional **Lua** (`demo_lua.cfg` / `scripts/lua/` when built with `USE_LUA`), and gameplay hints. **Bootstrap renderer assets** ship in the same zip (`gameinfo.txt`, `scripts/demo_bootstrap.shader`, `gfx/2d/bigchars.png`, small `gfx/demo/*.png`, **Inter** `fonts/Inter-Regular.ttf` + `fonts/LICENSE.txt`) so an **empty `base/`** still clears shader init and default `r_font` without retail `pak0`. For the filesystem **`default.cfg`** gate, use **`examples/demo_skeleton/base/z_minimal_bootstrap.pk3`** in **`base/`** (or retail paks). Regenerate PNGs with `python3 examples/demo_game/tools/gen_demo_bootstrap_media.py examples/demo_game/bootstrap_media`. |
9
+
| `idtech3_demo.pk3` | Config mod + **minimal native UI** (inside the zip as **`vm/ui<arch>.so`** and **`vm/ui.<arch>.so`**, same binary): enough to open a window without retail `ui.qvm`. The engine packs native shared libraries only inside zips; it **extracts** them to **`vm/native_cache/`** under your game home path (toggle **`com_nativeLibraryExtractPk3`**, default **1**) then loads that file, because `dlopen` cannot read zip entries directly. Also **Duktape** (`demo_js.cfg`), optional **Lua** (`demo_lua.cfg` / `scripts/lua/` when built with `USE_LUA`), and gameplay hints. **Bootstrap renderer assets** ship in the same zip (`gameinfo.txt`, `scripts/demo_bootstrap.shader`, `gfx/2d/bigchars.png`, small `gfx/demo/*.png`, **Inter** `fonts/Inter_28pt-Regular.ttf` from repo `fonts/` + `fonts/LICENSE.txt`) so an **empty `base/`** still clears shader init; `demo_features.cfg` sets **`r_font`** to that file. For the filesystem **`default.cfg`** gate, use **`examples/demo_skeleton/base/z_minimal_bootstrap.pk3`** in **`base/`** (or retail paks). Regenerate PNGs with `python3 examples/demo_game/tools/gen_demo_bootstrap_media.py examples/demo_game/bootstrap_media`. |
10
10
|`idtech3_demo_helper`| Optional tiny host binary that prints launch hints (built when `BUILD_EXAMPLE_DEMO_GAME=ON`). |
11
11
12
12
### “Playable” without custom qagame
@@ -63,7 +63,7 @@ Quick path: use the **[demo skeleton](../demo_skeleton/README.md)** (`run_demo_c
63
63
64
64
3. On load, `autoexec.cfg` runs `demo_features.cfg`, `demo_js.cfg`, `demo_lua.cfg`, and `demo_gameplay.cfg`. Edit files under `mod/` and rebuild `demo_game_pk3`.
65
65
66
-
**SDF console text:**`demo_features.cfg` enables `r_sdfEnable` / `r_sdfFont` using the packed **BMFont + distance atlas** (`fonts/demo_console_sdf.png` + `.fnt`). Regenerate with `python3 examples/demo_game/tools/gen_demo_console_sdf.py …/Inter-Regular.ttf examples/demo_game/bootstrap_media/fonts` (needs Pillow, numpy, scipy). If `autoexec.cfg` does not run from your install path, run `exec demo_features` once or add the same `r_sdf*` lines to your `default.cfg`.
66
+
**SDF console text:**`demo_features.cfg` enables `r_sdfEnable` / `r_sdfFont` using the packed **BMFont + distance atlas** (`fonts/demo_console_sdf.png` + `.fnt`). Regenerate with `python3 examples/demo_game/tools/gen_demo_console_sdf.py fonts/Inter_28pt-Regular.ttf examples/demo_game/bootstrap_media/fonts` (needs Pillow, numpy, scipy). If `autoexec.cfg` does not run from your install path, run `exec demo_features` once or add the same`r_font` /`r_sdf*` lines to your `default.cfg`.
67
67
68
68
**JavaScript:** requires **USE_DUKTAPE** in the engine build. If `js_reload` fails, check the console; ensure `js_allowEvents` is `1` (default).
0 commit comments