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
- Ensure all cross references are self-contained (resources referenced by generators/transforms exist; prestige layers include the required `${layerId}-prestige-count` resource).
Copy file name to clipboardExpand all lines: docs/issue-775-design.md
+12-12Lines changed: 12 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,7 +20,7 @@ This design document proposes documenting the exact mathematical formulas used t
20
20
## 2. Context & Problem Statement
21
21
-**Background**: The engine uses a flexible system for defining costs via `costCurve` (which supports various mathematical functions) and `costMultiplier`.
22
22
-**Problem**: The exact formulas are not documented. Content creators resort to trial-and-error or reverse-engineering to understand how costs scale with level, leading to unexpected values and inefficient balancing workflows. The issue reporter specifically noted confusion around the `exponential` curve and how `offset` applies.
23
-
-**Forces**:
23
+
-**Forces**:
24
24
- Accuracy: The documentation must strictly reflect the runtime implementation.
25
25
- Clarity: Formulas should be expressed in standard mathematical notation where possible, alongside JSON examples.
26
26
@@ -36,9 +36,9 @@ This design document proposes documenting the exact mathematical formulas used t
36
36
37
37
## 4. Stakeholders, Agents & Impacted Surfaces
38
38
-**Primary Stakeholders**: Content Creators / Game Designers.
39
-
-**Agent Roles**:
39
+
-**Agent Roles**:
40
40
-**Documentation Agent**: Responsible for updating the markdown files.
@@ -62,15 +62,15 @@ Where `evaluateNumericFormula` behaves as follows:
62
62
We will add a new section "Cost Calculation Formulas" to `docs/content-dsl-usage-guidelines.md` (or `docs/content-quick-reference.md` as requested, but "Usage Guidelines" seems more appropriate for deep dives).
2.**Upgrade Cost Formula**: `FinalCost = BaseCostFromCurve * CostMultiplier * RepeatableAdjustment` (no global multipliers; RepeatableAdjustment comes from `repeatable.costCurve` for repeatable upgrades, defaults to 1 otherwise)
67
-
3.**Curve Formulas**:
68
-
***Exponential**: `Cost(level) = base * growth^level + offset`
69
-
**Note: Explicitly clarify that `offset` is added to the result, not the level.*
2.**Upgrade Cost Formula**: `FinalCost = BaseCostFromCurve * CostMultiplier * RepeatableAdjustment` (no global multipliers; RepeatableAdjustment comes from `repeatable.costCurve` for repeatable upgrades, defaults to 1 otherwise)
67
+
3.**Curve Formulas**:
68
+
-**Exponential**: `Cost(level) = base * growth^level + offset`
69
+
-*Note: Explicitly clarify that `offset` is added to the result, not the level.*
|`feat(renderer-webgpu): centralize texture usage for external copies`| Add a helper that applies required usage flags for `copyExternalImageToTexture` destinations; update atlas texture creation and usage enum fallbacks accordingly. | Renderer Implementation Agent | Doc approval | Atlas texture is created with `COPY_DST|RENDER_ATTACHMENT|TEXTURE_BINDING`; no scattered one-off bitmask tweaks; Node fallback constants include `RENDER_ATTACHMENT`. |
97
+
|`feat(renderer-webgpu): centralize texture usage for external copies`| Add a helper that applies required usage flags for `copyExternalImageToTexture` destinations; update atlas texture creation and usage enum fallbacks accordingly. | Renderer Implementation Agent | Doc approval | Atlas texture is created with `COPY_DST`, `RENDER_ATTACHMENT`, and `TEXTURE_BINDING`; no scattered one-off bitmask tweaks; Node fallback constants include `RENDER_ATTACHMENT`. |
98
98
|`test(renderer-webgpu): assert atlas texture usage flags`| Add regression tests verifying `createTexture` is called with the expected usage mask when `loadAssets()` uploads an atlas via `copyExternalImageToTexture`. | Test Agent | Implementation | New tests fail if `RENDER_ATTACHMENT` is omitted; tests run deterministically in Node with the existing WebGPU stubs. |
99
99
|`docs(renderer-webgpu): document copyExternalImageToTexture backend variance`| Add a short rationale and reference links (GPUWeb issue, MDN/spec notes) explaining why `RENDER_ATTACHMENT` is included for external-copy destination textures. | Docs Agent | Implementation | Documentation exists either as code comments near the helper or as a package doc entry; references are linked. |
| sim.running.input.*| `webContents.send(frame|simStatus)` throws (renderer not ready/crashed). | sim.running.input.*| Log error; continue sim tick loop; renderer recovery is via reload. |
124
+
| sim.running.input.*|`webContents.send` throws for `frame` or `simStatus` (renderer not ready/crashed). | sim.running.input.*| Log error; continue sim tick loop; renderer recovery is via reload. |
125
125
| sim.running.input.*| Worker becomes unresponsive (no `frame`/`ready`/`error` messages arrive). | sim.running.input.*| No automatic transition; renderer appears stalled; operator recovery is explicit restart (reload). |
126
126
| sim.running.input.*| Worker exits with code `0`. | sim.stopped | Log stop; send `simStatus` (stopped); terminate worker; ignore further input until restart. |
127
127
| sim.running.input.*| Worker exits non-zero OR emits `error`/`messageerror` OR sends `kind:'error'`. | sim.crashed | Log crash; send `simStatus` (crashed); terminate worker; ignore further input until restart. |
@@ -401,14 +401,14 @@ The `INPUT_EVENT` command is only allowed in the player priority lane so that UI
401
401
3.**Parallel work**: Yes; after the IPC surface exists, renderer capture (T3) and main mapping (T4) can proceed in parallel; sim-runtime wiring (T5) can proceed after core types land (T1).
402
402
403
403
### Ordering Gates
404
-
7.**Must be done first**: Define shared types + `INPUT_EVENT` command type in `@idle-engine/core` (T1).
405
-
8.**Must be done last**: Integration checks + coverage/docs regeneration (T6).
406
-
9.**Circular dependencies**: None in this breakdown; shared input-event types live in `@idle-engine/core` to avoid core↔shell cycles.
404
+
1.**Must be done first**: Define shared types + `INPUT_EVENT` command type in `@idle-engine/core` (T1).
405
+
2.**Must be done last**: Integration checks + coverage/docs regeneration (T6).
406
+
3.**Circular dependencies**: None in this breakdown; shared input-event types live in `@idle-engine/core` to avoid core↔shell cycles.
407
407
408
408
### Infrastructure Gates
409
-
10.**Build/config changes**: None expected beyond updating TypeScript sources and checked-in `dist/` outputs via existing `pnpm build` scripts.
0 commit comments