Skip to content

Commit e3294bf

Browse files
committed
Scrub migration commentary from documentation
1 parent dd128b6 commit e3294bf

26 files changed

Lines changed: 127 additions & 202 deletions

‎docs/getting-started.md‎

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,10 @@ order: 20
99

1010
Three things, and only one of them is installed for you:
1111

12-
- **The Nupp compiler on `PATH`.** This revision needs the binary codec at
13-
Nupp commit `e90e8d42d08a517ac12b70f1d50dd9c30d705d05` or a descendant;
14-
Nupp 0.0.3 does not contain it. With sibling checkouts, run
15-
`export PATH="$(cd ../nupp/bin && pwd):$PATH"` from the Tecs root to select
16-
that compiler. The exact pin also appears in the CI workflow.
12+
- **The Nupp compiler on `PATH`.** Use a build that provides
13+
`nupp.data.binary`; the CI workflow pins a compatible revision. With sibling
14+
checkouts, run `export PATH="$(cd ../nupp/bin && pwd):$PATH"` from the Tecs
15+
root to select that compiler.
1716
- **The Rust toolchain** `rust-toolchain.toml` pins. `rustup` fetches it on the
1817
first build.
1918
- **`stylua` and `prettier`**, which format the Lua manifest and the Markdown.
@@ -131,10 +130,8 @@ Physics uses Rapier. Its batched native interface sends the world's changes
131130
and reads the resulting poses once per fixed step; games need only
132131
`tecs.physics.install`, `attach`, and the other entity-facing operations.
133132

134-
Tiled map import and the retained UI are not implemented in this version.
135-
Sprite sheets are supported, but do not read Tiled map files. Taffy was the
136-
layout solver for the earlier UI; it is not a physics solver and the current
137-
engine has no Taffy-backed UI layer.
133+
Tiled map import and UI layout are not engine subsystems. Sprite sheets do not
134+
read Tiled map files.
138135

139136
## A component of your own
140137

‎examples/nupp/flatcolor.nupp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
module flatcolor
22

33
--[[
4-
A complete game entry for the first Nupp and Rust rendering vertical slice.
4+
A complete game entry for animated flat-color rendering.
55

66
The exported `create` function matches the Rust host's managed entry contract.
77
It installs three animated entities and delegates all platform and rendering

‎examples/nupp/sprites.nupp‎

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,13 @@
11
module sprites
22

33
--[[
4-
The camera and textured sprite vertical slice, as a complete game entry.
4+
A complete game entry for camera movement and textured sprites.
55

6-
The scene follows the one `bench/shapes.tl` measures on the Teal
7-
implementation, which is the tree's representative two-dimensional content:
8-
a 4000 by 2400 world field seen through a 1280 by 720 window, so roughly a
9-
tenth of it is on screen at once and the camera has somewhere to go. The field
10-
geometry is copied; the population is not, because an example wants to start
11-
instantly and the benchmark wants two hundred thousand entities.
6+
The scene uses a 4000 by 2400 world field seen through a 1280 by 720 window, so
7+
roughly a tenth of it is on screen at once and the camera has somewhere to go.
8+
Its small population keeps the example quick to start.
129

13-
Two images are built here rather than loaded, because asynchronous asset
14-
requests are the next milestone's work and a generated image keeps this example
10+
Two images are built in memory so the example remains self-contained and
1511
runnable from a clean checkout. The checker is opaque and the disc is not, so
1612
one frame exercises both an opaque and a blended batch.
1713

‎nupp.lua‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ return {
114114
targets = {
115115
headless = {
116116
kind = "modules",
117-
description = "Build the headless Tecs rewrite",
117+
description = "Build the headless Tecs modules",
118118
entries = {
119119
"tecs.application",
120120
"tecs.assets",

‎src/tecs/application.nupp‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
module tecs.application
22

33
--[[
4-
The host-neutral application lifecycle for the Nupp rewrite.
4+
The host-neutral application lifecycle.
55

66
The Rust host owns polling and passes one sealed event batch and elapsed delta
77
to `iterate`. This module owns only game lifecycle: plugin installation,
88
startup, world updates, crash containment, suspension, quit requests, and
9-
shutdown. Windowing, rendering, audio, and platform event conversion remain
10-
Rust service boundaries rather than fields filled with SDL compatibility
11-
objects.
9+
shutdown. Windowing, rendering, audio, and platform event conversion are Rust
10+
service boundaries rather than application fields.
1211

1312
Each application owns an asset loader. `Config.mcpPort` opts into one loopback
1413
MCP listener, opened before plugin installation so startup failures remain

‎src/tecs/audio.nupp‎

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,9 @@ nil and the failure reason, while the value-only `readInto` raises that reason.
9898
stream; destroy it and open a new microphone. Native capture supports one to
9999
eight channels. The public argument range remains one to 32 for compatibility;
100100
a valid request above eight returns an operational refusal from the native
101-
opener. Full device-enumeration change notifications remain deferred. Listing
102-
current devices and observing failure of an active stream do not depend on them.
101+
opener. Device enumeration is snapshot-only and provides no change
102+
notifications. Listing devices and observing failure of an active stream do not
103+
depend on notifications.
103104
]]
104105

105106
local audiobackend = require("tecs.platform.audiobackend")
@@ -135,10 +136,8 @@ local DEFAULT_CAPTURE_FREQUENCY: integer = 48000
135136
--- microphone is one microphone and a game that wants a stereo pair asks.
136137
local DEFAULT_CAPTURE_CHANNELS: integer = 1
137138

138-
--- Channels a microphone may be asked for. The ceiling is the one the SDL
139-
--- implementation published, and its refusal message is a compatibility
140-
--- surface, so it stays where it was even though the capture path itself
141-
--- carries fewer.
139+
--- Channels a microphone may be asked for. The public compatibility contract
140+
--- accepts up to 32 even though the native capture path carries fewer.
142141
local MAX_CAPTURE_CHANNELS: integer = 32
143142

144143
--- Slots a voice handle reserves for its index. The rest of the handle is a
@@ -659,7 +658,7 @@ end
659658
--- Names one physical audio device.
660659
---
661660
--- Re-exported from the backend contract so a game reaches it as
662-
--- `tecs.audio.Device`, which is where the SDL implementation published it.
661+
--- `tecs.audio.Device`.
663662
export type Device = audiobackend.Device
664663

665664
--- Configures `openMicrophone`.
@@ -706,11 +705,9 @@ export type MicrophoneConfig = {
706705
--- machine never created, so the frames cross by this side emptying a buffer
707706
--- rather than by anything calling in.
708707
---
709-
--- The buffer is bounded, which is the one behavior the SDL implementation had
710-
--- and this does not. SDL grew its capture stream without limit, so a game that
711-
--- stopped reading paid in memory and in latency forever. This drops the oldest
712-
--- frames instead and counts them in `overruns`, because the recent second is
713-
--- what a game that fell behind actually wants.
708+
--- The buffer is bounded. When a game stops reading, capture drops the oldest
709+
--- frames and counts them in `overruns`, preserving the most recent audio
710+
--- without unbounded memory or latency growth.
714711
export record Microphone
715712
--- Read-only. Reports the frames per second `read` answers in. This is the
716713
--- requested value, not the device's own.

‎src/tecs/ecs.nupp‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ module tecs.ecs
33
--[[
44
The entity component system shared by game code and engine systems.
55

6-
The Nupp rewrite exposes staged entity lifetime, tag and scalar components,
7-
dense archetype storage, and reusable queries. A spawn reserves its id
8-
immediately, and `commit` publishes structural changes.
6+
The ECS exposes staged entity lifetime, tag and scalar components, dense
7+
archetype storage, and reusable queries. A spawn reserves its id immediately,
8+
and `commit` publishes structural changes.
99
]]
1010

1111
local idallocator = require("tecs.internal.idallocator")

‎src/tecs/files.nupp‎

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -198,9 +198,8 @@ end
198198
--- Returns the root that disposable per-user data is created under.
199199
---
200200
--- `LOCALAPPDATA` on Windows, `~/Library/Caches` on Apple platforms, and
201-
--- `XDG_CACHE_HOME` or `~/.cache` elsewhere. These are the same directories the
202-
--- SDL build's Rust cache resolver chose, so a build that upgrades keeps
203-
--- reading the artifacts it wrote.
201+
--- `XDG_CACHE_HOME` or `~/.cache` elsewhere. Following the platform conventions
202+
--- keeps cache locations stable across host changes.
204203
--- @return the directory, or nil and a reason when the platform has none
205204
local function cacheBase(): (string?, string?)
206205
if WINDOWS then
@@ -270,8 +269,7 @@ end
270269
--- Nupp has no portable executable path, so this answers what the host said
271270
--- through the `__tecsBase` global, then the directory of `arg[0]`, and then an
272271
--- empty string. An empty answer is not a failure: it means the platform
273-
--- declined to say, and a caller falls back to a relative path, which is what
274-
--- the SDL implementation documented as well.
272+
--- declined to say, and a caller falls back to a relative path.
275273
--- @return the directory with a trailing separator, or an empty string
276274
export function basePath(): string
277275
local held = baseCache

‎src/tecs/gfx/clips.nupp‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,9 @@ process drives one renderer.
3434

3535
`culls` and `contains` answer against the table this module holds, so a game,
3636
an input layer, and a debug tool all test the same rectangles. Extraction does
37-
not yet drop a clipped entity: packet version 2 carries no clip index, so a
38-
`Clip` reaching the backend selects nothing there. The render lane adds that
39-
carriage, and until it does the region table is what a caller tests against
40-
itself.
37+
not drop a clipped entity because packet version 2 carries no clip index. A
38+
`Clip` reaching the backend therefore selects nothing there, and callers use
39+
the region table for clipping tests.
4140
]]
4241

4342
local ecs = require("tecs.ecs")

‎src/tecs/gfx/fonts.nupp‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ const concat = table.concat
4343

4444
--- Selects how a font's glyph images are stored.
4545
---
46-
--- These identifiers reach a game's font configuration and match the raster
47-
--- names the Teal implementation carried, so they are a compatibility surface.
46+
--- These identifiers reach a game's font configuration and are a compatibility
47+
--- surface.
4848
export type Raster = "sdf" | "alpha"
4949

5050
--- The options `newTTF` accepts.

0 commit comments

Comments
 (0)