Skip to content

Commit d30476a

Browse files
committed
feat(studio): introduce optional in-engine Studio tools for enhanced workflow
This commit adds a new feature to the Vulkan renderer, enabling optional in-engine Studio panels (session strip and command strip) controlled by the `r_studio_tools` variable. These tools provide lightweight workflow enhancements reminiscent of classic id Studio, allowing for quick access to session information and command execution. Documentation has been added to describe the usage and functionality of these tools, improving the overall development experience within the engine.
1 parent 828b68f commit d30476a

10 files changed

Lines changed: 408 additions & 4 deletions

File tree

AGENTS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
### Overview
66

7-
This is an **idTech3 engine fork** - a C/C++ game engine based on Quake III Arena with Vulkan 1.4 + RTX rendering, PBR, audio codecs (Opus/FLAC/WebM/MP3), Lua/Duktape scripting, and ImGui debug UI. It produces a client (`idtech3`), dedicated server (`idtech3_server`), and renderer plugins (`idtech3_opengl.so`, `idtech3_vulkan.so`).
7+
This is an **idTech3 engine fork** - a C/C++ game engine based on Quake III Arena with Vulkan 1.4 + RTX rendering, PBR, audio codecs (Opus/FLAC/WebM/MP3), Lua/Duktape scripting, and ImGui debug UI (optional **Studio** session + command strips via `r_studio_tools`; see `docs/IN_ENGINE_STUDIO_TOOLS.md`). It produces a client (`idtech3`), dedicated server (`idtech3_server`), and renderer plugins (`idtech3_opengl.so`, `idtech3_vulkan.so`).
88

99
### Building
1010

docs/AMPL.md

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
# AMPL (A Mathematical Programming Language)
2+
3+
**AMPL** is an algebraic modeling language for describing and solving large-scale optimization and scheduling problems. Syntax is close to conventional mathematical notation; models are typically separated from data (`.mod` / `.dat` / `.run`).
4+
5+
**Official site:** [https://www.ampl.com](https://www.ampl.com)
6+
7+
**Not part of this engine:** idTech3 does not embed or depend on AMPL. This page is a **standalone reference** only.
8+
9+
## Origins and license
10+
11+
Designed by Robert Fourer, David M. Gay, and Brian W. Kernighan at Bell Labs; first appeared in 1985. The **translator** is proprietary (AMPL Optimization LLC); the **AMPL Solver Library (ASL)** for reading `.nl` files and automatic differentiation is open source. **AMPL/MP** is an open-source library for building certain solver classes.
12+
13+
## Problem classes (examples)
14+
15+
Linear and mixed-integer programming, quadratic and mixed-integer QP, nonlinear and MINLP, second-order cone programming, complementarity (MPECs), constraint programming, global optimization, and others depending on the linked solver.
16+
17+
## Solver interaction
18+
19+
AMPL normally invokes a solver in a **separate process** via a well-defined **`.nl`** interface, which isolates solver crashes from the interpreter and allows mixed 32/64-bit translator/solver combinations.
20+
21+
## Sample model (Dantzig transportation)
22+
23+
Classic linear program: minimize freight cost subject to plant capacity and market demand.
24+
25+
```ampl
26+
set Plants;
27+
set Markets;
28+
29+
param Capacity{p in Plants};
30+
param Demand{m in Markets};
31+
param Distance{Plants, Markets};
32+
param Freight;
33+
34+
param TransportCost{p in Plants, m in Markets} :=
35+
Freight * Distance[p, m] / 1000;
36+
37+
var shipment{Plants, Markets} >= 0;
38+
39+
minimize cost:
40+
sum{p in Plants, m in Markets} TransportCost[p, m] * shipment[p, m];
41+
42+
s.t. supply{p in Plants}:
43+
sum{m in Markets} shipment[p, m] <= Capacity[p];
44+
45+
s.t. demand{m in Markets}:
46+
sum{p in Plants} shipment[p, m] >= Demand[m];
47+
48+
data;
49+
50+
set Plants := seattle san-diego;
51+
set Markets := new-york chicago topeka;
52+
53+
param Capacity :=
54+
seattle 350
55+
san-diego 600;
56+
57+
param Demand :=
58+
new-york 325
59+
chicago 300
60+
topeka 275;
61+
62+
param Distance : new-york chicago topeka :=
63+
seattle 2.5 1.7 1.8
64+
san-diego 2.5 1.8 1.4;
65+
66+
param Freight := 90;
67+
```
68+
69+
## Solvers (partial)
70+
71+
AMPL supports many solvers, including open-source and commercial examples: **CBC**, **CLP**, **IPOPT**, **SCIP**, **HiGHS**, **CPLEX**, **Gurobi**, **MOSEK**, **KNITRO**, **SNOPT**, **MINOS**, **Bonmin**, **Couenne**, **Gecode**, **JaCoP**, and others. See the current list at [Solvers – AMPL](https://ampl.com/products/solvers/).
72+
73+
## APIs and tooling
74+
75+
Official APIs exist for **Python**, **R**, **C++**, **C#**, **MATLAB**, and **Java**. NEOS and similar services accept AMPL models remotely.
76+
77+
## See also
78+
79+
- [JuMP](https://jump.dev/) (Julia)
80+
- [Pyomo](http://www.pyomo.org/) (Python)
81+
- [GNU MathProg](https://www.gnu.org/software/glpk/) (GLPK subset of AMPL)
82+
- [NEOS Server](https://neos-server.org/)
83+
84+
## References
85+
86+
- Fourer, Gay, Kernighan, *AMPL: A Modeling Language for Mathematical Programming* (2003), Duxbury/Brooks-Cole. ISBN 978-0-534-38809-6. [Online book](https://ampl.com/resources/the-ampl-book/)
87+
- Fourer, Gay, Kernighan, “A Modeling Language for Mathematical Programming,” *Management Science* 36(5), 1990. [DOI 10.1287/mnsc.36.5.519](https://doi.org/10.1287/mnsc.36.5.519)
88+
89+
---
90+
91+
*Summary incorporates material from the Wikipedia article [“AMPL”](https://en.wikipedia.org/wiki/AMPL) (retrieved 2026); [Creative Commons Attribution-ShareAlike 4.0 International License](https://creativecommons.org/licenses/by-sa/4.0/).*

docs/Clipper.md

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# Clipper (xBase programming language)
2+
3+
**Clipper** (Nantucket Clipper, later **CA-Clipper**) is an **xBase** compiler and language: a dBase III–style dialect compiled to DOS executables, aimed mainly at database-centric business applications (inventory, CRM, banking/insurance front-ends, etc.). It is **not** the same thing as polygon-clipping libraries often named “Clipper” in geometry (e.g. Angus Johnson’s library).
4+
5+
**Not part of this engine:** idTech3 does not embed, compile, or run Clipper code. This page is a **standalone reference** only.
6+
7+
## Origins and license
8+
9+
Developed by **Nantucket Corporation** (from 1984); sold to **Computer Associates** in 1992; product renamed **CA-Clipper**. Final CA release commonly cited: **CA Clipper 5.3b** (May 1997). Original platform: **DOS**; translator/toolchain was **proprietary**.
10+
11+
Compared to Ashton-Tate **dBASE III**, a major selling point was **compilation** to standalone programs instead of shipping an interpreted runtime for every line. Over time the language gained C/Pascal–like constructs, **object-oriented** features, and **code blocks** (mixing dBase-style macros / evaluation with function-pointer–like behavior). Nantucket’s **Aspen** line later fed **CA-Visual Objects** for Windows native code.
12+
13+
One classic **dBase** feature **not** in Clipper was the interactive **dot-prompt** command environment.
14+
15+
## Successors and clones
16+
17+
Active or historical implementations include **Harbour** and **xHarbour** (GPL and related), **XBase++** (Alaska Software), **FlagShip**, and others—often portable across DOS, Windows, Linux, Unix, and macOS, with extended runtimes and **RDD** (replaceable database drivers) for DBF/CDX/FoxPro-style formats, SQL bridges, etc.
18+
19+
**CA Clipper Tools** (CA library) became a **de facto** extension standard among many clones.
20+
21+
## Hello world
22+
23+
```clipper
24+
Procedure Main // Or Proc Main
25+
? "Hello World!"
26+
Return // Or Retu
27+
```
28+
29+
## Simple data-entry pattern (illustrative)
30+
31+
Classic `@ ... SAY ... GET ... READ` style (fragment; not a full program):
32+
33+
```clipper
34+
USE Customer SHARED NEW
35+
clear
36+
@ 1, 0 SAY "CustNum" GET Customer->CustNum PICT "999999" VALID Customer->CustNum > 0
37+
@ 3, 0 SAY "Contact" GET Customer->Contact VALID !empty(Customer->Contact)
38+
@ 4, 0 SAY "Address" GET Customer->Address
39+
READ
40+
```
41+
42+
## Version history (selected)
43+
44+
| Era | Examples |
45+
|-----|----------|
46+
| Nantucket “seasonal” | Winter ’84 (1985) … Summer ’87 (1987) |
47+
| Clipper 5.x (Nantucket) | 5.00 (1990), 5.01 (1991), 5.01 Rev.129 (1992) |
48+
| CA-Clipper 5.x | 5.20 (1993) … 5.3b (1997) |
49+
50+
Full release tables appear in historical vendor documentation and archives such as [The Oasis](https://harbour.github.io/the-oasis/docs/) (Clipper/xBase mirror; legacy site [the-oasis.net](http://www.the-oasis.net/)).
51+
52+
## Community / archives
53+
54+
- Usenet (historical): `comp.lang.clipper`, `comp.lang.clipper.visual-objects`
55+
- **Harbour Project:** [https://harbour.github.io/](https://harbour.github.io/)
56+
- CA/Grafx-era site is largely gone; last useful snapshots are often in the [Wayback Machine](https://web.archive.org/web/*/http://www.grafxsoft.com/clipper.htm)
57+
58+
## See also
59+
60+
- [dBase](https://en.wikipedia.org/wiki/DBase) — original interpreted xBase family
61+
- [Harbour](https://en.wikipedia.org/wiki/Harbour_(software)) — open-source Clipper-like compiler
62+
- [Visual FoxPro](https://en.wikipedia.org/wiki/Visual_FoxPro) / **FoxPro** — related xBase lineage on Windows
63+
64+
---
65+
66+
*Summary incorporates material from the Wikipedia article [“Clipper (programming language)”](https://en.wikipedia.org/wiki/Clipper_(programming_language)) (retrieved 2026); [Creative Commons Attribution-ShareAlike 4.0 International License](https://creativecommons.org/licenses/by-sa/4.0/).*

docs/EDITOR_BRIDGE.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
Entity definitions and key/value conventions shared between the
44
id Tech 3 engine and idTech3Radiant editor for feature parity.
55

6+
For optional in-engine **Studio** panels (session strip + command strip) that surface this document at runtime, see **[IN_ENGINE_STUDIO_TOOLS.md](IN_ENGINE_STUDIO_TOOLS.md)** (`r_studio_tools`).
7+
68
## Entity Key/Value Reference
79

810
### Volumetric Fog (`worldspawn` keys)

docs/IN_ENGINE_STUDIO_TOOLS.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# In-engine tools (id Studio–inspired)
2+
3+
The Vulkan + **Dear ImGui** overlay (`r_imgui`, toggle **F11** / `toggle_imgui`) already provides a docked **inspector**: PostFX, volumetrics, physics, profiler, placeholder Objects/Inspector/Shader/Viewport panels.
4+
5+
This document describes the optional **Studio** layer: lightweight, in-game workflow helpers reminiscent of classic **id Studio** (session strip + command strip), not a full map editor.
6+
7+
## Toggle
8+
9+
| Cvar | Default | Meaning |
10+
|------|---------|---------|
11+
| `r_imgui` | `1` | Master switch for the ImGui overlay (inspector CPU work). |
12+
| `r_studio_tools` | `0` | When `1`, enables **Studio** menu, **Studio / Session**, and **Studio / Console** panels. |
13+
14+
On startup with `r_studio_tools 1`, the Session and Console panels open automatically (with `r_imgui 1`). Enabling **Studio tools** from the inspector **Developer** menu at runtime also opens both panels.
15+
16+
Startup logs:
17+
18+
- `[VK][imgui] debug inspector r_imgui=…`
19+
- `[VK][studio] r_studio_tools=…`
20+
21+
## Studio / Session
22+
23+
Read-only view of common session cvars (`mapname`, `fs_game`, `fs_basegame`, `sv_hostname`) plus **Quick commands** (`map_restart`, `disconnect`, `vid_restart`) and a small **dev** row (`noclip`, `god`, `notarget`) routed through the normal command buffer.
24+
25+
## Studio / Console
26+
27+
Single-line command entry (Enter or **Run**) that appends to the main **command buffer**—same as the drop-down console. A **local history** (last 48 lines) is shown above the input; it is **not** a mirror of the full engine log.
28+
29+
## Editor parity
30+
31+
Entity keys and conventions shared with **idTech3Radiant** are documented in **[EDITOR_BRIDGE.md](EDITOR_BRIDGE.md)**.
32+
33+
## Future work (non-goals for this pass)
34+
35+
- Live game view texture in the Viewport panel
36+
- Full scene graph / property grid wired to entities
37+
- Shader live hot-reload beyond `r_reloadShaders` / `vid_restart`
38+
- Two-way IPC with the external editor
39+
40+
Those remain roadmap items; the Studio layer is intentionally small and safe to ship disabled by default.

0 commit comments

Comments
 (0)