@opengamehq/cli 0.8.0 → 0.9.3
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/AGENTS.md +6 -6
- package/CHANGELOG.md +79 -0
- package/README.md +7 -7
- package/dist/cli.mjs +156 -147
- package/dist/opengame-global.js +3 -3
- package/dist/preflight-worker.mjs +17 -17
- package/dist/runtime-builder.mjs +1 -1
- package/dist/safe-fs.py +69 -2
- package/dist/skills/manifest.json +22 -22
- package/dist/skills/opengame-api/SKILL.md +2 -2
- package/dist/skills/opengame-cli/SKILL.md +4 -4
- package/dist/skills/opengame-deploy/SKILL.md +6 -6
- package/dist/skills/opengame-deploy/references/manifest.md +9 -3
- package/dist/skills/opengame-deploy/references/packaging.md +4 -4
- package/dist/skills/opengame-jam/SKILL.md +4 -4
- package/dist/skills/opengame-router/SKILL.md +2 -2
- package/dist/skills/opengame-sdk/SKILL.md +2 -2
- package/dist/skills/opengame-sdk/references/leaderboards.md +11 -1
- package/dist/skills/opengame-sdk/references/radio.md +1 -1
- package/package.json +1 -1
package/dist/safe-fs.py
CHANGED
|
@@ -96,9 +96,21 @@ def execute(job, stream=None):
|
|
|
96
96
|
total += before.st_size
|
|
97
97
|
if total > job["maximum"]:
|
|
98
98
|
raise OverLimit("file limit")
|
|
99
|
-
|
|
99
|
+
span = job.get("range") if job["operation"] == "read-binary" else None
|
|
100
|
+
if span is None:
|
|
101
|
+
data = source.read(before.st_size + 1)
|
|
102
|
+
wanted = before.st_size
|
|
103
|
+
else:
|
|
104
|
+
# One part of a large asset: only these bytes reach memory, so a
|
|
105
|
+
# gigabyte goes up in parts without being held whole.
|
|
106
|
+
offset, wanted = span.get("offset"), span.get("length")
|
|
107
|
+
if (type(offset) is not int or type(wanted) is not int or offset < 0 or wanted < 0
|
|
108
|
+
or offset + wanted > before.st_size):
|
|
109
|
+
raise ValueError("invalid range")
|
|
110
|
+
source.seek(offset)
|
|
111
|
+
data = source.read(wanted)
|
|
100
112
|
after = os.fstat(source.fileno())
|
|
101
|
-
if len(data) !=
|
|
113
|
+
if len(data) != wanted or (before.st_size, before.st_mtime_ns, before.st_ctime_ns) != (after.st_size, after.st_mtime_ns, after.st_ctime_ns):
|
|
102
114
|
raise ValueError("file changed")
|
|
103
115
|
unchanged()
|
|
104
116
|
# Per-file ancestors are no longer needed once bytes are in memory.
|
|
@@ -113,6 +125,61 @@ def execute(job, stream=None):
|
|
|
113
125
|
result.append([file["path"], base64.b64encode(data).decode("ascii")])
|
|
114
126
|
unchanged()
|
|
115
127
|
return {"files": result}
|
|
128
|
+
if job["operation"] == "copy":
|
|
129
|
+
# The snapshot a deploy checks and packages, written to a private folder the
|
|
130
|
+
# CLI made, instead of returned as base64 for Node to hold. A 5 GB build held
|
|
131
|
+
# that way needed the whole build in memory twice over (snapshot and archive);
|
|
132
|
+
# copied, it costs disk the size of the build and a megabyte of memory. Each
|
|
133
|
+
# file is read from the held root exactly as "read" reads it, hashed as it is
|
|
134
|
+
# copied, and refused if it changed while being read.
|
|
135
|
+
destination = os.open("/", flags)
|
|
136
|
+
held.append(destination)
|
|
137
|
+
for component in parts(job["destination"].lstrip("/")):
|
|
138
|
+
destination = directory(destination, component)
|
|
139
|
+
result = []
|
|
140
|
+
total = 0
|
|
141
|
+
for file in job["files"]:
|
|
142
|
+
first_fd = len(held)
|
|
143
|
+
first_binding = len(bindings)
|
|
144
|
+
path = parts(file["relative"])
|
|
145
|
+
parent = root
|
|
146
|
+
for component in path[:-1]:
|
|
147
|
+
parent = directory(parent, component)
|
|
148
|
+
fd = os.open(path[-1], os.O_RDONLY | os.O_NOFOLLOW | os.O_NONBLOCK, dir_fd=parent)
|
|
149
|
+
target = str(file["target"])
|
|
150
|
+
if not target.isdigit():
|
|
151
|
+
raise ValueError("invalid target")
|
|
152
|
+
with os.fdopen(fd, "rb") as source:
|
|
153
|
+
before = os.fstat(source.fileno())
|
|
154
|
+
if not stat.S_ISREG(before.st_mode) or (file.get("size") is not None and before.st_size != file["size"]):
|
|
155
|
+
raise ValueError("file changed")
|
|
156
|
+
total += before.st_size
|
|
157
|
+
if total > job["maximum"]:
|
|
158
|
+
raise OverLimit("file limit")
|
|
159
|
+
out = os.open(target, os.O_WRONLY | os.O_CREAT | os.O_EXCL | os.O_NOFOLLOW, 0o600, dir_fd=destination)
|
|
160
|
+
digest = hashlib.sha256()
|
|
161
|
+
wanted, read = before.st_size + 1, 0
|
|
162
|
+
with os.fdopen(out, "wb") as output:
|
|
163
|
+
while read < wanted:
|
|
164
|
+
chunk = source.read(min(CHUNK, wanted - read))
|
|
165
|
+
if not chunk:
|
|
166
|
+
break
|
|
167
|
+
read += len(chunk)
|
|
168
|
+
if read > before.st_size:
|
|
169
|
+
break
|
|
170
|
+
digest.update(chunk)
|
|
171
|
+
output.write(chunk)
|
|
172
|
+
after = os.fstat(source.fileno())
|
|
173
|
+
if read != before.st_size or (before.st_size, before.st_mtime_ns, before.st_ctime_ns) != (after.st_size, after.st_mtime_ns, after.st_ctime_ns):
|
|
174
|
+
raise ValueError("file changed")
|
|
175
|
+
result.append([file["path"], before.st_size, digest.hexdigest()])
|
|
176
|
+
unchanged()
|
|
177
|
+
for fd in reversed(held[first_fd:]):
|
|
178
|
+
os.close(fd)
|
|
179
|
+
del held[first_fd:]
|
|
180
|
+
del bindings[first_binding:]
|
|
181
|
+
unchanged()
|
|
182
|
+
return {"digests": result}
|
|
116
183
|
if job["operation"] in ("sizes", "hash"):
|
|
117
184
|
# An external-asset plan is thousands of files. One process per file spent
|
|
118
185
|
# its time starting interpreters (OG Clash's 12,979 ran past ten minutes at
|
|
@@ -21,14 +21,14 @@
|
|
|
21
21
|
"family": "platform",
|
|
22
22
|
"default": false,
|
|
23
23
|
"description": "Call the OpenGame creator API directly over HTTPS. Covers the base URL, creator tokens and scopes, the OpenAPI document, the error shape and retry fields, deploying without the CLI, and checking whether OpenGame is open. Use when the person wants to deploy from their own tool or CI without the CLI, asks about the OpenGame REST API, api/v1, openapi.json or a creator token, or an API call returned an error code you need to read.",
|
|
24
|
-
"version": "1.0.
|
|
24
|
+
"version": "1.0.5",
|
|
25
25
|
"files": [
|
|
26
26
|
{
|
|
27
27
|
"path": "SKILL.md",
|
|
28
|
-
"sha256": "
|
|
28
|
+
"sha256": "b93dbe0e69ec6004b4cdb1d83e30718d3e631ccf95cdedd00ac935a554040e40"
|
|
29
29
|
}
|
|
30
30
|
],
|
|
31
|
-
"digest": "
|
|
31
|
+
"digest": "839d0ffffeb1b61c514781651c2a8da7930d9fa988dce043d0d1403e2c245103"
|
|
32
32
|
},
|
|
33
33
|
{
|
|
34
34
|
"name": "opengame-assets",
|
|
@@ -119,25 +119,25 @@
|
|
|
119
119
|
"family": "platform",
|
|
120
120
|
"default": false,
|
|
121
121
|
"description": "Drive the OpenGame command line tool from an agent. Covers installing it, signing in with the person, every command, JSON and JSONL output, exit codes, findings and how to retry. Use when the person mentions the opengame command, the OpenGame CLI, installing @opengamehq/cli, opengame login, check, dev, deploy, status, submit, releases, rollback, unpublish, restore, delete, details, achievements, handle, jam or token, or a command exited with an error you need to read.",
|
|
122
|
-
"version": "1.
|
|
122
|
+
"version": "1.8.1",
|
|
123
123
|
"files": [
|
|
124
124
|
{
|
|
125
125
|
"path": "SKILL.md",
|
|
126
|
-
"sha256": "
|
|
126
|
+
"sha256": "a233e44dde59b033654a22d3fb900bf5d8aa45cd2265dc4bd6dacd3e258f068f"
|
|
127
127
|
}
|
|
128
128
|
],
|
|
129
|
-
"digest": "
|
|
129
|
+
"digest": "29985f7f32360e8e731ec7998eb0dbacd8c120f03d714e14632f1b29af3e75de"
|
|
130
130
|
},
|
|
131
131
|
{
|
|
132
132
|
"name": "opengame-deploy",
|
|
133
133
|
"family": "platform",
|
|
134
134
|
"default": true,
|
|
135
135
|
"description": "Put a browser game online with OpenGame, the marketplace and game jam for browser games. Packages the game, checks it locally, uploads it to a private preview only the owner can play, reads and fixes findings, then submits one exact release for review. Use when the person says deploy my game, put it online, host it, share it, upload it, publish it, get me a link, make it playable for friends, or asks where to put a browser game or a Three.js game.",
|
|
136
|
-
"version": "1.
|
|
136
|
+
"version": "1.1.1",
|
|
137
137
|
"files": [
|
|
138
138
|
{
|
|
139
139
|
"path": "SKILL.md",
|
|
140
|
-
"sha256": "
|
|
140
|
+
"sha256": "dfd28b0c0296c14948d18c68b301dd2f6bc375de29d78356efda3758184e4a7f"
|
|
141
141
|
},
|
|
142
142
|
{
|
|
143
143
|
"path": "references/json-events.md",
|
|
@@ -145,14 +145,14 @@
|
|
|
145
145
|
},
|
|
146
146
|
{
|
|
147
147
|
"path": "references/manifest.md",
|
|
148
|
-
"sha256": "
|
|
148
|
+
"sha256": "3f651d06ca8e1aa7e9fc69c6c4b327f017661472cbadb692ba8ffad8f19da798"
|
|
149
149
|
},
|
|
150
150
|
{
|
|
151
151
|
"path": "references/packaging.md",
|
|
152
|
-
"sha256": "
|
|
152
|
+
"sha256": "82c2ec30ab27d6a08c167e09a4af68134e6ef4207859b9e8655d6213d4bb2114"
|
|
153
153
|
}
|
|
154
154
|
],
|
|
155
|
-
"digest": "
|
|
155
|
+
"digest": "5c1fb58d7baf3fffec4e335e255a688c2b23d1d757a171dd2efd55156c39b849"
|
|
156
156
|
},
|
|
157
157
|
{
|
|
158
158
|
"name": "opengame-depth",
|
|
@@ -235,14 +235,14 @@
|
|
|
235
235
|
"family": "platform",
|
|
236
236
|
"default": false,
|
|
237
237
|
"description": "Enter a game in an OpenGame jam. Finds the open jams, their tracks and rules, checks the game against them, and submits one exact release as an entry with the person's own answers, leaving the certification to the person. Use when the person says enter the jam, submit to the jam, which track should I pick, am I eligible, what are the jam rules, or mentions the OpenGame Global AI Game Jam.",
|
|
238
|
-
"version": "1.0.
|
|
238
|
+
"version": "1.0.7",
|
|
239
239
|
"files": [
|
|
240
240
|
{
|
|
241
241
|
"path": "SKILL.md",
|
|
242
|
-
"sha256": "
|
|
242
|
+
"sha256": "2c4145df9bc8ac28b1ccebf8889b12a39c83cca7c1a89df5a0fb4129fe8d31f7"
|
|
243
243
|
}
|
|
244
244
|
],
|
|
245
|
-
"digest": "
|
|
245
|
+
"digest": "ff0bce8f6aa6627c7511e65235ac4644081bf27777d7e8b70e36fd2c569dd335"
|
|
246
246
|
},
|
|
247
247
|
{
|
|
248
248
|
"name": "opengame-lighting",
|
|
@@ -375,18 +375,18 @@
|
|
|
375
375
|
"family": "platform",
|
|
376
376
|
"default": true,
|
|
377
377
|
"description": "Build, test and submit a browser game on OpenGame. Routes game work to the deploy guide, whole-game review and relevant craft skills. Use when someone asks to make a game, improve a game, check it, deploy it or enter an OpenGame jam.",
|
|
378
|
-
"version": "1.0.
|
|
378
|
+
"version": "1.0.6",
|
|
379
379
|
"files": [
|
|
380
380
|
{
|
|
381
381
|
"path": "SKILL.md",
|
|
382
|
-
"sha256": "
|
|
382
|
+
"sha256": "508c246139ba17b55ddac4cf6d544b26dd853f71a91c494d51532738d7db013b"
|
|
383
383
|
},
|
|
384
384
|
{
|
|
385
385
|
"path": "references/process.md",
|
|
386
386
|
"sha256": "3462bdd5a87f81eee69ffb12ca04519b35404f67c920b182443e81a8904100dd"
|
|
387
387
|
}
|
|
388
388
|
],
|
|
389
|
-
"digest": "
|
|
389
|
+
"digest": "0e111fd2d182e0a8a9c9d5a2d1e8a48e43249e8a1df8db09412b056f2ccf9558"
|
|
390
390
|
},
|
|
391
391
|
{
|
|
392
392
|
"name": "opengame-scene-audit",
|
|
@@ -411,11 +411,11 @@
|
|
|
411
411
|
"family": "platform",
|
|
412
412
|
"default": false,
|
|
413
413
|
"description": "Integrate a browser game with OpenGame through @opengamehq/sdk, the injected global or a native engine bridge. Covers start-up, the player and their OG at load, names, leaderboards, achievements, events, pause, mute, fullscreen, keys inside the frame and threaded builds. Use when the person says integrate with OpenGame, add the SDK, show the player's name or OG, add a leaderboard or achievement, track events, fix fullscreen or keys in the game frame, or asks how a game talks to OpenGame.",
|
|
414
|
-
"version": "1.0.
|
|
414
|
+
"version": "1.0.10",
|
|
415
415
|
"files": [
|
|
416
416
|
{
|
|
417
417
|
"path": "SKILL.md",
|
|
418
|
-
"sha256": "
|
|
418
|
+
"sha256": "2a35ccbefce9194e63e8ec7c85a2a70cf3a5a06d534b8cab34dd3f6c9c6c0326"
|
|
419
419
|
},
|
|
420
420
|
{
|
|
421
421
|
"path": "references/engines.md",
|
|
@@ -431,14 +431,14 @@
|
|
|
431
431
|
},
|
|
432
432
|
{
|
|
433
433
|
"path": "references/leaderboards.md",
|
|
434
|
-
"sha256": "
|
|
434
|
+
"sha256": "4439937932acd12fe0e8009fc6616621b0466e4292398005fe675c9a39b4f327"
|
|
435
435
|
},
|
|
436
436
|
{
|
|
437
437
|
"path": "references/radio.md",
|
|
438
|
-
"sha256": "
|
|
438
|
+
"sha256": "ff8a2db8fe57b0ba0ba0c804419e5c13d7ebee187e268f26fa148c82fad00cd7"
|
|
439
439
|
}
|
|
440
440
|
],
|
|
441
|
-
"digest": "
|
|
441
|
+
"digest": "c7eb939a609ba292e1fec5d880e6d1f109ead5ef998a2d5d64ade5a3b5881c8a"
|
|
442
442
|
},
|
|
443
443
|
{
|
|
444
444
|
"name": "opengame-stability",
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
name: opengame-api
|
|
3
3
|
description: Call the OpenGame creator API directly over HTTPS. Covers the base URL, creator tokens and scopes, the OpenAPI document, the error shape and retry fields, deploying without the CLI, and checking whether OpenGame is open. Use when the person wants to deploy from their own tool or CI without the CLI, asks about the OpenGame REST API, api/v1, openapi.json or a creator token, or an API call returned an error code you need to read.
|
|
4
4
|
metadata:
|
|
5
|
-
version: "1.0.
|
|
5
|
+
version: "1.0.5"
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# Call the OpenGame creator API
|
|
9
9
|
|
|
10
|
-
OpenGame opens on
|
|
10
|
+
OpenGame opens on 18 November 2026, and the creator API on 18 November. Until 18 November, every route except the status route and sign-in answers 403
|
|
11
11
|
with the error `not_launched` and the message "OpenGame opens for creators on 18 November." for any account
|
|
12
12
|
outside the OpenGame team. Check before anything else:
|
|
13
13
|
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
name: opengame-cli
|
|
3
3
|
description: Drive the OpenGame command line tool from an agent. Covers installing it, signing in with the person, every command, JSON and JSONL output, exit codes, findings and how to retry. Use when the person mentions the opengame command, the OpenGame CLI, installing @opengamehq/cli, opengame login, check, dev, deploy, status, submit, releases, rollback, unpublish, restore, delete, details, achievements, handle, jam or token, or a command exited with an error you need to read.
|
|
4
4
|
metadata:
|
|
5
|
-
version: "1.
|
|
5
|
+
version: "1.8.1"
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# Use the OpenGame CLI
|
|
9
9
|
|
|
10
|
-
OpenGame opens on
|
|
10
|
+
OpenGame opens on 18 November 2026, and the CLI on 18 November. Until 18 November, every command except `version`, `help`, `login`, `logout` and `whoami` prints
|
|
11
11
|
"OpenGame opens for creators on 18 November." for anybody outside the OpenGame team, and exits with the
|
|
12
12
|
`not_launched` code (7) that `opengame help --json` lists. That is the platform's answer,
|
|
13
13
|
not a broken install: tell the person, and do not retry, reinstall or look for a way round it.
|
|
@@ -61,7 +61,7 @@ token in a command argument, a file in the project, a log or a reply.
|
|
|
61
61
|
|
|
62
62
|
| Command | What it does |
|
|
63
63
|
| --- | --- |
|
|
64
|
-
| `opengame init [dir]` | Create opengame.json for an existing game. |
|
|
64
|
+
| `opengame init [dir]` | Create opengame.json for an existing game. Asks a person only the game's name; the rest is filled in on the deploy's page. |
|
|
65
65
|
| `opengame check [dir]` | Find local build and asset problems before uploading. |
|
|
66
66
|
| `opengame dev [dir]` | Serve a local export with the game runtime's headers. |
|
|
67
67
|
| `opengame login` | Sign in through the browser. |
|
|
@@ -69,7 +69,7 @@ token in a command argument, a file in the project, a log or a reply.
|
|
|
69
69
|
| `opengame status [dir]` | Show the latest deploy for this folder, with its findings. |
|
|
70
70
|
| `opengame deployments [dir]` | List the linked game's deploys, newest first. |
|
|
71
71
|
| `opengame open [dir]` | Open the linked game's private page. |
|
|
72
|
-
| `opengame submit [dir]` | Send one release to review, and enter it in a jam. |
|
|
72
|
+
| `opengame submit [dir]` | Send one release to review, and enter it in a jam with flags. A deploy goes to review by itself; a person enters the jam on the deploy's page. |
|
|
73
73
|
| `opengame jams [slug]` | List open jams, or show one jam's tracks and flags. |
|
|
74
74
|
| `opengame jam <withdraw\|reenter>` | Withdraw the linked game's jam entry, or put a withdrawn one back. |
|
|
75
75
|
| `opengame releases [dir]` | List the linked game's releases: which is live, which were live before, and which can be made live again. |
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
name: opengame-deploy
|
|
3
3
|
description: Put a browser game online with OpenGame, the marketplace and game jam for browser games. Packages the game, checks it locally, uploads it to a private preview only the owner can play, reads and fixes findings, then submits one exact release for review. Use when the person says deploy my game, put it online, host it, share it, upload it, publish it, get me a link, make it playable for friends, or asks where to put a browser game or a Three.js game.
|
|
4
4
|
metadata:
|
|
5
|
-
version: "1.
|
|
5
|
+
version: "1.1.1"
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# Deploy a browser game to OpenGame
|
|
9
9
|
|
|
10
|
-
OpenGame opens on
|
|
10
|
+
OpenGame opens on 18 November 2026. The CLI, uploads and jam entries open on 18 November.
|
|
11
11
|
Until then, every CLI command except `version`, `help`, `login`, `logout` and `whoami`
|
|
12
12
|
prints "OpenGame opens for creators on 18 November." for anybody outside the OpenGame team, and the API
|
|
13
13
|
refuses with `not_launched`. Nothing is wrong with the game or the install: tell the
|
|
@@ -100,14 +100,14 @@ opengame login --continue --json
|
|
|
100
100
|
|
|
101
101
|
Run these from the game folder.
|
|
102
102
|
|
|
103
|
-
If the folder has no `opengame.json`, create one.
|
|
103
|
+
If the folder has no `opengame.json`, create one. The title is all it needs. A decomp or a mod says so with `--kind` and names the game it is based on:
|
|
104
104
|
|
|
105
105
|
```bash
|
|
106
106
|
opengame init . --title "My game" --json
|
|
107
107
|
opengame init . --title "Doom but blue" --kind mod --based-on "Doom" --json
|
|
108
108
|
```
|
|
109
109
|
|
|
110
|
-
|
|
110
|
+
Do not ask the creator for a description or a genre before deploying. When you know them, pass `--description` (40 characters or more) and `--genre`; when you do not, init writes a placeholder description and a provisional genre, and the deploy prints its page, where the creator writes the description, chooses the genre and enters the jam. After the deploy you can set the description yourself with `opengame details --description "..." --json`. If the file already exists, leave `init` alone and edit the file.
|
|
111
111
|
|
|
112
112
|
For a game that already exists on OpenGame, in a new checkout, link the folder first so the deploy does not create a second game:
|
|
113
113
|
|
|
@@ -123,7 +123,7 @@ opengame check . --build --json
|
|
|
123
123
|
opengame deploy . --json
|
|
124
124
|
```
|
|
125
125
|
|
|
126
|
-
`deploy` runs the manifest's build command, checks the output and uploads it, up to
|
|
126
|
+
`deploy` runs the manifest's build command, checks the output and uploads it, up to 4 GiB zipped. It returns once the upload is in, with exit 0 and `data.done: false`, while the checks run on the server. Keep `.opengame/`: later commands resume and follow the same deploy from it. Use `--no-build` only when the creator says the export is already built and its build cannot run here, never to get past a failing build.
|
|
127
127
|
|
|
128
128
|
| Field | What it holds |
|
|
129
129
|
| --- | --- |
|
|
@@ -177,7 +177,7 @@ opengame jams --json
|
|
|
177
177
|
opengame submit --release <releaseId> --no-wait --json
|
|
178
178
|
```
|
|
179
179
|
|
|
180
|
-
OpenGame decides where submissions go. When that is a jam, the
|
|
180
|
+
OpenGame decides where submissions go, and a ready deploy goes to review by itself. When that is a jam, the creator usually enters it on the deploy's page (`data.deploymentUrl`). To enter it from here instead, read the form with `opengame jams <slug> --json` and pass the track, the models they used and any sponsor evidence as `--track`, `--models`, `--sponsor` and `--evidence-<sponsor>`. A missing answer exits 2 and names the flag. A decomp or a mod cannot enter a jam.
|
|
181
181
|
|
|
182
182
|
When `data.state` is `needs_certification`, give the creator `data.certifyUrl`, which the CLI also prints as a `certify_required` notice. They certify in their own browser that they have the rights to the game. You cannot do it for them. Follow the review with:
|
|
183
183
|
|
|
@@ -32,7 +32,7 @@ they belong to one entry, not to the game.
|
|
|
32
32
|
| `cover` | Not used. OpenGame makes the cover after approval. A file that still names one passes `check`, and the CLI does not upload it; leave the field out |
|
|
33
33
|
| `controls` | One or more of `keyboard`, `mouse`, `gamepad`, each once |
|
|
34
34
|
| `requires` | Optional. `threads: true` for a build that cannot start without them, `renderer` (`webgl`, `webgl2` or `webgpu`), `desktopOnly`, `gamepad`. The game page lists them, and a browser that cannot run threads is told so instead of getting a black frame |
|
|
35
|
-
| `leaderboards` | Up to
|
|
35
|
+
| `leaderboards` | Up to 25 boards: `key` (lowercase, starts with a letter, up to 48 characters), `order` (`asc` or `desc`), `label` (up to 60 characters), optional `min` and `max` |
|
|
36
36
|
| `achievements` | Up to 100: `id` (lowercase letters, digits, `-` and `_`, up to 48 characters), `title`, optional `description`. A deploy saves them when its preview is ready |
|
|
37
37
|
| `sdk` | Optional. A version string, or `{ "inject": false, "version": "..." }`. `inject: false` is honoured only on the older contract whose serving tree the pipeline rewrites; the contracts that add `/_og/sdk.js` at the edge always add it |
|
|
38
38
|
| `runtimes` | Optional. Settings for a runtime the platform serves pinned (js-dos, Ruffle, Pyodide, wasmoon, Flutter's CanvasKit); the engine's guide says which |
|
|
@@ -69,8 +69,14 @@ it plays.
|
|
|
69
69
|
| `decomp` | An existing game rebuilt from its decompiled code | Required | No |
|
|
70
70
|
| `mod` | Changes to an existing game, like new levels, rules or art | Required | No |
|
|
71
71
|
|
|
72
|
-
`opengame init --kind mod --based-on "Doom"` writes both. Without `--kind`, init
|
|
73
|
-
|
|
72
|
+
`opengame init --kind mod --based-on "Doom"` writes both. Without `--kind`, init makes a
|
|
73
|
+
game; it asks a person nothing but the game's name.
|
|
74
|
+
|
|
75
|
+
A folder with no description of its own gets a placeholder sentence, which the deploy marks
|
|
76
|
+
provisional, and so does a genre init could not read from the game's words. Do not ask the
|
|
77
|
+
creator for either before deploying: the deploy's page asks them, and `opengame details
|
|
78
|
+
--description` sets the description from here once the game exists. A game cannot publish
|
|
79
|
+
with the placeholder.
|
|
74
80
|
|
|
75
81
|
## Who owns which value
|
|
76
82
|
|
|
@@ -9,9 +9,9 @@ also published at opengame.io/agent.md.
|
|
|
9
9
|
| Rule | Limit | What happens |
|
|
10
10
|
| --- | --- | --- |
|
|
11
11
|
| Entry point | `index.html` at the root of the build output | Refused |
|
|
12
|
-
| Compressed size |
|
|
13
|
-
| Uncompressed size |
|
|
14
|
-
| File count |
|
|
12
|
+
| Compressed size | 4096 MiB | Refused |
|
|
13
|
+
| Uncompressed size | 5120 MiB | Refused |
|
|
14
|
+
| File count | 25,000 | Refused |
|
|
15
15
|
| Compression ratio | 200 : 1 | Refused, as a zip bomb guard |
|
|
16
16
|
| Paths | Case matches the file on disk; no `../`, no symlinks, no absolute paths | Refused |
|
|
17
17
|
| Excluded | `node_modules/`, `.git/`, `.env*`, source maps, OS junk | Stripped, with a `files_excluded` notice |
|
|
@@ -114,4 +114,4 @@ game at 1920 x 1080 (primary), 1366 x 768, 2560 x 1440, 3440 x 1440, 1024 x 640
|
|
|
114
114
|
## Manifest limits
|
|
115
115
|
|
|
116
116
|
`opengame.json` itself is at most 64 KiB, with at most
|
|
117
|
-
|
|
117
|
+
25 leaderboards. See [manifest.md](manifest.md).
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
name: opengame-jam
|
|
3
3
|
description: Enter a game in an OpenGame jam. Finds the open jams, their tracks and rules, checks the game against them, and submits one exact release as an entry with the person's own answers, leaving the certification to the person. Use when the person says enter the jam, submit to the jam, which track should I pick, am I eligible, what are the jam rules, or mentions the OpenGame Global AI Game Jam.
|
|
4
4
|
metadata:
|
|
5
|
-
version: "1.0.
|
|
5
|
+
version: "1.0.7"
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# Enter an OpenGame jam
|
|
9
9
|
|
|
10
|
-
OpenGame opens on
|
|
10
|
+
OpenGame opens on 18 November 2026. Jam entries open on 18 November and close on
|
|
11
11
|
18 December, 11:59 pm PT; after the close every deploy path answers `entries_closed`.
|
|
12
12
|
|
|
13
13
|
Until 18 November, entries stay closed: the CLI and the API answer
|
|
@@ -48,8 +48,8 @@ the authority):
|
|
|
48
48
|
- **Free to play, with no crypto, ads or tracking.** No payments, tips or donations, no
|
|
49
49
|
wallets or tokens, no ads or ad pixels, no session recording. `opengame-deploy` has
|
|
50
50
|
the full rules.
|
|
51
|
-
- **Inside the bundle limits:**
|
|
52
|
-
|
|
51
|
+
- **Inside the bundle limits:** 4096 MiB zipped,
|
|
52
|
+
5120 MiB unzipped, 25,000 files.
|
|
53
53
|
- **The person owns the art, audio, models, fonts and code**, or holds a licence to
|
|
54
54
|
ship them.
|
|
55
55
|
- **A game or a world, not a decomp or a mod.** Read `kind` in `opengame.json`. A decomp
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
name: opengame-router
|
|
3
3
|
description: Build, test and submit a browser game on OpenGame. Routes game work to the deploy guide, whole-game review and relevant craft skills. Use when someone asks to make a game, improve a game, check it, deploy it or enter an OpenGame jam.
|
|
4
4
|
metadata:
|
|
5
|
-
version: "1.0.
|
|
5
|
+
version: "1.0.6"
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# Work on an OpenGame game
|
|
9
9
|
|
|
10
|
-
OpenGame opens on
|
|
10
|
+
OpenGame opens on 18 November 2026. The CLI, uploads and jam entries open on 18 November.
|
|
11
11
|
Until then, the CLI and the creator API answer "OpenGame opens for creators on 18 November."
|
|
12
12
|
to everybody outside the OpenGame team. That is the platform's answer, not a fault in the
|
|
13
13
|
game: tell the person, and keep working on the game itself, which they can still build and
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: opengame-sdk
|
|
3
3
|
description: Integrate a browser game with OpenGame through @opengamehq/sdk, the injected global or a native engine bridge. Covers start-up, the player and their OG at load, names, leaderboards, achievements, events, pause, mute, fullscreen, keys inside the frame and threaded builds. Use when the person says integrate with OpenGame, add the SDK, show the player's name or OG, add a leaderboard or achievement, track events, fix fullscreen or keys in the game frame, or asks how a game talks to OpenGame.
|
|
4
4
|
metadata:
|
|
5
|
-
version: "1.0.
|
|
5
|
+
version: "1.0.10"
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# Integrate a game with OpenGame
|
|
@@ -190,7 +190,7 @@ og.track('wave_cleared', { level: 14, duration_ms: 81234 })
|
|
|
190
190
|
Event names are lowercase with underscores, up to 48
|
|
191
191
|
characters. Properties are limited to `level`, `mode`, `difficulty`, `score`, `duration_ms`, `result`, `step`, `board`, `fps`, `heap_mb`, `sample_rate` and
|
|
192
192
|
1,024 bytes per event, at most
|
|
193
|
-
|
|
193
|
+
600 events a minute; anything else is dropped
|
|
194
194
|
rather than sent, and `og.track` returns `unavailable` before `og.init()`. Events are batched and
|
|
195
195
|
flushed every 10 seconds and on page exit. Plays, sessions and play
|
|
196
196
|
time are measured by the page; do not track them yourself.
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
## Declare the board
|
|
4
4
|
|
|
5
5
|
Every board the game uses is declared in `opengame.json`, up to
|
|
6
|
-
|
|
6
|
+
25 of them:
|
|
7
7
|
|
|
8
8
|
```json
|
|
9
9
|
{ "leaderboards": [{ "key": "rounds", "order": "desc", "label": "Rounds survived", "min": 0, "max": 75 }] }
|
|
@@ -34,6 +34,16 @@ const nearby = await board.around() // entries around the pl
|
|
|
34
34
|
- `source` is always `game_reported`. Show it as the game's own scoreboard, never as a
|
|
35
35
|
verified result or a prize standing.
|
|
36
36
|
|
|
37
|
+
## The player's own stats
|
|
38
|
+
|
|
39
|
+
`og.player.stats()` reads the player's entry on every declared board in one request:
|
|
40
|
+
`value.boards` is `[{ board, label, keep, entry }]`, `entry` being `{ score, stats, tags,
|
|
41
|
+
meta, createdAt, imported }` or `null`. A career board answers the player's row for all
|
|
42
|
+
runs, so XP and levels can live on one: submit each match's XP as a run to a `runs` board,
|
|
43
|
+
feed a career board from it with `scoreAgg: "sum"`, and compute the level in the game from
|
|
44
|
+
the career `entry.score`. The request names no player or game (the session decides both),
|
|
45
|
+
it shares `me()`'s allowance, and the local mock reads career boards as empty.
|
|
46
|
+
|
|
37
47
|
## Columns, variants and runs
|
|
38
48
|
|
|
39
49
|
A board can declare stat `columns` beside its score, `variants` a run is tagged with, and
|
|
@@ -68,4 +68,4 @@ radio.onChange(state => render(state.playing, state.track))
|
|
|
68
68
|
searches up to 64 characters, `timeout` after
|
|
69
69
|
5 seconds.
|
|
70
70
|
- `not_found` for an unknown station, genre or song id; `invalid_request` for a bad argument.
|
|
71
|
-
-
|
|
71
|
+
- A game does not have to credit the music. `attribution` is there for a now-playing line.
|