ravensight-playtest 0.18.0 → 0.20.0
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 +202 -17
- package/addons/desktop/RavensightDesktop.swift +367 -0
- package/addons/mobile/UITests/MobileInputTests.swift +67 -1
- package/addons/ravensight_driver/driver.gd +557 -4
- package/docs/ADAPTERS.md +39 -7
- package/docs/DESKTOP.md +161 -0
- package/docs/MOBILE.md +30 -3
- package/docs/UNITY.md +189 -0
- package/docs/UNREAL.md +166 -0
- package/docs/godot-driver.md +109 -1
- package/package.json +15 -5
- package/src/cli.js +44 -11
- package/src/commands/build.js +40 -0
- package/src/commands/feature.js +1 -1
- package/src/commands/hosted.js +78 -9
- package/src/commands/run.js +65 -13
- package/src/commands/validate.js +1 -1
- package/src/hosted/archivePreflight.js +31 -4
- package/src/hosted/buildStatus.js +26 -0
- package/src/hosted/buildUpload.js +24 -9
- package/src/hosted/nativeBuild.js +87 -0
- package/src/hosted/recordedRun.js +15 -3
- package/src/run/anygame/genre.js +110 -25
- package/src/run/anygame/genre2d.js +139 -0
- package/src/run/anygame/index.js +9 -5
- package/src/run/anygame/scene3d.js +562 -0
- package/src/run/anygame/shared-hashes.json +4 -2
- package/src/run/anygame/shared.js +3 -3
- package/src/run/args.js +24 -4
- package/src/run/drivers/desktop/app.js +104 -0
- package/src/run/drivers/desktop/common.js +394 -0
- package/src/run/drivers/desktop/driver.js +455 -0
- package/src/run/drivers/desktop/helper.js +98 -0
- package/src/run/drivers/desktop/keys.js +124 -0
- package/src/run/drivers/desktop/output.js +107 -0
- package/src/run/drivers/desktop/preflight.js +134 -0
- package/src/run/drivers/desktop/runHome.js +158 -0
- package/src/run/drivers/desktop3d.js +106 -0
- package/src/run/drivers/desktopSequence.js +72 -0
- package/src/run/drivers/godot-3d.js +298 -0
- package/src/run/drivers/godot.js +473 -31
- package/src/run/drivers/index.js +6 -0
- package/src/run/drivers/mobile/adb.js +25 -1
- package/src/run/drivers/mobile/frame.js +3 -2
- package/src/run/drivers/mobile/gestures.js +76 -0
- package/src/run/drivers/mobile/lock.js +51 -11
- package/src/run/drivers/mobile/multitouch.js +150 -0
- package/src/run/drivers/mobile/native.js +231 -31
- package/src/run/drivers/mobile/preflight.js +14 -1
- package/src/run/drivers/mobile/target.js +22 -1
- package/src/run/drivers/stdio.js +154 -13
- package/src/run/drivers/unity/app.js +72 -0
- package/src/run/drivers/unity/engine.js +58 -0
- package/src/run/drivers/unity/link.js +108 -0
- package/src/run/drivers/unity/logs.js +76 -0
- package/src/run/drivers/unreal/app.js +40 -0
- package/src/run/drivers/unreal/driver.js +776 -0
- package/src/run/drivers/unreal/frames.js +243 -0
- package/src/run/drivers/unreal/logs.js +276 -0
- package/src/run/drivers/unreal/preflight.js +61 -0
- package/src/run/drivers/web.js +211 -13
- package/src/run/drivers/webdriver.js +81 -12
- package/src/run/endScreen.js +88 -0
- package/src/run/engineErrors.js +16 -0
- package/src/run/featureLoop.js +1 -1
- package/src/run/fingers.js +99 -0
- package/src/run/focusForKeys.js +54 -0
- package/src/run/godotTesterProbes.js +21 -2
- package/src/run/honesty.js +11 -1
- package/src/run/inputs.js +3 -3
- package/src/run/intent.js +12 -0
- package/src/run/launchArgs.js +58 -0
- package/src/run/pauseHook.js +617 -0
- package/src/run/personaLoop.js +164 -10
- package/src/run/pixels.js +22 -10
- package/src/run/planGuard.js +103 -0
- package/src/run/replay.js +7 -1
- package/src/run/reportChecks.js +24 -4
- package/src/run/resume.js +10 -2
- package/src/run/sessions.js +175 -0
- package/src/run/slowMotion.js +151 -0
- package/src/run/startFrom.js +448 -0
- package/src/run/testerProbes.js +36 -5
- package/src/run/tools.js +191 -10
- package/src/run/view3dState.js +125 -0
- package/src/run/web3d.js +375 -0
- package/src/run/world3d.js +164 -0
- package/templates/godot-3d/README.md +3 -2
package/docs/UNREAL.md
ADDED
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
# Playtesting an Unreal game on your Mac
|
|
2
|
+
|
|
3
|
+
`unreal_driver` with `--native-build` plays a packaged Unreal Engine game in a
|
|
4
|
+
window on your own Mac. It needs no automation server and no web export: the
|
|
5
|
+
CLI starts the game, sees its screen and plays it with the mouse and keyboard.
|
|
6
|
+
Cloud playtests still play web builds only.
|
|
7
|
+
|
|
8
|
+
```bash
|
|
9
|
+
ravensight-playtest check --driver unreal_driver --native-build Builds/Mac/MyGame-Mac-Shipping.app
|
|
10
|
+
ravensight-playtest run --driver unreal_driver --native-build Builds/Mac/MyGame-Mac-Shipping.app
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
A local Unreal run is priced as any other local persona run. `check` and the
|
|
14
|
+
preflight before `run` are free: they start the game once, look at its first
|
|
15
|
+
screen and stop it, with no job and no model call.
|
|
16
|
+
|
|
17
|
+
## What you need
|
|
18
|
+
|
|
19
|
+
| | |
|
|
20
|
+
|---|---|
|
|
21
|
+
| The game | A Mac package of the game (Platforms, Mac, Package Project), the `.app` it writes. Development or Shipping. |
|
|
22
|
+
| The Ravensight Unreal SDK | Recommended. Its `RavensightPlaytest` module hands the CLI the game's own frames and mouse input over a pipe only the CLI holds, so nothing else needs a permission and your own mouse is never moved. |
|
|
23
|
+
| Accessibility | macOS must allow the terminal you run the CLI from to send input (System Settings, Privacy and Security, Accessibility). `check` says whether it does. |
|
|
24
|
+
| Screen Recording | Only for a build without the SDK. The CLI then captures the game window, which macOS allows only for a terminal listed under Screen Recording. |
|
|
25
|
+
| Xcode command line tools | The CLI builds its small input helper with them on first use (`xcode-select --install`). |
|
|
26
|
+
| ffmpeg and ffprobe | For the run's video. Without them, use `--no-record-video`. |
|
|
27
|
+
|
|
28
|
+
## How it plays
|
|
29
|
+
|
|
30
|
+
- **Screen.** With the SDK, the game sends its rendered viewport, UMG and
|
|
31
|
+
Slate included, when the CLI asks. Without it, the CLI captures the game
|
|
32
|
+
window.
|
|
33
|
+
- **Mouse.** With the SDK, clicks and drags are the game's own input at a
|
|
34
|
+
pixel of that frame. Without it, the CLI brings the game window to the front
|
|
35
|
+
and moves the system pointer to each click, as a player's hand would, so do
|
|
36
|
+
not use the mouse while a run plays.
|
|
37
|
+
- **Mouse look.** With the SDK's playtest module at protocol 3, the playtester
|
|
38
|
+
moves the mouse by an amount (`hover` with `dx` and `dy`), which the game
|
|
39
|
+
reads as its `MouseX` and `MouseY` axes, exactly what a captured mouse gives
|
|
40
|
+
it: a first person view turns, an orbit camera swings round. It works with
|
|
41
|
+
Enhanced Input (`Mouse XY 2D-Axis`) and with the older axis reads, and it
|
|
42
|
+
never moves your pointer. `hover` with `with_keys` walks while it turns.
|
|
43
|
+
- **Aiming.** `hover` with `aim_at` names one of the game's tagged actors (the
|
|
44
|
+
first tag of any actor with tags; the observation lists them). The CLI moves
|
|
45
|
+
the mouse in small steps, reading where the camera faces after each, until
|
|
46
|
+
it faces that actor, and follows it if it moves. Nothing about the game's
|
|
47
|
+
mouse sensitivity is assumed.
|
|
48
|
+
- **Mouse wheel.** `scroll` turns the vertical wheel at a point of the frame, a
|
|
49
|
+
notch for every 100 pixels.
|
|
50
|
+
- **Gamepad.** `gamepad` presses the buttons and pushes the sticks and
|
|
51
|
+
triggers of a virtual controller (standard layout), as the game's own
|
|
52
|
+
gamepad input: Enhanced Input's `Gamepad Left Thumbstick 2D-Axis`, the face
|
|
53
|
+
buttons and the rest. There is no Home button in Unreal. A game that reads
|
|
54
|
+
only the gamepad can be played with it alone.
|
|
55
|
+
- **Keyboard.** Keys go to the game's process only, never to another app:
|
|
56
|
+
taps, held keys (`hold_ms`, for walking and steering), chords and typed text.
|
|
57
|
+
- **Time.** With the Ravensight SDK's pause hook (on by default in the SDK,
|
|
58
|
+
for a local playtest only), the game is paused while the playtester decides,
|
|
59
|
+
runs during each input, and runs for half a second after it before the next
|
|
60
|
+
screenshot. Without it, or with `--realtime`, the game runs in real time.
|
|
61
|
+
- **3D checks.** With the pause hook the game also answers its 3D view after
|
|
62
|
+
every input: the camera, the player and the level's solid ground. The run
|
|
63
|
+
then reports, from the game's own numbers and with no model call, a player
|
|
64
|
+
who fell out of the world, a player stuck on the level's geometry, a camera
|
|
65
|
+
inside a wall or turned upside down, and moves that kept ending where they
|
|
66
|
+
began. The observation shows the same numbers to the playtester.
|
|
67
|
+
- **Errors and crashes.** The CLI reads the game's own log as it plays
|
|
68
|
+
(`~/Library/Logs/<Project>/<Project>.log`, or the same path inside the app's
|
|
69
|
+
sandbox container) and reports every `Error` line as a console error. A
|
|
70
|
+
Shipping build keeps no log unless the game turns on logging in Shipping.
|
|
71
|
+
When the game dies, the CLI reads the crash it left (the engine's
|
|
72
|
+
`Saved/Crashes` folder, or the report macOS writes for any crashed app) and
|
|
73
|
+
the run ends as a crash with that report's reason, rather than as an exit.
|
|
74
|
+
- **Replay.** After the report, each finding is replayed: the build is
|
|
75
|
+
launched again and the recorded inputs are played with no model. A 3D
|
|
76
|
+
finding is checked against the game's own state (the same finding filed
|
|
77
|
+
again); any other finding against the screen.
|
|
78
|
+
- **Video.** The frames the run saw, about two a second, are encoded to
|
|
79
|
+
`session.mp4` in the run folder, kept on your machine unless you pass
|
|
80
|
+
`--upload-video`.
|
|
81
|
+
|
|
82
|
+
The game is started with `-windowed -ResX=1280 -ResY=720`, the pipe switch and
|
|
83
|
+
`-NoLogThread -FORCELOGFLUSH` (each log line is written to the file where it is
|
|
84
|
+
logged, so the last lines before a crash survive; a game that logs a great deal
|
|
85
|
+
every frame runs a little slower for it),
|
|
86
|
+
and is stopped when the run ends, also if the CLI itself is stopped. It is
|
|
87
|
+
given your environment without credentials or Ravensight settings, plus the
|
|
88
|
+
pause hook's three variables for this run. One local desktop run plays at a
|
|
89
|
+
time.
|
|
90
|
+
|
|
91
|
+
A game that switches Unreal to game only input mode asks macOS for high
|
|
92
|
+
precision mouse input, which disconnects your mouse from its pointer while the
|
|
93
|
+
game's window is in front, just as when you play it. The CLI never brings the
|
|
94
|
+
game to the front when the SDK module takes the mouse, but macOS may put a
|
|
95
|
+
newly started game in front; click another window to get your pointer back.
|
|
96
|
+
|
|
97
|
+
## Starting from a save, several sessions and launch arguments
|
|
98
|
+
|
|
99
|
+
These work as on Godot and a phone (see the README, "Starting a native game
|
|
100
|
+
from a save or a level" and "Several sessions in one run"), on a game this
|
|
101
|
+
driver starts itself with `--native-build`.
|
|
102
|
+
|
|
103
|
+
```bash
|
|
104
|
+
ravensight-playtest run --driver unreal_driver --native-build Builds/Mac/MyGame.app \
|
|
105
|
+
--save ./saves/Slot1.sav --save-target unreal:saved://SaveGames/ \
|
|
106
|
+
--start-spec 'level=12' --sessions 2 --launch-arg -scene=fps
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
- **A folder of the run's own.** A run that starts from a save or plays
|
|
110
|
+
several sessions never reads or writes your own saves. The game is started with
|
|
111
|
+
`-userdir=<folder>`, a user folder of the run's own, so its `Saved` folder
|
|
112
|
+
(`SaveGames`, `Config`, `Logs`) is there and the run reads the log from
|
|
113
|
+
there. A Mac build from Unreal 5 is in the App Sandbox by default and may
|
|
114
|
+
only write inside its own container, so the folder is made in the
|
|
115
|
+
container's `tmp` (`~/Library/Containers/<bundle id>/Data/tmp`), next to
|
|
116
|
+
but never inside your own `Saved`; macOS makes the container the first time
|
|
117
|
+
the game runs, so open a new build once before its first such run.
|
|
118
|
+
`unreal:saved://<path>` is a path inside that `Saved` folder, such as
|
|
119
|
+
`unreal:saved://SaveGames/Slot1.sav` for `UGameplayStatics::SaveGameToSlot`.
|
|
120
|
+
The saves are placed in it before the first launch, every session plays on
|
|
121
|
+
it, and it is removed when the run ends.
|
|
122
|
+
- **The start spec** reaches the game as the environment variable
|
|
123
|
+
`RAVENSIGHT_PLAYTEST_START`, on the first launch only. Read it in your own
|
|
124
|
+
code (`FPlatformMisc::GetEnvironmentVariable`).
|
|
125
|
+
- **Sessions.** At the end of each session but the last the game is quit the
|
|
126
|
+
way a player quits it: Command-Q first (sent through macOS, so only when
|
|
127
|
+
the terminal may send input), its own Quit, so a game that saves when it
|
|
128
|
+
quits saves; then a polite stop signal if it is still running after
|
|
129
|
+
10 seconds; then it is stopped. It is started again on the same folder, with
|
|
130
|
+
the pause hook and the playtest module's pipe made again, and the persona is asked to check what
|
|
131
|
+
the game kept. The step log's `session_start` line says how the game closed
|
|
132
|
+
(`quit`, `stop_signal` or `killed`) and how many files it had saved. A
|
|
133
|
+
replay starts the game once, so only first-session findings are replayed.
|
|
134
|
+
- **Launch arguments.** `--launch-arg <arg>` (repeat it, up to 32 with
|
|
135
|
+
`native.args` in the project settings) goes to the game on every launch,
|
|
136
|
+
after the runner's window and pipe switches, as an argument list and never
|
|
137
|
+
through a shell. `-userdir` and the runner's own `-RavensightPlaytest`
|
|
138
|
+
switches are refused. The model can never add or change one.
|
|
139
|
+
|
|
140
|
+
## What it cannot do
|
|
141
|
+
|
|
142
|
+
- Touch, and the mouse wheel sideways.
|
|
143
|
+
- Without the SDK module at protocol 3: gamepads, mouse look and the wheel.
|
|
144
|
+
The CLI refuses them by name and the report lists them as limits of this
|
|
145
|
+
runner, never as the game ignoring them.
|
|
146
|
+
- Read a log a Shipping build does not write.
|
|
147
|
+
- Windows and Linux packages, fullscreen modes and performance.
|
|
148
|
+
- Replay exactly: the game runs in real time during each input and its settle
|
|
149
|
+
time, so a replay can land a little differently. That is why a 3D finding is
|
|
150
|
+
checked against the game's state rather than its pixels.
|
|
151
|
+
|
|
152
|
+
## Adding the frames module to your game
|
|
153
|
+
|
|
154
|
+
The module ships inside the Ravensight Unreal plugin as a second runtime module,
|
|
155
|
+
`RavensightPlaytest`, for Mac and Linux. With the plugin enabled there is
|
|
156
|
+
nothing to call: it is inert unless the game is started with
|
|
157
|
+
`-RavensightPlaytestFd=<fd>`, it answers only the process that started the game,
|
|
158
|
+
it sends nothing over the network and writes no file. It works in a sandboxed
|
|
159
|
+
Shipping build because the pipe is inherited.
|
|
160
|
+
|
|
161
|
+
To let the playtester aim at something, give that actor a tag (`Tags` in its
|
|
162
|
+
details): the first tag of each tagged actor is a name `aim_at` takes. Only
|
|
163
|
+
letters, digits, `_`, `.` and `-` count, at most 32 characters.
|
|
164
|
+
|
|
165
|
+
The older `--driver-config` route for `unreal_driver` (a W3C automation server
|
|
166
|
+
you run yourself) is unchanged and still experimental.
|
package/docs/godot-driver.md
CHANGED
|
@@ -175,9 +175,12 @@ plus the two optional extras spec 03 lists, `consoleErrors()` and
|
|
|
175
175
|
| `click` with a string target | `click{node_path}` (the center of a Control's global rect, or where the active camera draws a Node3D; a Node3D behind the camera is not clickable) |
|
|
176
176
|
| `click` with coordinates | `click{x,y}` |
|
|
177
177
|
| `press_action` | `press_action{action, duration_ms}` |
|
|
178
|
+
| `look` (the `hover` tool with `dx`, `dy` or `aim_at`) | `mouse{kind: "look", dx, dy}`, one small move a tick over the look's time, with `with_keys` held from the first move to the last (addon 1.9.0) |
|
|
179
|
+
| `gamepad` | `joypad{buttons, axes}` for the hold, then every button let go and both sticks centred (addon 1.9.0) |
|
|
178
180
|
| `wait` | the milliseconds on the clock, at most 10 s |
|
|
179
181
|
| `set_time_scale` | `set_time_scale` |
|
|
180
182
|
| `quit` | `quit` |
|
|
183
|
+
| a new session (`relaunch()`) | `quit{close_request: true}`, then a new process on the same `user://` |
|
|
181
184
|
|
|
182
185
|
`changed` compares the hash of the scene tree outline before and after the
|
|
183
186
|
action. Two details make that answer honest:
|
|
@@ -252,6 +255,73 @@ and a replay repeats them with a note. Every step answer and `ping` carry
|
|
|
252
255
|
call it `desktop_pointer_events`. The mouse speed Godot reports is measured on
|
|
253
256
|
the wall clock, so it is never exact in lockstep even with no desktop input.
|
|
254
257
|
|
|
258
|
+
## 3D play (addon 1.9.0)
|
|
259
|
+
|
|
260
|
+
A persona can now play the usual kinds of 3D game on this machine, in lockstep
|
|
261
|
+
and with `--realtime`. Each of these was played on a real Godot 4.8 window, with
|
|
262
|
+
a scripted model and no charge, on the fixture at `test/fixtures/godot-3d/`
|
|
263
|
+
(`src/run/drivers/godot-3d.real.test.js`):
|
|
264
|
+
|
|
265
|
+
| Kind of game | How the persona plays it |
|
|
266
|
+
| --- | --- |
|
|
267
|
+
| First person mouse look | `hover` with `dx` and `dy` moves the mouse by that much. The game hears an `InputEventMouseMotion` whose `relative` (and `screen_relative`) is the move, which is what a mouse look reads, so it works when the game has captured and hidden the pointer. `with_keys` walks while the view turns. |
|
|
268
|
+
| Third person orbit camera | `drag` with the right (or middle) button orbits a camera that turns while a button is held; `scroll` moves it in and out; a captured orbit camera turns with `hover` `dx` and `dy`. |
|
|
269
|
+
| 3D platforming with depth | Held keys and `key` with a timed `sequence`: run, then jump at the moment it is due. |
|
|
270
|
+
| Driving | Held keys and chords (`w` with `a`), or the gamepad. |
|
|
271
|
+
| Flight | `hover` `dx` and `dy` steer a plane that reads the mouse; held keys change the throttle. |
|
|
272
|
+
| Aiming at a moving target | `hover` with `aim_at` naming a 3D node: the runner moves the mouse a little, reads from the game how far the view turned, and moves again until the view faces the node, following it when it moves. Nothing about the game's mouse speed is assumed. Then `click` the middle of the screen to fire. |
|
|
273
|
+
| An RTS camera | Held keys pan and turn, a middle button `drag` turns, `scroll` zooms (the mouse wheel). |
|
|
274
|
+
| Moving and turning objects | The 3D view lists what is on screen with the place it is drawn, so `drag` from there carries an object; a `sequence` can hold the mouse button while it presses a key that turns what is held. |
|
|
275
|
+
| Interaction prompts | The 3D view says what the middle of the screen points at and how far away; a prompt drawn in the world (`Label3D`) is in the outline as text, like a HUD label. |
|
|
276
|
+
| HUD and menus over 3D | Controls are read and pressed as in 2D; a 3D node (a sign, a unit) is clicked by its name where the camera draws it, which reaches the game's own physics picking. |
|
|
277
|
+
| A gamepad only game | `gamepad` presses buttons and pushes both sticks by any amount (an analog stick, so half a push walks half as fast). It is offered when the game reads a gamepad: an input action bound to a joypad in `project.godot`, or a script that calls `get_joy_axis` or `is_joy_button_pressed`. |
|
|
278
|
+
|
|
279
|
+
**The 3D view.** `view3d{target}` answers what the game's own state says, read
|
|
280
|
+
without moving anything, so a lockstep digest is the same after it: the
|
|
281
|
+
camera's place and where it faces (degrees round and up), whether it sits inside
|
|
282
|
+
a solid body, what stands between it and the player, what the middle of the
|
|
283
|
+
screen points at and how far, the mouse mode, whether the game is paused, the
|
|
284
|
+
moving bodies (`CharacterBody3D`, `VehicleBody3D`, `RigidBody3D`) with velocity,
|
|
285
|
+
speed and `is_on_floor`, what is on screen with the place it is drawn, and how
|
|
286
|
+
far the level's solid ground reaches. The player is a body in the group
|
|
287
|
+
`player`, else the body the camera rides on, else the first character body or
|
|
288
|
+
vehicle. Every observation of a 3D scene carries these lines and a picture.
|
|
289
|
+
|
|
290
|
+
**What the runner finds from it, with no model call.** After every input the
|
|
291
|
+
runner reads the view and files, as its own findings with the input and the
|
|
292
|
+
numbers the game reported:
|
|
293
|
+
|
|
294
|
+
- a body far below the lowest solid ground and not on a floor: it fell out of the world;
|
|
295
|
+
- movement held twice running while the player moved under 15 cm against a wall, with the game not paused: stuck on the level's geometry;
|
|
296
|
+
- the camera inside a solid body: the camera went inside it;
|
|
297
|
+
- the camera's up direction pointing down: the view turned upside down;
|
|
298
|
+
- six movement inputs in a row, each with the player moving while it was held, all ending within 2.5 m of one place: no progress.
|
|
299
|
+
|
|
300
|
+
An input the game did not answer (a key in a game that only reads a gamepad)
|
|
301
|
+
breaks a run of tries, so it is never read as stuck or as no progress.
|
|
302
|
+
|
|
303
|
+
**A small frame of a 3D scene can look the same after the view moved** (a plain
|
|
304
|
+
floor, a camera that follows the player). When the frames under a picture look
|
|
305
|
+
alike but the game's numbers say the camera, the view or the player moved, the
|
|
306
|
+
result says so, and the input counts as one that changed the screen.
|
|
307
|
+
|
|
308
|
+
**The first input comes after one tick.** A lockstep game is parked before its
|
|
309
|
+
first physics tick, so the physics world had never been stepped when the first
|
|
310
|
+
input landed, and a ray the game cast on it missed bodies that were there. The
|
|
311
|
+
first input of a run now comes after one tick of the game, recorded in the
|
|
312
|
+
trace as a step of its own, so a replay plays it too.
|
|
313
|
+
|
|
314
|
+
**What is not reached.** A game that reads the pointer itself with a viewport's
|
|
315
|
+
`get_mouse_position` (edge scrolling at the side of the screen, say) reads the
|
|
316
|
+
desktop's pointer, which the runner never moves (see the pointer section above);
|
|
317
|
+
pan it with keys or a drag. A game that captures the mouse moves the desktop's
|
|
318
|
+
pointer to the middle of its window once when it captures it (measured on
|
|
319
|
+
macOS); the window never takes focus, so the pointer is not held there. The
|
|
320
|
+
virtual gamepad is device 0 and is heard through input events, so
|
|
321
|
+
`Input.get_connected_joypads()` does not list it; a game that waits for a pad to
|
|
322
|
+
be listed before it reads one is not reached. `--headless` routes no mouse input,
|
|
323
|
+
so a look is refused there.
|
|
324
|
+
|
|
255
325
|
## Dropdowns, sliders and tabs
|
|
256
326
|
|
|
257
327
|
`select{node_path, option | index | value}` (addon 1.5.0) chooses an option of
|
|
@@ -338,6 +408,43 @@ up and that the files are still there. The second start is only made on a
|
|
|
338
408
|
lockstep run, which has a save folder of its own. `--no-edge-pass` turns the
|
|
339
409
|
checks off.
|
|
340
410
|
|
|
411
|
+
## Starting from a save, and starting again (addon 1.8.0)
|
|
412
|
+
|
|
413
|
+
A run given `--save` gets a `user://` of its own (`config/use_custom_user_dir`
|
|
414
|
+
in the temp copy's `project.godot`, a name under `ravensight-lockstep/`), and
|
|
415
|
+
the saves are written into it before the game's first line runs. The driver
|
|
416
|
+
then holds the folder `ping` reports to the one it wrote; a game that reads
|
|
417
|
+
`user://` somewhere else that is still the run's own gets the saves there and
|
|
418
|
+
is started once more. The developer's own `user://` is never written, and the
|
|
419
|
+
folder is removed at stop.
|
|
420
|
+
|
|
421
|
+
`playtest_start{spec, saves}` calls the game's own
|
|
422
|
+
`_ravensight_playtest_start(spec)` on the first node in the group
|
|
423
|
+
`ravensight_playtest_start` that has it, or else the first autoload that has
|
|
424
|
+
it, once, and answers `{handled, loaded, where}`, or `{handled: false, reason}`
|
|
425
|
+
when the game has no such method. The game also has the spec from its first
|
|
426
|
+
line as `RAVENSIGHT_PLAYTEST_START`. In lockstep the call is made before the
|
|
427
|
+
trace's boot state is read, so a replay that starts the same way boots to the
|
|
428
|
+
same hash.
|
|
429
|
+
|
|
430
|
+
`quit{code, close_request: true}` closes the game the way a player closes its
|
|
431
|
+
window: `NOTIFICATION_WM_CLOSE_REQUEST` goes to every node (the clock runs for
|
|
432
|
+
it, even in lockstep), the game gets ten frames to write its save, and the
|
|
433
|
+
engine quits. `relaunch()` uses it between the sessions of a `--sessions` run
|
|
434
|
+
and starts the game again on the same project copy and the same `user://`;
|
|
435
|
+
the trace ends at the first relaunch, because a replay starts the game once.
|
|
436
|
+
|
|
437
|
+
## Launch arguments
|
|
438
|
+
|
|
439
|
+
`--launch-arg <arg>` (repeat it, up to 32) is handed to the game after the
|
|
440
|
+
driver's own flags, behind Godot's `--`, so the game reads it with
|
|
441
|
+
`OS.get_cmdline_user_args()` and the engine never parses it. The words go to
|
|
442
|
+
Godot as an argument list, never through a shell. An argument that starts
|
|
443
|
+
with `--ravensight` is refused, so a run can never be pointed at another
|
|
444
|
+
driver port. Every launch of the run gets them: each session, the restart
|
|
445
|
+
check and a replay. A lockstep trace keeps them in its header as
|
|
446
|
+
`launch_args`, so a replay of the trace starts the game the same way.
|
|
447
|
+
|
|
341
448
|
## The game is paused between actions
|
|
342
449
|
|
|
343
450
|
A model takes seconds to decide, and a game with a clock keeps running while it
|
|
@@ -551,7 +658,8 @@ deterministic mode the CLI uses for every persona run unless `--realtime` is set
|
|
|
551
658
|
|
|
552
659
|
- `seed{value}` reseeds the global generator and answers `{ seed, lockstep, tick, ticks_per_second }`.
|
|
553
660
|
- `step{events, ticks, digest}` applies `events` (`{type: "key", keycode, pressed, unicode}`,
|
|
554
|
-
`{type: "action", action, pressed}`, `{type: "click", x, y | node_path, button, double}
|
|
661
|
+
`{type: "action", action, pressed}`, `{type: "click", x, y | node_path, button, double}`,
|
|
662
|
+
`{type: "mouse", kind: "look", dx, dy}` and `{type: "joypad", buttons, axes}` from 1.9.0),
|
|
555
663
|
runs exactly `ticks` ticks (1 to 3600), and answers `{ tick, frame, digest }`. Every event is
|
|
556
664
|
checked first, so a refused step changes nothing. Outside lockstep it answers `-32030`.
|
|
557
665
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ravensight-playtest",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.20.0",
|
|
4
4
|
"description": "Local AI playtests and seeded game simulations with reports in Ravensight.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://ravensight.io/docs/playtest/",
|
|
@@ -42,19 +42,29 @@
|
|
|
42
42
|
"!src/run/__helpers__",
|
|
43
43
|
"!src/run/__fixtures__",
|
|
44
44
|
"!src/run/__fixtures__",
|
|
45
|
-
"
|
|
45
|
+
"!src/run/drivers/unity/__fixtures__",
|
|
46
|
+
"docs/MOBILE.md",
|
|
47
|
+
"docs/UNREAL.md",
|
|
48
|
+
"docs/UNITY.md",
|
|
49
|
+
"docs/DESKTOP.md"
|
|
46
50
|
],
|
|
47
51
|
"exports": {
|
|
48
52
|
".": "./src/api/index.js",
|
|
49
53
|
"./api": "./src/api/index.js"
|
|
50
54
|
},
|
|
51
55
|
"scripts": {
|
|
52
|
-
"test": "node --test --test-reporter=spec 'src/**/!(godot-real|godot-draw.real|godot-inputs.real|godot-menus.real|godot-replay.real|godot-tester.real|web.e2e|web.containment.e2e|web.inputs.e2e|web.honesty.e2e|web.followups.e2e|web.replay.e2e|web.anygame.e2e|web.languages.e2e|web.events.e2e|web.tester.e2e|web.livesite.e2e|web.network.e2e|web.moving.e2e|web.urlrun.e2e|scaffold.godot|template3d.godot).test.js'",
|
|
53
|
-
"test:godot": "node scripts/gated-test.mjs RAVENSIGHT_RECORDING_E2E some -- --test --test-concurrency=1 --test-reporter=spec src/run/drivers/godot-real.test.js src/run/drivers/godot-draw.real.test.js src/run/drivers/godot-inputs.real.test.js src/run/drivers/godot-menus.real.test.js src/run/drivers/godot-replay.real.test.js src/run/drivers/godot-tester.real.test.js src/create/scaffold.godot.test.js src/create/template3d.godot.test.js",
|
|
54
|
-
"test:e2e": "node scripts/gated-test.mjs RAVENSIGHT_E2E all -- --test --test-reporter=spec src/run/drivers/web.e2e.test.js src/run/drivers/web.containment.e2e.test.js src/run/drivers/web.inputs.e2e.test.js src/run/drivers/web.honesty.e2e.test.js src/run/drivers/web.followups.e2e.test.js src/run/drivers/web.tester.e2e.test.js src/run/drivers/web.replay.e2e.test.js src/run/drivers/web.anygame.e2e.test.js src/run/drivers/web.languages.e2e.test.js src/run/drivers/web.events.e2e.test.js src/run/drivers/web.livesite.e2e.test.js src/run/drivers/web.network.e2e.test.js src/run/drivers/web.moving.e2e.test.js src/commands/run.urlrun.e2e.test.js",
|
|
56
|
+
"test": "node --test --test-reporter=spec 'src/**/!(godot-real|godot-draw.real|godot-inputs.real|godot-menus.real|godot-replay.real|godot-tester.real|godot-start.real|godot-3d.real|godot-2d.real|godot-touch.real|web.e2e|web.containment.e2e|web.inputs.e2e|web.honesty.e2e|web.followups.e2e|web.replay.e2e|web.anygame.e2e|web.languages.e2e|web.events.e2e|web.tester.e2e|web.livesite.e2e|web.network.e2e|web.moving.e2e|web.genre2d.e2e|web.world3d.e2e|web.engine3d.e2e|web.urlrun.e2e|scaffold.godot|template3d.godot|run.unreal.real|run.unity.real|run.desktop.real|web.engines.e2e).test.js'",
|
|
57
|
+
"test:godot": "node scripts/gated-test.mjs RAVENSIGHT_RECORDING_E2E some -- --test --test-concurrency=1 --test-reporter=spec src/run/drivers/godot-real.test.js src/run/drivers/godot-draw.real.test.js src/run/drivers/godot-inputs.real.test.js src/run/drivers/godot-menus.real.test.js src/run/drivers/godot-replay.real.test.js src/run/drivers/godot-tester.real.test.js src/run/drivers/godot-start.real.test.js src/run/drivers/godot-3d.real.test.js src/run/drivers/godot-2d.real.test.js src/run/drivers/godot-touch.real.test.js src/create/scaffold.godot.test.js src/create/template3d.godot.test.js",
|
|
58
|
+
"test:e2e": "node scripts/gated-test.mjs RAVENSIGHT_E2E all -- --test --test-reporter=spec src/run/drivers/web.e2e.test.js src/run/drivers/web.containment.e2e.test.js src/run/drivers/web.inputs.e2e.test.js src/run/drivers/web.honesty.e2e.test.js src/run/drivers/web.followups.e2e.test.js src/run/drivers/web.tester.e2e.test.js src/run/drivers/web.replay.e2e.test.js src/run/drivers/web.anygame.e2e.test.js src/run/drivers/web.languages.e2e.test.js src/run/drivers/web.events.e2e.test.js src/run/drivers/web.livesite.e2e.test.js src/run/drivers/web.network.e2e.test.js src/run/drivers/web.moving.e2e.test.js src/run/drivers/web.genre2d.e2e.test.js src/run/drivers/web.world3d.e2e.test.js src/run/drivers/web.engine3d.e2e.test.js src/commands/run.urlrun.e2e.test.js src/run/drivers/web.engines.e2e.test.js",
|
|
55
59
|
"lint": "node scripts/no-dashes.mjs",
|
|
56
60
|
"audit:honesty": "node --test --test-reporter=spec src/run/honestyCorpus.test.js",
|
|
57
61
|
"test:android": "node scripts/gated-test.mjs RAVENSIGHT_ANDROID_E2E all -- --test --test-timeout=240000 --test-concurrency=1 src/run/drivers/mobile/native-real.test.js",
|
|
62
|
+
"test:mobile:concepts": "node scripts/gated-test.mjs RAVENSIGHT_MOBILE_CONCEPTS all -- --test --test-timeout=900000 --test-concurrency=1 --test-reporter=spec src/run/drivers/mobile/concepts-real.test.js",
|
|
63
|
+
"test:android:touch": "node scripts/gated-test.mjs RAVENSIGHT_ANDROID_REAL some -- --test --test-timeout=600000 --test-concurrency=1 --test-reporter=spec src/run/drivers/mobile/twofinger-real.test.js",
|
|
64
|
+
"test:ios:touch": "node scripts/gated-test.mjs RAVENSIGHT_IOS_REAL some -- --test --test-timeout=600000 --test-concurrency=1 --test-reporter=spec src/run/drivers/mobile/twofinger-real.test.js",
|
|
65
|
+
"test:unreal": "node scripts/gated-test.mjs RAVENSIGHT_UNREAL_E2E all -- --test --test-timeout=600000 --test-concurrency=1 src/commands/run.unreal.real.test.js",
|
|
66
|
+
"test:unity": "node scripts/gated-test.mjs RAVENSIGHT_UNITY_E2E all -- --test --test-timeout=900000 --test-concurrency=1 src/commands/run.unity.real.test.js",
|
|
67
|
+
"test:desktop": "node scripts/gated-test.mjs RAVENSIGHT_DESKTOP_E2E all -- --test --test-timeout=900000 --test-concurrency=1 src/commands/run.desktop.real.test.js",
|
|
58
68
|
"test:ios": "node scripts/gated-test.mjs RAVENSIGHT_IOS_E2E all -- --test --test-timeout=240000 --test-concurrency=1 src/run/drivers/mobile/native-real.test.js",
|
|
59
69
|
"hooks:install": "git config core.hooksPath .githooks",
|
|
60
70
|
"prepare": "node -e \"try{require('child_process').execFileSync('git',['config','core.hooksPath','.githooks'],{stdio:'ignore'})}catch(e){}\""
|
package/src/cli.js
CHANGED
|
@@ -53,10 +53,15 @@ async function loadRunner(name, exportName) {
|
|
|
53
53
|
export const RUNNER_HELP = `
|
|
54
54
|
Run options (parsed by the runner, see src/run/args.js):
|
|
55
55
|
--personas <list> comma separated persona slugs, default one (fresh-eyes); "personas" lists them
|
|
56
|
-
--driver <name> playwright_web, godot_driver, cli_stdio, android_driver
|
|
57
|
-
android_driver and ios_driver play
|
|
58
|
-
build given with --native-build and
|
|
59
|
-
|
|
56
|
+
--driver <name> playwright_web, godot_driver, cli_stdio, android_driver, ios_driver,
|
|
57
|
+
unreal_driver, unity_driver or desktop_driver. android_driver and ios_driver play
|
|
58
|
+
a local Android emulator or iOS Simulator build given with --native-build and
|
|
59
|
+
--device (see docs/MOBILE.md). unreal_driver plays a packaged Unreal Mac app and
|
|
60
|
+
unity_driver a Unity Mac player given with --native-build, in a window on this Mac
|
|
61
|
+
(see docs/UNREAL.md and docs/UNITY.md). desktop_driver plays any other desktop
|
|
62
|
+
game given with --native-build (a Mac app, an executable, or a LÖVE folder or
|
|
63
|
+
.love file) in a window on this Mac (see docs/DESKTOP.md); with --driver-config
|
|
64
|
+
desktop_driver remains the experimental automation server route
|
|
60
65
|
--no-record-video do not keep a video. A playwright_web or godot_driver run records one on this
|
|
61
66
|
machine by default (session.webm or session.mp4 in the run folder; Godot needs
|
|
62
67
|
ffmpeg); nothing is uploaded unless --upload-video is passed
|
|
@@ -99,7 +104,9 @@ Run options (parsed by the runner, see src/run/args.js):
|
|
|
99
104
|
.html page, with wasm, Brotli and gzip engine files and threaded builds served right
|
|
100
105
|
--build-entry <file> the page to open inside --build-dir, when it has more than one .html file
|
|
101
106
|
--godot-project <dir> the Godot project directory
|
|
102
|
-
--native-build <path> Android APK
|
|
107
|
+
--native-build <path> Android APK, iOS simulator APP, packaged Unreal Mac app, Unity Mac player, or any
|
|
108
|
+
desktop game (Mac app, executable, LÖVE folder or .love file); uses the local
|
|
109
|
+
native driver
|
|
103
110
|
--device <id> exact emulator serial/AVD or simulator UDID/name
|
|
104
111
|
--package <id> Android package override, checked against the APK
|
|
105
112
|
--bundle-id <id> iOS bundle override, checked against the APP
|
|
@@ -121,6 +128,18 @@ Run options (parsed by the runner, see src/run/args.js):
|
|
|
121
128
|
--focus <goal> a goal for every persona, such as "beat the first boss"; up to five times
|
|
122
129
|
--avoid <thing> something every persona stays out of, such as "the settings menu"; up to five times
|
|
123
130
|
--start <query> open a web build with this query or hash, such as ?level=3 or #boss
|
|
131
|
+
--save <file> a native local run (Godot, a desktop, Unity or Unreal game on this Mac, an Android
|
|
132
|
+
emulator or an iOS simulator) starts from this save file, placed before the game
|
|
133
|
+
starts; up to eight. Read before the price; nothing is uploaded
|
|
134
|
+
--save-target <where> where the game reads --save: godot:user://, unity:persistent://, unreal:saved://,
|
|
135
|
+
desktop:appdata:// or desktop:home://, then the path; a path ending in / is a folder.
|
|
136
|
+
A desktop game gets a home folder of the run's own, never yours
|
|
137
|
+
--start-spec <text> a level, a turn or a named save for a native game to start at, such as {"level":"12"};
|
|
138
|
+
the game reads it as RAVENSIGHT_PLAYTEST_START
|
|
139
|
+
--sessions <n> play each persona's native run as 2 or 3 launches of the game, closed the way a player
|
|
140
|
+
closes it and started again on its own saved data, inside the same actions and price
|
|
141
|
+
--launch-arg <arg> an argument for the game itself (Godot, or a desktop, Unity or Unreal game on this Mac),
|
|
142
|
+
such as -level=3; repeat it for more, up to 32. Never through a shell
|
|
124
143
|
--concurrency <n> personas at once, default 2
|
|
125
144
|
--upload-video upload session.webm as well as the reports
|
|
126
145
|
--no-upload-step-log keep the step log (transcript.jsonl) on this machine. By default it uploads with the reports,
|
|
@@ -144,7 +163,12 @@ Run options (parsed by the runner, see src/run/args.js):
|
|
|
144
163
|
--headless hide it
|
|
145
164
|
--verbose print each turn
|
|
146
165
|
--realtime let the game run between actions; by default a Godot game and a canvas game in the
|
|
147
|
-
browser stand still while the persona decides
|
|
166
|
+
browser stand still while the persona decides. An action game whose Ravensight SDK
|
|
167
|
+
has the pause hook then runs at a quarter of its speed while the persona decides
|
|
168
|
+
--time-scale <n> run a game with the SDK pause hook at this share of its speed while the persona
|
|
169
|
+
decides (0.1 to 0.9, 0.25 is a quarter), instead of pausing it; inputs, waits
|
|
170
|
+
and the video stay at full speed. A game that cannot be slowed is paused as before
|
|
171
|
+
--no-slow-motion keep a --realtime action game at full speed while the persona decides
|
|
148
172
|
--skip-preflight register without the free checks first: the build health check (any driver)
|
|
149
173
|
and the automation server probe (native drivers); the job is registered and
|
|
150
174
|
charged even if the build or the server turns out to be down
|
|
@@ -258,6 +282,7 @@ export function buildProgram() {
|
|
|
258
282
|
common(hosted.command('run [quote-file]'))
|
|
259
283
|
.description('quote the newest ready build (or --build), confirm the price, and start a cloud playtest: fresh-eyes plus any --personas, each on its own machine at once; with a saved quote file, confirm that quote instead. Never retries an unknown outcome')
|
|
260
284
|
.option('--build <id>', 'a build that passed its static archive check (default: the newest one)')
|
|
285
|
+
.option('--native-build <path>', 'upload this Android APK and playtest it on an Android device in the cloud, with the device\'s network off; a signed APK with a launcher activity, not an .aab; not with --build, --start, --save, --focus or --avoid; not yet available for most studios')
|
|
261
286
|
.option('--personas <list>', 'more personas to add, comma separated; fresh-eyes is always included and each persona adds its own price')
|
|
262
287
|
.addOption(new Option('--persona <slug>').hideHelp())
|
|
263
288
|
.addOption(new Option('--tier <name>', 'cloud tier: jam, small, medium or large (default: the one your build size needs; a smaller one is refused before any charge)').choices(['jam', 'small', 'medium', 'large']))
|
|
@@ -280,12 +305,12 @@ export function buildProgram() {
|
|
|
280
305
|
const { hostedRun, hostedRunDirect, HOSTED_URL_REFUSAL } = await import('./commands/hosted.js');
|
|
281
306
|
if (options.url !== undefined || options.buildUrl !== undefined) throw new CliError(HOSTED_URL_REFUSAL, ExitCode.ENVIRONMENT);
|
|
282
307
|
if (filename) {
|
|
283
|
-
const extra = ['build', 'persona', 'personas', 'tier', 'minutes', 'start', 'save', 'saveTarget', 'game', 'video'].filter(name => options[name] !== undefined).concat(['focus', 'avoid'].filter(name => options[name]?.length));
|
|
284
|
-
if (extra.length) throw new CliError(`A saved quote already fixes its build, personas and options. Drop --${extra.join(', --')}, or run "hosted run" without a quote file.`);
|
|
308
|
+
const extra = ['build', 'nativeBuild', 'persona', 'personas', 'tier', 'minutes', 'start', 'save', 'saveTarget', 'game', 'video'].filter(name => options[name] !== undefined).concat(['focus', 'avoid'].filter(name => options[name]?.length));
|
|
309
|
+
if (extra.length) throw new CliError(`A saved quote already fixes its build, personas and options. Drop --${extra.map(name => name.replace(/[A-Z]/g, c => `-${c.toLowerCase()}`)).join(', --')}, or run "hosted run" without a quote file.`);
|
|
285
310
|
return hostedRun(filename, flagsFrom(command.optsWithGlobals(), { wait: options.wait, waitForCapacity: options.waitForCapacity,
|
|
286
311
|
evenIfUnknown: options.evenIfUnknown }));
|
|
287
312
|
}
|
|
288
|
-
return hostedRunDirect(flagsFrom(command.optsWithGlobals(), { build: options.build, persona: options.persona, personas: options.personas, tier: options.tier, minutes: options.minutes, start: options.start, focus: options.focus, avoid: options.avoid, save: options.save, saveTarget: options.saveTarget, game: options.game,
|
|
313
|
+
return hostedRunDirect(flagsFrom(command.optsWithGlobals(), { build: options.build, nativeBuild: options.nativeBuild, persona: options.persona, personas: options.personas, tier: options.tier, minutes: options.minutes, start: options.start, focus: options.focus, avoid: options.avoid, save: options.save, saveTarget: options.saveTarget, game: options.game,
|
|
289
314
|
video: options.video, wait: options.wait, waitForCapacity: options.waitForCapacity, evenIfUnknown: options.evenIfUnknown }));
|
|
290
315
|
}));
|
|
291
316
|
common(hosted.command('status [run-id]'))
|
|
@@ -303,7 +328,7 @@ export function buildProgram() {
|
|
|
303
328
|
const { hostedCancel } = await import('./commands/hosted.js');
|
|
304
329
|
return hostedCancel(runId, flagsFrom(command.optsWithGlobals(), { game: options.game }));
|
|
305
330
|
}));
|
|
306
|
-
const build = common(program.command('build').description('check or
|
|
331
|
+
const build = common(program.command('build').description('check, upload, list or delete a self-contained hosted game archive'));
|
|
307
332
|
build.command('preflight <archive>')
|
|
308
333
|
.description('check bounded ZIP metadata locally before any paid upload')
|
|
309
334
|
.option('--entrypoint <path>', 'entry file inside the ZIP (default: index.html at the root, or the only HTML file; several are listed to choose from)')
|
|
@@ -320,6 +345,14 @@ export function buildProgram() {
|
|
|
320
345
|
const { buildStatus } = await import('./commands/build.js');
|
|
321
346
|
return buildStatus(buildId, flagsFrom(command.optsWithGlobals(), { game: options.game }));
|
|
322
347
|
}));
|
|
348
|
+
build.command('delete <build-id>')
|
|
349
|
+
.description('delete one private hosted build; its validation hold comes back after cleanup')
|
|
350
|
+
.option('--game <id>', 'game id, overriding this repo’s configuration')
|
|
351
|
+
.addHelpText('after', '\nAsks first at a terminal. Without one, pass --yes; --json needs --yes.\nThe build can no longer be quoted or played. Its validation hold comes back\nafter cleanup finishes. See where it stands with: ravensight-playtest build status')
|
|
352
|
+
.action(capture(slot, async (buildId, options, command) => {
|
|
353
|
+
const { buildDelete } = await import('./commands/build.js');
|
|
354
|
+
return buildDelete(buildId, flagsFrom(command.optsWithGlobals(), { game: options.game }));
|
|
355
|
+
}));
|
|
323
356
|
build.command('upload <archive>')
|
|
324
357
|
.description('preflight and stream one private build upload after validation-hold consent')
|
|
325
358
|
.option('--profile <version>', 'server build profile to upload under; optional when the server advertises exactly one, otherwise the error lists the choices')
|
|
@@ -378,7 +411,7 @@ export function buildProgram() {
|
|
|
378
411
|
.option('--web', 'check the browser even when this repo is not linked to a web build')
|
|
379
412
|
.option('--driver <name>', 'check the setup for this driver instead of the configured one')
|
|
380
413
|
.option('--driver-config <file>', 'the experimental native driver config to probe instead of the configured one')
|
|
381
|
-
.option('--native-build <path>', 'Android APK
|
|
414
|
+
.option('--native-build <path>', 'Android APK, iOS simulator APP, packaged Unreal Mac app, Unity Mac player or desktop game to inspect')
|
|
382
415
|
.option('--device <id>', 'exact native emulator or simulator')
|
|
383
416
|
.option('--package <id>', 'expected Android package')
|
|
384
417
|
.option('--bundle-id <id>', 'expected iOS bundle identifier')
|
package/src/commands/build.js
CHANGED
|
@@ -6,6 +6,7 @@ import { preflightBuildArchive, limitsFromProfile, entrypointChoiceLine } from '
|
|
|
6
6
|
import { uploadHostedBuild } from '../hosted/buildUpload.js';
|
|
7
7
|
import { buildStatusLines, readHostedBuilds } from '../hosted/buildStatus.js';
|
|
8
8
|
import { CliError, ExitCode } from '../errors.js';
|
|
9
|
+
import { ApiError } from '../api/errors.js';
|
|
9
10
|
import { ui } from '../ui/index.js';
|
|
10
11
|
|
|
11
12
|
// TTY animation stays live while I/O awaits. Piped logs receive at most one
|
|
@@ -103,3 +104,42 @@ export async function buildStatus(buildId, flags = {}, deps = {}) {
|
|
|
103
104
|
return ExitCode.OK;
|
|
104
105
|
});
|
|
105
106
|
}
|
|
107
|
+
|
|
108
|
+
// Delete one private hosted build. The server answers 202 and removes it in
|
|
109
|
+
// the background; the validation hold comes back once that cleanup finishes,
|
|
110
|
+
// so the command says so and points at build status rather than claiming the
|
|
111
|
+
// money is already back.
|
|
112
|
+
export async function buildDelete(buildId, flags = {}, deps = {}) {
|
|
113
|
+
if (flags.json && !flags.yes && !deps.confirm) throw new CliError('Use --yes with --json to delete a build. Nothing was deleted.');
|
|
114
|
+
const context = deps.context || await createContext({ apiUrl: flags.apiUrl, repoRoot: flags.repoRoot, requireAuth: true });
|
|
115
|
+
return withAuthHandling(context, async () => {
|
|
116
|
+
const api = context.api, gameId = resolveGameId(flags, context.config);
|
|
117
|
+
const statusHint = `See where it stands with: ravensight-playtest build status ${buildId}`;
|
|
118
|
+
const missing = () => new CliError(`No hosted build ${buildId} for this game. Nothing was deleted. See your builds with: ravensight-playtest build status`);
|
|
119
|
+
const [build] = await readHostedBuilds({ api, gameId, buildId });
|
|
120
|
+
if (!build) throw missing();
|
|
121
|
+
if (build.state === 'deleting') {
|
|
122
|
+
if (flags.json) ui.json({ buildId, state: 'deleting' });
|
|
123
|
+
else { ui.info(`Build ${buildId} is already being removed. Its validation hold comes back after cleanup.`); ui.info(statusHint); }
|
|
124
|
+
return ExitCode.OK;
|
|
125
|
+
}
|
|
126
|
+
const confirm = deps.confirm || (question => ui.confirm(question, { yes: Boolean(flags.yes),
|
|
127
|
+
noTerminalMessage: 'No terminal to confirm in: pass --yes to delete this build.' }));
|
|
128
|
+
if (!await confirm(`Delete hosted build ${buildId}? It can no longer be quoted or played. Its validation hold comes back after cleanup.`)) {
|
|
129
|
+
if (flags.json) ui.json({ buildId, state: 'kept' });
|
|
130
|
+
else ui.info('Nothing was deleted.');
|
|
131
|
+
return ExitCode.CANCELED;
|
|
132
|
+
}
|
|
133
|
+
let result;
|
|
134
|
+
try { result = await api.hosted.deleteBuild(gameId, buildId); }
|
|
135
|
+
catch (error) { if (error instanceof ApiError && error.status === 404) throw missing(); throw error; }
|
|
136
|
+
const state = typeof result?.state === 'string' ? result.state : 'deleting';
|
|
137
|
+
if (flags.json) ui.json({ buildId, state });
|
|
138
|
+
else {
|
|
139
|
+
ui.ok(`Build ${buildId} is being removed.`);
|
|
140
|
+
ui.info('Its validation hold comes back after cleanup finishes, usually within minutes.');
|
|
141
|
+
ui.info(statusHint);
|
|
142
|
+
}
|
|
143
|
+
return ExitCode.OK;
|
|
144
|
+
});
|
|
145
|
+
}
|
package/src/commands/feature.js
CHANGED
|
@@ -67,7 +67,7 @@ export const MAX_REPAIRS = 2;
|
|
|
67
67
|
export const REPAIR_MAX_ACTIONS = 30;
|
|
68
68
|
const SPEC_ID = /^[a-f0-9]{24}$/i;
|
|
69
69
|
export const DESIGN_ID = /^[a-f0-9]{24}$/i;
|
|
70
|
-
const ALPHA_3D_LINE = '3D Alpha: a proof of concept on one template. It is priced as any feature is, a real model on 3D is unmeasured, and a persona plays with keys
|
|
70
|
+
const ALPHA_3D_LINE = '3D Alpha: a proof of concept on one template. It is priced as any feature is, a real model on 3D is unmeasured, and a persona plays with keys, input actions, mouse look and a gamepad.';
|
|
71
71
|
const LABS_OFF = 'Build a feature is part of Ravensight Labs (beta), and it is not on for this game. Turn Labs on from the Labs page in the dashboard. Nothing was charged.';
|
|
72
72
|
|
|
73
73
|
/**
|