oriverse-engine 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +76 -76
- package/dist/CODEX_PROMPT.md +7 -7
- package/dist/GAME_AUTHORING.md +6 -6
- package/dist/examples/target_range.weave +1 -1
- package/dist/ktx_lib.js +1 -5236
- package/dist/ktx_lib.wasm +0 -0
- package/dist/oriverse_wgpu.d.ts +41 -40
- package/dist/oriverse_wgpu.js +1003 -342
- package/dist/oriverse_wgpu_bg.wasm +0 -0
- package/dist/oriverse_wgpu_bg.wasm.d.ts +41 -40
- package/dist/snippets/oriverse_market_client-0cd3013288f3c49c/inline0.js +6 -0
- package/dist/snippets/oriverse_networking_shared-e43478064e11e46c/inline0.js +4 -1
- package/dist/snippets/oriverse_wgpu-255445ce6d9a0851/inline0.js +19 -58
- package/dist/snippets/oriverse_wgpu-255445ce6d9a0851/inline1.js +58 -19
- package/dist/starter/AGENTS.md +2 -2
- package/dist/starter/CLAUDE.md +2 -2
- package/dist/starter/game.html +5 -5
- package/dist/templates/game_cdn.html +5 -5
- package/dist/weave_documentation.txt +727 -4892
- package/package.json +18 -18
package/README.md
CHANGED
|
@@ -1,76 +1,76 @@
|
|
|
1
|
-
# oriverse-engine
|
|
2
|
-
|
|
3
|
-
Prebuilt **Oriverse engine** bundle for serverless single-player games: a WebGPU
|
|
4
|
-
wasm engine you use three.js-style from a CDN, with your whole game authored as
|
|
5
|
-
**one `game.html`** containing inline [Weave](https://oriverse.io) source.
|
|
6
|
-
|
|
7
|
-
This package is the **compiled engine bundle only** (js glue + wasm + KTX texture
|
|
8
|
-
transcoder + docs). It contains no engine source code and has zero npm dependencies.
|
|
9
|
-
Everything runs client-side: no server, no SharedArrayBuffer, no workers, no
|
|
10
|
-
COOP/COEP headers, no network calls after the engine files load.
|
|
11
|
-
|
|
12
|
-
## Quickstart (script-tag flow)
|
|
13
|
-
|
|
14
|
-
Create a single `game.html`:
|
|
15
|
-
|
|
16
|
-
```html
|
|
17
|
-
<!DOCTYPE html>
|
|
18
|
-
<html lang="en">
|
|
19
|
-
<head><meta charset="UTF-8"><title>my game</title>
|
|
20
|
-
<style>html, body { margin: 0; background: #141313; }</style></head>
|
|
21
|
-
<body>
|
|
22
|
-
<!-- Your game: inline Weave world source (procedural content only) -->
|
|
23
|
-
<script type="text/weave" id="oriverse-weave">
|
|
24
|
-
object Ground { model = "cube" position = (0, 0, -50) size = (4000, 4000, 100) color = (0.35, 0.47, 0.35) }
|
|
25
|
-
object Box { model = "cube" position = (0, 300, 100) size = (100, 100, 100) color = (0.86, 0.47, 0.23) }
|
|
26
|
-
</script>
|
|
27
|
-
|
|
28
|
-
<!-- Pinned engine version: bump @0.1.
|
|
29
|
-
<script src="https://unpkg.com/oriverse-engine@0.1.
|
|
30
|
-
<script src="https://unpkg.com/oriverse-engine@0.1.
|
|
31
|
-
<script type="module">
|
|
32
|
-
import initOriverse from "https://unpkg.com/oriverse-engine@0.1.
|
|
33
|
-
await initOriverse({ module_or_path: "https://unpkg.com/oriverse-engine@0.1.
|
|
34
|
-
</script>
|
|
35
|
-
</body>
|
|
36
|
-
</html>
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
Serve it with any static file server (`python -m http.server`) or any host — no
|
|
40
|
-
special headers needed — and open it in a WebGPU-capable browser (Chrome/Edge).
|
|
41
|
-
A ready-made version of this file with error reporting is at
|
|
42
|
-
`dist/templates/game_cdn.html`; a fully offline variant (engine files served
|
|
43
|
-
next to the html) is `dist/templates/game.html`.
|
|
44
|
-
|
|
45
|
-
The engine auto-boots from the `#oriverse-weave` tag. To boot programmatically
|
|
46
|
-
instead, omit the tag and call the typed export once after init:
|
|
47
|
-
|
|
48
|
-
```js
|
|
49
|
-
import initOriverse, { bootOriverseArtifact } from "https://unpkg.com/oriverse-engine@0.1.
|
|
50
|
-
await initOriverse({ module_or_path: "https://unpkg.com/oriverse-engine@0.1.
|
|
51
|
-
await bootOriverseArtifact(weaveSource);
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
## Starter folder (for AI coding agents)
|
|
55
|
-
|
|
56
|
-
`dist/starter/` is a drop-in project folder: a wired-up `game.html` plus `AGENTS.md` /
|
|
57
|
-
`CLAUDE.md` instructions that Codex and Claude Code read automatically. Copy it,
|
|
58
|
-
point an agent at it, and say "make a game".
|
|
59
|
-
|
|
60
|
-
## Authoring
|
|
61
|
-
|
|
62
|
-
- Game authoring guide with 3 complete engine-tested example games:
|
|
63
|
-
`dist/GAME_AUTHORING.md` (examples also as raw Weave under `dist/examples/`).
|
|
64
|
-
- The game boots straight into play mode; WASD + mouse move the player
|
|
65
|
-
(override by defining your own `#class player`).
|
|
66
|
-
- Content must be fully procedural: primitive models, `#mesh`, `#texture`,
|
|
67
|
-
`#particles`. Market/network assets are unavailable and hard-error.
|
|
68
|
-
- Weave language + API reference: `dist/weave_documentation.txt`
|
|
69
|
-
(also at `https://unpkg.com/oriverse-engine@0.1.
|
|
70
|
-
- Package/runtime onboarding: `dist/AGENT_ONBOARDING.md`.
|
|
71
|
-
- Copy-paste prompt for AI coding agents: `dist/CODEX_PROMPT.md`.
|
|
72
|
-
|
|
73
|
-
## License
|
|
74
|
-
|
|
75
|
-
Proprietary; royalty-free use and unmodified redistribution permitted.
|
|
76
|
-
See `LICENSE.md`.
|
|
1
|
+
# oriverse-engine
|
|
2
|
+
|
|
3
|
+
Prebuilt **Oriverse engine** bundle for serverless single-player games: a WebGPU
|
|
4
|
+
wasm engine you use three.js-style from a CDN, with your whole game authored as
|
|
5
|
+
**one `game.html`** containing inline [Weave](https://oriverse.io) source.
|
|
6
|
+
|
|
7
|
+
This package is the **compiled engine bundle only** (js glue + wasm + KTX texture
|
|
8
|
+
transcoder + docs). It contains no engine source code and has zero npm dependencies.
|
|
9
|
+
Everything runs client-side: no server, no SharedArrayBuffer, no workers, no
|
|
10
|
+
COOP/COEP headers, no network calls after the engine files load.
|
|
11
|
+
|
|
12
|
+
## Quickstart (script-tag flow)
|
|
13
|
+
|
|
14
|
+
Create a single `game.html`:
|
|
15
|
+
|
|
16
|
+
```html
|
|
17
|
+
<!DOCTYPE html>
|
|
18
|
+
<html lang="en">
|
|
19
|
+
<head><meta charset="UTF-8"><title>my game</title>
|
|
20
|
+
<style>html, body { margin: 0; background: #141313; }</style></head>
|
|
21
|
+
<body>
|
|
22
|
+
<!-- Your game: inline Weave world source (procedural content only) -->
|
|
23
|
+
<script type="text/weave" id="oriverse-weave">
|
|
24
|
+
object Ground { model = "cube" position = (0, 0, -50) size = (4000, 4000, 100) color = (0.35, 0.47, 0.35) }
|
|
25
|
+
object Box { model = "cube" position = (0, 300, 100) size = (100, 100, 100) color = (0.86, 0.47, 0.23) }
|
|
26
|
+
</script>
|
|
27
|
+
|
|
28
|
+
<!-- Pinned engine version: bump @0.1.2 together on new releases -->
|
|
29
|
+
<script src="https://unpkg.com/oriverse-engine@0.1.2/dist/ktx_lib.js"></script>
|
|
30
|
+
<script src="https://unpkg.com/oriverse-engine@0.1.2/dist/ktx_bridge.js"></script>
|
|
31
|
+
<script type="module">
|
|
32
|
+
import initOriverse from "https://unpkg.com/oriverse-engine@0.1.2/dist/oriverse_wgpu.js";
|
|
33
|
+
await initOriverse({ module_or_path: "https://unpkg.com/oriverse-engine@0.1.2/dist/oriverse_wgpu_bg.wasm" });
|
|
34
|
+
</script>
|
|
35
|
+
</body>
|
|
36
|
+
</html>
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Serve it with any static file server (`python -m http.server`) or any host — no
|
|
40
|
+
special headers needed — and open it in a WebGPU-capable browser (Chrome/Edge).
|
|
41
|
+
A ready-made version of this file with error reporting is at
|
|
42
|
+
`dist/templates/game_cdn.html`; a fully offline variant (engine files served
|
|
43
|
+
next to the html) is `dist/templates/game.html`.
|
|
44
|
+
|
|
45
|
+
The engine auto-boots from the `#oriverse-weave` tag. To boot programmatically
|
|
46
|
+
instead, omit the tag and call the typed export once after init:
|
|
47
|
+
|
|
48
|
+
```js
|
|
49
|
+
import initOriverse, { bootOriverseArtifact } from "https://unpkg.com/oriverse-engine@0.1.2/dist/oriverse_wgpu.js";
|
|
50
|
+
await initOriverse({ module_or_path: "https://unpkg.com/oriverse-engine@0.1.2/dist/oriverse_wgpu_bg.wasm" });
|
|
51
|
+
await bootOriverseArtifact(weaveSource);
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## Starter folder (for AI coding agents)
|
|
55
|
+
|
|
56
|
+
`dist/starter/` is a drop-in project folder: a wired-up `game.html` plus `AGENTS.md` /
|
|
57
|
+
`CLAUDE.md` instructions that Codex and Claude Code read automatically. Copy it,
|
|
58
|
+
point an agent at it, and say "make a game".
|
|
59
|
+
|
|
60
|
+
## Authoring
|
|
61
|
+
|
|
62
|
+
- Game authoring guide with 3 complete engine-tested example games:
|
|
63
|
+
`dist/GAME_AUTHORING.md` (examples also as raw Weave under `dist/examples/`).
|
|
64
|
+
- The game boots straight into play mode; WASD + mouse move the player
|
|
65
|
+
(override by defining your own `#class player`).
|
|
66
|
+
- Content must be fully procedural: primitive models, `#mesh`, `#texture`,
|
|
67
|
+
`#particles`. Market/network assets are unavailable and hard-error.
|
|
68
|
+
- Weave language + API reference: `dist/weave_documentation.txt`
|
|
69
|
+
(also at `https://unpkg.com/oriverse-engine@0.1.2/dist/weave_documentation.txt`).
|
|
70
|
+
- Package/runtime onboarding: `dist/AGENT_ONBOARDING.md`.
|
|
71
|
+
- Copy-paste prompt for AI coding agents: `dist/CODEX_PROMPT.md`.
|
|
72
|
+
|
|
73
|
+
## License
|
|
74
|
+
|
|
75
|
+
Proprietary; royalty-free use and unmodified redistribution permitted.
|
|
76
|
+
See `LICENSE.md`.
|
package/dist/CODEX_PROMPT.md
CHANGED
|
@@ -53,15 +53,15 @@ object BlueCube {
|
|
|
53
53
|
</script>
|
|
54
54
|
<!-- ==== END OF EDITABLE BLOCK ==== -->
|
|
55
55
|
|
|
56
|
-
<script src="https://unpkg.com/oriverse-engine@0.1.
|
|
57
|
-
<script src="https://unpkg.com/oriverse-engine@0.1.
|
|
56
|
+
<script src="https://unpkg.com/oriverse-engine@0.1.2/dist/ktx_lib.js"></script>
|
|
57
|
+
<script src="https://unpkg.com/oriverse-engine@0.1.2/dist/ktx_bridge.js"></script>
|
|
58
58
|
<script type="module">
|
|
59
|
-
import initOriverse from "https://unpkg.com/oriverse-engine@0.1.
|
|
59
|
+
import initOriverse from "https://unpkg.com/oriverse-engine@0.1.2/dist/oriverse_wgpu.js";
|
|
60
60
|
const setBoot = (t) => { const b = document.getElementById('oriverse-status-banner'); if (b) b.textContent = t; };
|
|
61
61
|
(async () => {
|
|
62
62
|
try {
|
|
63
63
|
setBoot('instantiating wasm...');
|
|
64
|
-
await initOriverse({ module_or_path: "https://unpkg.com/oriverse-engine@0.1.
|
|
64
|
+
await initOriverse({ module_or_path: "https://unpkg.com/oriverse-engine@0.1.2/dist/oriverse_wgpu_bg.wasm" });
|
|
65
65
|
} catch (e) {
|
|
66
66
|
setBoot('WASM init failed:\n' + ((e && e.stack) ? e.stack : String(e)));
|
|
67
67
|
console.error('[wasm_boot] initOriverse failed:', e);
|
|
@@ -96,9 +96,9 @@ Rules — the engine hard-errors if you break the first two:
|
|
|
96
96
|
Authoritative references, served next to the engine (fetch if you can — the authoring
|
|
97
97
|
guide contains three complete tested example games to pattern-match from):
|
|
98
98
|
|
|
99
|
-
- https://unpkg.com/oriverse-engine@0.1.
|
|
100
|
-
- https://unpkg.com/oriverse-engine@0.1.
|
|
101
|
-
- https://unpkg.com/oriverse-engine@0.1.
|
|
99
|
+
- https://unpkg.com/oriverse-engine@0.1.2/dist/GAME_AUTHORING.md <- game patterns + 3 full example games
|
|
100
|
+
- https://unpkg.com/oriverse-engine@0.1.2/dist/weave_documentation.txt <- full language + API reference
|
|
101
|
+
- https://unpkg.com/oriverse-engine@0.1.2/dist/examples/coin_collector.weave (also dodge_blocks / target_range)
|
|
102
102
|
|
|
103
103
|
## Step 3: test
|
|
104
104
|
|
package/dist/GAME_AUTHORING.md
CHANGED
|
@@ -96,11 +96,11 @@ Default (injected when you don't write one):
|
|
|
96
96
|
#class player
|
|
97
97
|
event OnSpawned {
|
|
98
98
|
forever {
|
|
99
|
-
var Direction =
|
|
99
|
+
var Direction = GetMoveVectorCamera()
|
|
100
100
|
MoveInDirectionContinuouslyFacing(Direction, 900)
|
|
101
101
|
}
|
|
102
102
|
}
|
|
103
|
-
event
|
|
103
|
+
event ActionDownByThisPlayer[Jump] {
|
|
104
104
|
if IsOnGround() {
|
|
105
105
|
Jump(1000)
|
|
106
106
|
}
|
|
@@ -110,8 +110,8 @@ event KeyboardDownByThisPlayer[Space] {
|
|
|
110
110
|
|
|
111
111
|
Customization patterns (all inside `#class player`):
|
|
112
112
|
|
|
113
|
-
- Speed/feel: change `900` (cm/s);
|
|
114
|
-
|
|
113
|
+
- Speed/feel: change `900` (cm/s); `GetMoveVectorCamera()` also handles mobile thumbsticks.
|
|
114
|
+
`Jump(1400)` for a higher jump.
|
|
115
115
|
- Actions: `event ActionDownByThisPlayer[Primary]` (left click / tap), `[Secondary]`,
|
|
116
116
|
`[Interact]` (E), `[Jump]`. `IsActionPressedByThisPlayer(Action.Primary)` for held state.
|
|
117
117
|
- Aim at the crosshair: `GetMouseTargetObjectWithTag(Tag.Target)` returns the object under
|
|
@@ -211,7 +211,7 @@ The manager pattern (used by all three examples):
|
|
|
211
211
|
## 9. Procedural textures and meshes (quickstarts)
|
|
212
212
|
|
|
213
213
|
`#texture` defines a material usable as `material = "Name"` on any object (verbatim
|
|
214
|
-
|
|
214
|
+
example from the `texture_dsl` skill, which also has concrete/wood/metal/brick recipes):
|
|
215
215
|
|
|
216
216
|
```text
|
|
217
217
|
#texture StylizedGrass
|
|
@@ -438,7 +438,7 @@ event OnSpawned {
|
|
|
438
438
|
MoveInDirectionContinuouslyFacing(dir, 900)
|
|
439
439
|
}
|
|
440
440
|
}
|
|
441
|
-
event
|
|
441
|
+
event ActionDownByThisPlayer[Jump] {
|
|
442
442
|
if IsOnGround() {
|
|
443
443
|
Jump(1000)
|
|
444
444
|
}
|