ravensight-playtest 0.18.0 → 0.19.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 +160 -16
- 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 +37 -7
- package/docs/DESKTOP.md +117 -0
- package/docs/MOBILE.md +30 -3
- package/docs/UNITY.md +149 -0
- package/docs/UNREAL.md +123 -0
- package/docs/godot-driver.md +98 -1
- package/package.json +15 -5
- package/src/cli.js +26 -10
- 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 +47 -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 +98 -24
- package/src/run/anygame/genre2d.js +108 -0
- package/src/run/anygame/index.js +7 -4
- 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 +15 -4
- package/src/run/drivers/desktop/app.js +104 -0
- package/src/run/drivers/desktop/common.js +336 -0
- package/src/run/drivers/desktop/driver.js +383 -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/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 +465 -30
- 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 +229 -31
- package/src/run/drivers/mobile/preflight.js +14 -1
- package/src/run/drivers/mobile/target.js +21 -1
- package/src/run/drivers/stdio.js +150 -12
- 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 +686 -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 +79 -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/pauseHook.js +494 -0
- package/src/run/personaLoop.js +139 -10
- package/src/run/pixels.js +22 -10
- package/src/run/planGuard.js +103 -0
- package/src/run/replay.js +5 -1
- package/src/run/reportChecks.js +17 -4
- package/src/run/resume.js +6 -2
- package/src/run/sessions.js +170 -0
- package/src/run/startFrom.js +415 -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/ADAPTERS.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Connect a game to Ravensight Playtester
|
|
2
2
|
|
|
3
|
-
**What can be playtested:** web builds from any engine (`playwright_web`, on this machine or in the cloud), Godot projects on this machine (`godot_driver`), and, since 0.12.0, Android builds in a local Android emulator and iOS Simulator builds in the iOS Simulator on a Mac (`android_driver` or `ios_driver` with `--native-build`, see [MOBILE.md](MOBILE.md)). The cloud accepts web builds only. Physical devices
|
|
3
|
+
**What can be playtested:** web builds from any engine (`playwright_web`, on this machine or in the cloud), Godot projects on this machine (`godot_driver`), and, since 0.12.0, Android builds in a local Android emulator and iOS Simulator builds in the iOS Simulator on a Mac (`android_driver` or `ios_driver` with `--native-build`, see [MOBILE.md](MOBILE.md)), packaged Unreal games on a Mac (`unreal_driver` with `--native-build`, see [UNREAL.md](UNREAL.md)), Unity players on a Mac (`unity_driver` with `--native-build`, see [UNITY.md](UNITY.md)), and any other desktop game on a Mac, whatever engine made it (`desktop_driver` with `--native-build`: a Mac app, an executable, or a LÖVE folder or `.love` file, see [DESKTOP.md](DESKTOP.md)). The cloud accepts web builds only. Physical devices and desktop builds on Windows or Linux cannot be playtested: the W3C drivers below are experimental, each needs a separate automation server that you run yourself and that Ravensight does not provide, and none has been tested against a real automation server.
|
|
4
4
|
|
|
5
5
|
Run the CLI on the machine that can access your build. Sign in, link the project with `ravensight-playtest init --game <gameId>`, and complete its expectations brief. `run` quotes the existing persona price before registration. Adapters share the same prepaid job, action limits, model budget, cancellation, reports and uploads.
|
|
6
6
|
|
|
@@ -8,11 +8,12 @@ Run the CLI on the machine that can access your build. Sign in, link the project
|
|
|
8
8
|
| --- | --- | --- |
|
|
9
9
|
| `playwright_web` | Browser URL, including canvas/WebGL exports | Automated tests and live Jump Bunny gameplay |
|
|
10
10
|
| `godot_driver` | Godot project with the playtest addon | Existing addon protocol and runner tests |
|
|
11
|
-
| `desktop_driver` |
|
|
12
|
-
| `
|
|
11
|
+
| `desktop_driver` with `--native-build` | Any desktop game on this Mac: a Mac app, an executable, or a LÖVE folder or `.love` file | Real local runs of LÖVE and C++ (raylib) games in the CLI's suite; see [DESKTOP.md](DESKTOP.md) |
|
|
12
|
+
| `desktop_driver` with `--driver-config` | Local W3C/Appium session configuration | Experimental. Tested only against a stub; needs your own automation server |
|
|
13
|
+
| `unity_driver`, `unreal_driver` with `--driver-config` | Desktop exports through that same W3C interface (on a Mac, prefer `--native-build`, see [UNITY.md](UNITY.md) and [UNREAL.md](UNREAL.md)) | Experimental. Engine-neutral screen controls, not editor plugins; untested against a real automation server |
|
|
13
14
|
| `android_driver`, `ios_driver` with `--native-build` | An Android emulator APK or an iOS Simulator APP on this machine | Released in 0.12.0. Real emulator and simulator tests in the CLI's suite; see [MOBILE.md](MOBILE.md) |
|
|
14
15
|
| `android_driver`, `ios_driver` with `--driver-config` | Appium device/emulator/simulator configuration | Experimental. Tested only against a stub; untested on a real automation server, device or simulator |
|
|
15
|
-
| `cli_stdio` | Developer-owned JSON-RPC bridge | Real child-process protocol
|
|
16
|
+
| `cli_stdio` | Developer-owned JSON-RPC bridge, with optional held keys, mouse look and wheel | Real child-process protocol tests |
|
|
16
17
|
|
|
17
18
|
No adapter promises every game is autonomously solvable. Fast action games, unusual controls, anti-cheat, hardware access and protected platforms may require a game-specific bridge. Console tooling and authorization remain the developer's responsibility. The runner cannot bypass platform access restrictions.
|
|
18
19
|
|
|
@@ -51,7 +52,7 @@ ravensight-playtest run --driver android_driver --driver-config ./ravensight-dri
|
|
|
51
52
|
|
|
52
53
|
For iOS, use `ios_driver`, `platformName: iOS`, your XCUITest driver and a provisioned device or simulator. For desktop, use the capabilities required by your installed desktop driver. Unity/Unreal exports use `unity_driver`/`unreal_driver`; no engine source is uploaded by this configuration. Configuration files are local and should not contain provider credentials. Do not expose the automation server publicly.
|
|
53
54
|
|
|
54
|
-
The runner creates a W3C session, reads page source plus PNG screenshots, and executes bounded coordinate clicks, keys, text and single-pointer swipes. It releases input after each action and closes the session when done. One persona uses the device at a time. Native adapters currently capture screenshots, not video or engine logs. Browser navigation is unavailable on these adapters. Model-visible text is limited to 12,000 characters; responses are bounded to 8 MB and commands time out after 30 seconds.
|
|
55
|
+
The runner creates a W3C session, reads page source plus PNG screenshots, and executes bounded coordinate clicks, keys, text and single-pointer swipes. On the desktop adapters (`desktop_driver`, `unity_driver`, `unreal_driver`) it also sends what a 3D desktop game needs, through the same W3C actions: keys held for a time and held together (a chord, or walking with `w` and `a`), the mouse moved by an amount from where it is (mouse look, with keys held while it moves), the mouse wheel, a hover, and a drag or a click with the right or middle button, a double click and a held press. These are unit tested against a stub server only, like the rest of these adapters, and whether a game hears a relative mouse move depends on your automation server and on how the game reads the mouse. A desktop adapter cannot aim at a named thing (it does not know where the game's camera faces), has no gamepad (W3C WebDriver has none) and finds nothing from the game's 3D state: those need the game's own state, which today only the Godot driver reads. It releases input after each action and closes the session when done. One persona uses the device at a time. Native adapters currently capture screenshots, not video or engine logs. Browser navigation is unavailable on these adapters. Model-visible text is limited to 12,000 characters; responses are bounded to 8 MB and commands time out after 30 seconds.
|
|
55
56
|
|
|
56
57
|
## Custom bridge
|
|
57
58
|
|
|
@@ -68,17 +69,46 @@ Use this for text games or your own engine/hardware integration. `--driver-confi
|
|
|
68
69
|
The configured executable is trusted local code chosen by the developer. The model cannot change it. It runs without a shell. Standard output must contain newline-delimited JSON-RPC 2.0 responses. Put diagnostics on stderr. Respond with the request ID and `result`, or an `error`:
|
|
69
70
|
|
|
70
71
|
```json
|
|
71
|
-
{"jsonrpc":"2.0","id":1,"method":"launch","params":{"protocolVersion":1}}
|
|
72
|
+
{"jsonrpc":"2.0","id":1,"method":"launch","params":{"protocolVersion":1,"inputs":["hold","look","wheel"]}}
|
|
72
73
|
{"jsonrpc":"2.0","id":1,"result":{"ok":true}}
|
|
73
74
|
```
|
|
74
75
|
|
|
75
76
|
Required methods:
|
|
76
77
|
|
|
77
|
-
- `launch`: initialize/reset the game; return `{ "ok": true }`.
|
|
78
|
+
- `launch`: initialize/reset the game; return `{ "ok": true }`. The runner lists the extra inputs it can send in `inputs`; ignore it to keep the four basic inputs, or name the ones your bridge takes (see below).
|
|
78
79
|
- `observe`: return `{ "text": "visible state" }`, optionally `screenshotBase64` containing PNG data.
|
|
79
80
|
- `act`: accept a `kind` of `key`, `type`, `click` or `wait`; return `{ "ok": true }` after execution. Apply your own game-specific legality checks. Never interpret model text as shell code.
|
|
80
81
|
- `screenshot`: return `{ "pngBase64": "..." }`, or a JSON-RPC error if unavailable. Text-only games can still produce text reports without screenshots.
|
|
81
82
|
|
|
83
|
+
### Held keys, mouse look and the wheel (optional)
|
|
84
|
+
|
|
85
|
+
A 3D game, or any game played by holding keys, needs more than a tap. Since 0.19.0 the runner offers three more inputs in `launch`, and sends only the ones your bridge names back in its answer:
|
|
86
|
+
|
|
87
|
+
```json
|
|
88
|
+
{"jsonrpc":"2.0","id":1,"result":{"ok":true,"inputs":["hold","look","wheel"]}}
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
- `hold`: a key held for a time, and keys held together. The playtester can then walk, run, sprint and jump, or press a chord such as Shift+Tab. `act` gets `{ "kind": "key", "key": "w", "keys": ["w", "Shift"], "hold_ms": 800 }`: press every key in `keys` in that order, keep them all down for `hold_ms` milliseconds while the game runs, then let them go in reverse order. `key` is the key as the playtester wrote it (a chord keeps its `+`, such as `Shift+Tab`), and `keys` already has the chord split and any extra keys added, at most six. `hold_ms` is 0 to 5000; 0 is a tap of every key together. A single key tap is still `{ "kind": "key", "key": "Enter" }`, as before.
|
|
92
|
+
- `look`: the mouse moved by an amount from where it is, which is how a mouse turns a first or third person camera, steers or orbits a view, even when the game has captured and hidden the pointer. `act` gets `{ "kind": "look", "dx": 240, "dy": -40, "duration_ms": 300, "keys": ["w"] }`: move the mouse `dx` pixels right and `dy` pixels down (each at most 4000 either way), spread over `duration_ms` (0 to 5000), with every key in `keys` held from before the move until after it, to walk and turn at once. `keys` may be empty. The playtester reaches this through `hover` with `dx` and `dy`; a hover over a named thing, or aiming at a named thing, is refused as a limit of the runner.
|
|
93
|
+
- `wheel`: the mouse wheel. `act` gets `{ "kind": "wheel", "dx": 0, "dy": 360 }`, with `dy` down and `dx` right in pixels (about 120 a notch, at most 4000 either way), and, when the playtester named where the pointer is, either `x` and `y` in screenshot pixels or a `target` name. `modifier` is a key held while the wheel turns, such as `Control` for a zoom.
|
|
94
|
+
|
|
95
|
+
Answer `act` once the input is over: for a hold or a look, after the keys are up. Name only what your bridge really does, and treat every key name as data, never as code. The runner never sends an input your bridge did not name: a bridge that answers `launch` with `{ "ok": true }` and nothing more is played exactly as before, and the playtester is told it cannot hold keys or look. A bridge that names `look` or `wheel` may also be asked for a right, middle, double or held click; the runner refuses those itself, because the bridge's `click` is a plain left click.
|
|
96
|
+
|
|
82
97
|
Requests expire after 30 seconds. Oversized or malformed responses stop the bridge. The runner terminates its child when the session ends; the bridge must clean up any game processes it owns on termination. No custom protocol can establish compatibility with untested hardware by itself.
|
|
83
98
|
|
|
99
|
+
## Pausing the game between decisions (SDK pause hook)
|
|
100
|
+
|
|
101
|
+
A native game keeps running while the playtester decides what to do next. If the game includes a Ravensight SDK with the pause hook (the Godot SDK first, other engines as they gain it), the runner can freeze the game's clock while the playtester thinks, let it run for half a second after each input, and turn a `wait` into game time. Browser builds and the Godot driver already do this without the SDK.
|
|
102
|
+
|
|
103
|
+
Turn it on with `"pauseHook": true` in the driver or bridge config:
|
|
104
|
+
|
|
105
|
+
- `desktop_driver`, `unity_driver`, `unreal_driver`: the runner adds three variables (`RAVENSIGHT_PLAYTEST_CONTROL`, `RAVENSIGHT_PLAYTEST_TOKEN`, `RAVENSIGHT_PLAYTEST_RUN_ID`) to the `appium:environment` capability, keeping any you set. Your automation server must pass that environment to the game it starts.
|
|
106
|
+
- Custom bridge: the bridge process gets the three variables in its environment and passes them on to the game it starts.
|
|
107
|
+
|
|
108
|
+
The game connects back to the runner on this machine only (127.0.0.1), with a secret that changes on every launch. The hook does nothing in a player's build, because only the runner sets these variables. A pause always ends: the game resumes by itself after 30 seconds without word from the runner, and at once if the runner goes away. A game that does not connect is played exactly as without the setting. With `--realtime` the runner never pauses. The run log says whether the game was paused, and whether anything driven by real time (some menus and effects) kept moving while it was.
|
|
109
|
+
|
|
110
|
+
### 3D findings from the game's own view
|
|
111
|
+
|
|
112
|
+
A Unity or Unreal game whose Ravensight SDK has the pause hook also offers its 3D view on the same channel: where the camera is and faces, whether the camera is inside solid geometry, the player's place, velocity and footing, and how far the level reaches. A game on any other Ravensight SDK offers it once it registers a view provider (the SDK's README, "3D view for the playtest"). On `desktop_driver`, `unity_driver` and `unreal_driver` the runner reads it before the first input and after each one, and files the same findings as a Godot game, with no model call: the player fell out of the world, the player is stuck on the level's geometry, the camera went inside a wall or turned upside down, and moves that got nowhere. A `cli_stdio` bridge game with `"pauseHook": true` is read the same way. A key held for a time, or a look with keys held, counts as movement, as on the desktop adapters, so a bridge that names `hold` or `look` at launch gets every 3D finding, stuck and no progress included; a bridge that names neither sends only taps and gets the fall and camera findings. The view stays on this machine; only the findings join the report. A game that offers no view, or answers something malformed, gets no 3D findings. The game can switch the view off and keep the pause (`RavensightPlaytestView.Enabled = false` in Unity, `bView3dEnabled = false` in Unreal) or answer it itself (`RavensightPlaytestView.Provider`, `OnPlaytestView3d`).
|
|
113
|
+
|
|
84
114
|
Protocol references: [W3C WebDriver](https://www.w3.org/TR/webdriver/), [Appium capabilities](https://appium.io/docs/en/3.2/guides/caps/).
|
package/docs/DESKTOP.md
ADDED
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
# Playtesting any desktop game on your Mac
|
|
2
|
+
|
|
3
|
+
`desktop_driver` with `--native-build` plays a desktop game in a window on your
|
|
4
|
+
own Mac, whatever made it: LÖVE, Defold, GameMaker, C++, Odin, Flutter, a Unity
|
|
5
|
+
Mac player, or a plain program. It needs no automation server and no web
|
|
6
|
+
export: the CLI starts the game, sees its screen and plays it with the mouse
|
|
7
|
+
and keyboard. A packaged Unreal game and a Unity Mac player have their own
|
|
8
|
+
drivers with more inputs (`unreal_driver`, see [UNREAL.md](UNREAL.md), and
|
|
9
|
+
`unity_driver`, see [UNITY.md](UNITY.md)). Cloud playtests still play web
|
|
10
|
+
builds only.
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
ravensight-playtest check --driver desktop_driver --native-build Builds/MyGame.app
|
|
14
|
+
ravensight-playtest run --driver desktop_driver --native-build Builds/MyGame.app
|
|
15
|
+
ravensight-playtest run --driver desktop_driver --native-build ./my-love-game
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
A local desktop run is priced as any other local persona run. `check` and the
|
|
19
|
+
preflight before `run` are free: they start the game once, look at its first
|
|
20
|
+
screen and stop it, with no job and no model call.
|
|
21
|
+
|
|
22
|
+
## What you can pass
|
|
23
|
+
|
|
24
|
+
| `--native-build` | How it starts |
|
|
25
|
+
|---|---|
|
|
26
|
+
| A macOS app (`MyGame.app`) | Through macOS, as Finder opens it, so macOS lets it come to the front for clicks. |
|
|
27
|
+
| An executable file | Directly, from its own folder, with your arguments. |
|
|
28
|
+
| A LÖVE game folder (with `main.lua`) or a `.love` file | With LÖVE 11 from `/Applications/love.app`, `love` on your PATH, or `RAVENSIGHT_LOVE`. |
|
|
29
|
+
|
|
30
|
+
Arguments for the game go in the project settings as `native.args`, a list of
|
|
31
|
+
strings handed to it without a shell. The model can never change them.
|
|
32
|
+
|
|
33
|
+
## What you need
|
|
34
|
+
|
|
35
|
+
| | |
|
|
36
|
+
|---|---|
|
|
37
|
+
| 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. |
|
|
38
|
+
| The game's screen | Either the game sends its own frames through a Ravensight SDK with the pause hook (no permission needed, see below), or macOS allows the terminal to record the screen (Screen Recording) and the CLI captures the game window. `check` says which. |
|
|
39
|
+
| Xcode command line tools | The CLI builds its small input helper with them on first use (`xcode-select --install`). |
|
|
40
|
+
| ffmpeg and ffprobe | For the run's video. Without them, use `--no-record-video`. |
|
|
41
|
+
|
|
42
|
+
## The Ravensight SDK pause hook (recommended)
|
|
43
|
+
|
|
44
|
+
A game with a Ravensight SDK that has the pause hook gets three things on this
|
|
45
|
+
driver, each only while a playtest started it:
|
|
46
|
+
|
|
47
|
+
- **Its own frames.** The game sends what it drew over the hook's local
|
|
48
|
+
channel, so the terminal needs no Screen Recording permission and the
|
|
49
|
+
screenshots are exactly the game's picture. The LÖVE SDK sends frames by
|
|
50
|
+
default (`playtestFrames = false` turns them off); a Flutter game registers
|
|
51
|
+
the SDK's ready-made provider,
|
|
52
|
+
`Ravensight.setPlaytestFrameProvider(Ravensight.playtestViewFrames)`, which
|
|
53
|
+
sends the whole window; the C++ and Defold SDKs send them once the game
|
|
54
|
+
registers a frame provider of its own
|
|
55
|
+
(`PlaytestControl::set_frame_provider` or `set_deferred_frame_provider`;
|
|
56
|
+
`ravensight.setPlaytestFrameProvider`). Defold has no Lua call that reads
|
|
57
|
+
the rendered frame, so a Defold game needs a native extension that does, or
|
|
58
|
+
paints its own picture. Every SDK needs the game's time handler too.
|
|
59
|
+
- **Time.** The game is paused while the playtester decides, runs during each
|
|
60
|
+
input and for half a second after it, and a `wait` is game time. A game whose
|
|
61
|
+
SDK never connects plays in real time, and `--realtime` keeps it so.
|
|
62
|
+
- **3D checks.** A game that registers a 3D view provider answers its camera,
|
|
63
|
+
player and level bounds after every input, and the run files, from the
|
|
64
|
+
game's own numbers and with no model call, a player who fell out of the
|
|
65
|
+
world, a player stuck on the level's geometry, a camera inside a wall or
|
|
66
|
+
turned upside down, and moves that kept ending where they began.
|
|
67
|
+
|
|
68
|
+
## How it plays
|
|
69
|
+
|
|
70
|
+
- **Keyboard.** Keys go to the game's process only, never to another app:
|
|
71
|
+
taps, held keys (`hold_ms`, for walking and steering), chords and typed text.
|
|
72
|
+
The CLI brings the game forward first when macOS allows: an engine that
|
|
73
|
+
reads keys in its window (GLFW, so raylib) hears them only while it is in
|
|
74
|
+
front, while one that reads them app wide (SDL, so LÖVE) hears them wherever
|
|
75
|
+
its window is.
|
|
76
|
+
- **Mouse.** A click, a held or double click, a right or middle click and a
|
|
77
|
+
drag are your mouse's own input at that point: the CLI brings the game's
|
|
78
|
+
window to the front, checks that the game is the window on top there before
|
|
79
|
+
every press, move of a drag and release, and stops the whole gesture (letting
|
|
80
|
+
go of a held button) the moment something else is there. If something else stays on top the input is not sent and
|
|
81
|
+
the run says so. Do not use the mouse while a run plays.
|
|
82
|
+
- **Mouse look.** `hover` with `dx` and `dy` moves the mouse by that much,
|
|
83
|
+
with each move carrying its own amount, as a game that captures the pointer
|
|
84
|
+
(relative mouse mode) reads it; `with_keys` walks while it turns.
|
|
85
|
+
- **Hover and the wheel.** `hover` with `x` and `y` moves the pointer there;
|
|
86
|
+
`scroll` turns the wheel at a point, a notch for every 120 pixels.
|
|
87
|
+
- **Errors and crashes.** What the game prints on standard output and
|
|
88
|
+
standard error is read as it plays, and each error line (a Lua error, an
|
|
89
|
+
exception, a failed assertion, a panic, a Defold `ERROR:SCRIPT:` line, a
|
|
90
|
+
Flutter exception followed by its Dart stack) is a console error of the run.
|
|
91
|
+
A Defold bundle prints its Lua errors only in the debug variant. When
|
|
92
|
+
the game dies, the report macOS wrote for it says why, and the run ends as a
|
|
93
|
+
crash rather than as an exit. A game started through macOS is not the CLI's
|
|
94
|
+
own child, so its exit code is not known; a crash report still is.
|
|
95
|
+
- **Replay.** After the report, each finding is replayed by launching the
|
|
96
|
+
build again and playing the recorded inputs with no model.
|
|
97
|
+
- **Video.** The frames the run saw, about two a second, are encoded to
|
|
98
|
+
`session.mp4` in the run folder, kept on your machine unless you pass
|
|
99
|
+
`--upload-video`.
|
|
100
|
+
|
|
101
|
+
The game gets your environment without credentials or Ravensight settings,
|
|
102
|
+
plus the pause hook's three variables for this run, and is stopped when the
|
|
103
|
+
run ends, also if the CLI itself is stopped. One local desktop run plays at a
|
|
104
|
+
time.
|
|
105
|
+
|
|
106
|
+
## What it cannot do
|
|
107
|
+
|
|
108
|
+
- Touch, a gamepad, and aiming at a named thing (`hover` with `aim_at`): those
|
|
109
|
+
need an engine module like the Unreal SDK's. The CLI refuses them by name
|
|
110
|
+
and the report lists them as limits of this runner.
|
|
111
|
+
- A bare executable started directly may not be allowed to come to the front
|
|
112
|
+
while you are using another app, and then a click or a wheel turn cannot reach it,
|
|
113
|
+
nor keys for an engine that reads them in its window. Package the game as a
|
|
114
|
+
`.app` to avoid this.
|
|
115
|
+
- Windows and Linux builds, fullscreen modes and performance.
|
|
116
|
+
- Replay exactly: the game runs in real time during each input and its settle
|
|
117
|
+
time, so a replay can land a little differently.
|
package/docs/MOBILE.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Since 0.12.0, `ravensight-playtest` plays an Android build in a local Android emulator, or an iOS Simulator build in the iOS Simulator on a Mac. The persona sees the screen and plays with taps, double taps, long presses, straight drags and text, the same way it plays a web or Godot game. The game, the emulator and the video stay on this machine.
|
|
4
4
|
|
|
5
|
-
What it does not do: physical phones and tablets, App Store or device builds (`.ipa`),
|
|
5
|
+
What it does not do: physical phones and tablets, App Store or device builds (`.ipa`), and tilting on the iOS Simulator. A game whose Ravensight SDK has the pause hook for test devices (the Godot SDK today) is paused while the persona thinks and is checked for 3D problems from its own numbers; any other game runs in real time. Cloud playtests of an Android build are described in [Android in the cloud](#android-in-the-cloud); they are not available yet for most studios.
|
|
6
6
|
|
|
7
7
|
## Set up a test device
|
|
8
8
|
|
|
@@ -75,10 +75,24 @@ One run at a time uses a device: a run holds its device from the first check unt
|
|
|
75
75
|
|
|
76
76
|
- The game runs in real time, also while the playtester thinks. A short timer can run out before the next input arrives; a timer challenge it did not finish is not, by itself, a defect in the game. A finding or note that a game timer ran out, or left too little time, is moved out of the findings into a `[too_fast]` line under "What this run didn't cover", with how long the playtester took a turn, and `run` says what to add before the next run.
|
|
77
77
|
- Inputs use the coordinates of the screenshot the playtester was shown, with no crop. On Android the runner waits 700 milliseconds after an input before it captures the next screen.
|
|
78
|
-
- Taps, double taps, long presses
|
|
78
|
+
- Taps, double taps, long presses, straight drags, a pinch, two fingers at once (`touches`) and an on-screen stick (`stick`: one thumb pushed and held, with an optional second finger swiping on the right half to look) work on both platforms. Android text accepts printable ASCII without percent signs; iOS text goes to the focused keyboard. Held keys and drags with waypoints are refused as runner limits, never reported as defects in the game.
|
|
79
|
+
- `tilt` tips an Android emulator for a game that steers with the motion sensor: roll tips the right or left edge of the screen down, pitch tips the top edge away, for up to 5 seconds, then the device is level again. Before the game starts the emulator's sensor is set level in the run's orientation, and it is put back as it was when the run stops. The iOS Simulator has no motion sensor the runner can set, so a tilt there is refused as a runner limit.
|
|
80
|
+
- On iOS the input runner's two finger gesture also puts a finger that goes down later on its first point for an instant when the gesture starts; the input's detail says so, so a stray tap is never read as the game's.
|
|
79
81
|
- Android's system Back (`key Back`) works even when the game draws no Back button; it may close a layer, go back or leave the app. iOS has no system Back through this runner, so the playtester uses the game's own buttons.
|
|
80
82
|
- A screenshot the playtester asks for is the exact image the runner kept. Only identical pictures reuse an earlier file.
|
|
81
|
-
- A native run makes no claim about audio, sensors, purchases, notifications, performance on a real device or replaying a run exactly.
|
|
83
|
+
- A native run makes no claim about audio, sensors other than the emulator's tilt, purchases, notifications, performance on a real device or replaying a run exactly.
|
|
84
|
+
|
|
85
|
+
## Pausing the game and 3D findings
|
|
86
|
+
|
|
87
|
+
A game whose Ravensight SDK has the playtest pause hook for test devices (section 12 of the platform's pause hook contract; the Godot SDK today) is paused between the persona's inputs on an emulator or simulator, exactly as a desktop game is. Each input plays with the game running, then the game runs half a second of its own time and is paused for the next look; a `wait` is game time. A game without it is played in real time, as before.
|
|
88
|
+
|
|
89
|
+
- **The connection.** The runner listens on this machine's `127.0.0.1` and gives the game a one off address and secret. The iOS Simulator shares this Mac's network, so the app reaches it directly; the variables go to the app as its launch environment. An Android emulator has its own `127.0.0.1`, so the runner maps the port into the selected emulator with `adb reverse` for the run and removes it at the end, and the variables go as extras of the launch intent, sent to the emulator on adb's standard input so the secret never shows in a process list here. The game needs the INTERNET permission for the socket, which any game with the Ravensight SDK already has.
|
|
90
|
+
- **Never a phone.** The SDK starts the hook only on an emulator or the Simulator, from what the device itself reports (the emulator's model name, the Simulator's own environment), and the runner plays only emulators and simulators.
|
|
91
|
+
- **3D findings.** A game that offers its 3D view on the hook gets the same five 3D checks as a desktop game, from the game's own numbers: a player stuck on geometry, a fall out of the world, the camera inside a wall, the camera upside down, and moves that get nowhere. Holding the on-screen stick or tilting to steer counts as movement, and the view is also read while a tilt is still held. The findings join the report; the view itself stays on this machine.
|
|
92
|
+
- **Slow first frames.** A 3D game can take many seconds to draw its first frame on the iOS Simulator, which draws OpenGL ES in software. The hook takes over whenever the game says hello, so the first look may be a loading screen played in real time.
|
|
93
|
+
- **Sessions.** Only the first launch of a run is given the hook; a later session of the same run plays in real time.
|
|
94
|
+
|
|
95
|
+
The fixture games for all of this are in `test/fixtures/mobile-concepts` (Touch Board 2D and Thumb Yard 3D, Godot projects with seeded bugs, and `build.sh` to build them for both platforms), played by `npm run test:mobile:concepts`.
|
|
82
96
|
|
|
83
97
|
When the game exits, an iOS run looks for a crash report that matches the selected simulator, the app, its process and the time of the run, and keeps a short `native-crash.json` summary, never other diagnostics from your Mac. Without a matching report, on iOS or Android, the run says the cause is unknown.
|
|
84
98
|
|
|
@@ -105,3 +119,16 @@ The video is kept on this machine by default and uploaded only with `--upload-vi
|
|
|
105
119
|
The recorder captures only the selected simulator or emulator display, so a notification or permission dialog shown there can appear in your local evidence.
|
|
106
120
|
|
|
107
121
|
The runner does not mark your app's own analytics as a playtest. Use a test build with analytics turned off, or configure your app's Ravensight SDK to mark these sessions synthetic.
|
|
122
|
+
|
|
123
|
+
## Android in the cloud
|
|
124
|
+
|
|
125
|
+
Cloud Android playtests take `--native-build game.apk` on `hosted run`. Each persona plays the APK on an Android device in the cloud instead of on this machine:
|
|
126
|
+
|
|
127
|
+
```sh
|
|
128
|
+
ravensight-playtest hosted run --native-build ./game.apk --tier jam
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
- The build must be a signed APK with a launcher activity. A bundle (`.aab`) is refused: upload the installable `.apk` built from it.
|
|
132
|
+
- The device runs with its network off, so the game must play offline. `--start`, `--save` and `--save-target` are refused for an Android build; `--focus` and `--avoid` goals are taken. `--build` does not go with `--native-build`.
|
|
133
|
+
- The APK is uploaded as it is, under the usual $0.49 validation hold, and checked by the server before the price is quoted. A refused build shows the server's reason.
|
|
134
|
+
- The feature is not available yet for most studios. When it is not available for yours, the command says so before anything is uploaded or charged.
|
package/docs/UNITY.md
ADDED
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
# Playtesting a Unity game on your Mac
|
|
2
|
+
|
|
3
|
+
`unity_driver` with `--native-build` plays a macOS player of a Unity game in a
|
|
4
|
+
window on your own Mac, 2D or 3D. It needs no automation server and no web
|
|
5
|
+
export: the CLI starts the player, sees its screen and plays it. Cloud
|
|
6
|
+
playtests still play web builds only (a Unity WebGL build).
|
|
7
|
+
|
|
8
|
+
```bash
|
|
9
|
+
ravensight-playtest check --driver unity_driver --native-build Builds/Mac/MyGame.app
|
|
10
|
+
ravensight-playtest run --driver unity_driver --native-build Builds/Mac/MyGame.app
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
A local Unity 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 macOS player of the game (File, Build Profiles, macOS, Build), the `.app` it writes. Mono or IL2CPP, development or not. |
|
|
22
|
+
| The Ravensight Unity SDK | Recommended. Its `RavensightPlaytestFrames` hands the CLI the game's own frames, and with the Input System its own mouse, keyboard, gamepad and touch screen, over a loopback link only the CLI that started the game can open. Then nothing needs a macOS permission and your own mouse is never moved. |
|
|
23
|
+
| The Input System | For the game's own input. With Active Input Handling set to Input Manager (Old), Unity reads only what macOS delivers, so the CLI sends that game's mouse and keys through macOS (below). |
|
|
24
|
+
| Accessibility | Only when input goes through macOS: a build without the SDK, or a game on the old Input Manager. macOS must then allow the terminal you run the CLI from to send input (System Settings, Privacy and Security, Accessibility). `check` says whether it does. |
|
|
25
|
+
| 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. |
|
|
26
|
+
| Xcode command line tools | The CLI builds its small window and input helper with them on first use (`xcode-select --install`). |
|
|
27
|
+
| ffmpeg and ffprobe | For the run's video. Without them, use `--no-record-video`. |
|
|
28
|
+
|
|
29
|
+
`check` reads the build and says what it holds: the Unity version, whether the
|
|
30
|
+
Ravensight SDK and its Input System part are in it, and Mono or IL2CPP.
|
|
31
|
+
|
|
32
|
+
## How it plays
|
|
33
|
+
|
|
34
|
+
- **Screen.** With the SDK, the game sends the frame it rendered, UI
|
|
35
|
+
included, when the CLI asks. Without it, the CLI captures the game window.
|
|
36
|
+
- **Mouse.** With the SDK and the Input System, clicks, held clicks and drags
|
|
37
|
+
are the game's own mouse at a pixel of that frame: actions,
|
|
38
|
+
`Mouse.current` and the UI input module read them as any other mouse.
|
|
39
|
+
Otherwise the CLI brings the game window to the front and moves the system
|
|
40
|
+
pointer to each click, as a player's hand would, so do not use the mouse
|
|
41
|
+
while a run plays. Each press, release and drag step is sent only while
|
|
42
|
+
the game's window is the one on top at that point; if another window comes
|
|
43
|
+
over it, the input stops and any held button is let go. The CLI starts
|
|
44
|
+
the player the way Finder does (through macOS's app launcher), which is
|
|
45
|
+
the start macOS lets come to the front.
|
|
46
|
+
- **Keyboard.** With the SDK and the Input System, keys are the game's own
|
|
47
|
+
keyboard: taps, held keys (`hold_ms`, to walk and steer) and chords, and
|
|
48
|
+
nothing reaches another app. Otherwise keys go to the game's process
|
|
49
|
+
through macOS.
|
|
50
|
+
- **Typed text.** A uGUI or TextMesh Pro input field reads the text macOS
|
|
51
|
+
delivers, not the Input System's, so when macOS allows this terminal to
|
|
52
|
+
send input the CLI brings the game to the front and types through macOS,
|
|
53
|
+
which every field and both input systems read. Without that permission the
|
|
54
|
+
text is the game's own keyboard text (`Keyboard.onTextInput`), which a uGUI
|
|
55
|
+
field does not see.
|
|
56
|
+
- **Mouse look.** `hover` with `dx` and `dy` moves the game's own mouse by an
|
|
57
|
+
amount, which the game reads as `Mouse.current.delta` or a `<Mouse>/delta`
|
|
58
|
+
binding, exactly what a locked cursor gives it: a first person view turns.
|
|
59
|
+
`hover` with `with_keys` walks while it turns.
|
|
60
|
+
- **Aiming.** `hover` with `aim_at` names a tagged thing: the tag of any active
|
|
61
|
+
object other than Untagged, EditorOnly, MainCamera and Player (the
|
|
62
|
+
observation lists them). The CLI moves the mouse in small steps, reading
|
|
63
|
+
where the camera faces after each, until it faces that thing.
|
|
64
|
+
- **Mouse wheel.** `scroll` turns the vertical wheel at a point of the frame,
|
|
65
|
+
a notch for every 100 pixels.
|
|
66
|
+
- **Gamepad.** `gamepad` presses the buttons and pushes the sticks and
|
|
67
|
+
triggers of a virtual Input System gamepad (standard layout). It has no Home
|
|
68
|
+
button.
|
|
69
|
+
- **Touch.** `touches` puts one or two fingers on a virtual Input System touch
|
|
70
|
+
screen, each on its own path and clock, for a game that reads touch.
|
|
71
|
+
- **Time.** With the SDK's pause hook (on by default, for a local playtest
|
|
72
|
+
only), the game is paused while the playtester decides, runs during each
|
|
73
|
+
input, and runs for half a second after it before the next screenshot.
|
|
74
|
+
Without it, or with `--realtime`, the game runs in real time.
|
|
75
|
+
- **3D checks.** With the pause hook the game also answers its 3D view after
|
|
76
|
+
every input from `Camera.main` and the object tagged `Player`. The run then
|
|
77
|
+
reports, from the game's own numbers and with no model call, a player who
|
|
78
|
+
fell out of the world, a player stuck on the level's geometry, a camera
|
|
79
|
+
inside a wall or turned upside down, and moves that kept ending where they
|
|
80
|
+
began.
|
|
81
|
+
- **Errors and crashes.** The CLI reads the game's `Player.log`
|
|
82
|
+
(`~/Library/Logs/<Company>/<Product>/Player.log`, or the same path in the
|
|
83
|
+
app's sandbox container) as it plays and reports each logged error,
|
|
84
|
+
assertion and exception as a console error. Unity tells an error from any
|
|
85
|
+
other line by the stack trace it writes under it, which a player keeps for
|
|
86
|
+
errors and exceptions by default (Project Settings, Player, Stack Trace);
|
|
87
|
+
with those turned off, errors are not reported. When the game dies, the CLI
|
|
88
|
+
reads the report macOS wrote and the run ends as a crash with its reason.
|
|
89
|
+
- **Replay.** After the report, each finding is replayed: the build is
|
|
90
|
+
launched again and the recorded inputs are played with no model.
|
|
91
|
+
- **Video.** The frames the run saw, about two a second, are encoded to
|
|
92
|
+
`session.mp4` in the run folder, kept on your machine unless you pass
|
|
93
|
+
`--upload-video`.
|
|
94
|
+
|
|
95
|
+
The game is started with `-screen-fullscreen 0 -screen-width 1280
|
|
96
|
+
-screen-height 720`, so it opens in a window of that size whatever it
|
|
97
|
+
remembers, and is stopped when the run ends, also if the CLI itself is
|
|
98
|
+
stopped. It is given your environment without credentials or Ravensight
|
|
99
|
+
settings, plus the pause hook's three variables and
|
|
100
|
+
`RAVENSIGHT_PLAYTEST_FRAMES` for this run, in its environment only: neither
|
|
101
|
+
secret is ever on its command line. One local desktop run plays at a time.
|
|
102
|
+
|
|
103
|
+
## The input systems
|
|
104
|
+
|
|
105
|
+
The SDK's hello names the input systems the player settings turn on, and the
|
|
106
|
+
CLI follows it:
|
|
107
|
+
|
|
108
|
+
| Active Input Handling | Mouse and keys | Look, wheel, gamepad, touch |
|
|
109
|
+
|---|---|---|
|
|
110
|
+
| Input System Package (New) | the game's own devices | the game's own devices |
|
|
111
|
+
| Both | through macOS, which both systems read | the game's own devices, which only the Input System reads (the report says so) |
|
|
112
|
+
| Input Manager (Old) | through macOS | not available: macOS has no gamepad or touch to send, and the old Input Manager takes nothing else |
|
|
113
|
+
|
|
114
|
+
A game on the old Input Manager plays like a build without the SDK, except
|
|
115
|
+
that its frames still come from the game. Moving it to the Input System (or
|
|
116
|
+
Both) is what gives it the rest.
|
|
117
|
+
|
|
118
|
+
## What it cannot do
|
|
119
|
+
|
|
120
|
+
- Windows and Linux players, fullscreen modes and performance.
|
|
121
|
+
- Without the SDK: gamepads, touch, mouse look and the wheel. The CLI refuses
|
|
122
|
+
them by name and the report lists them as limits of this runner, never as
|
|
123
|
+
the game ignoring them.
|
|
124
|
+
- A gamepad's Home button, and the mouse wheel sideways.
|
|
125
|
+
- Errors in a log without stack traces for errors.
|
|
126
|
+
- Replay exactly: the game runs in real time during each input and its settle
|
|
127
|
+
time, so a replay can land a little differently.
|
|
128
|
+
|
|
129
|
+
## Adding the SDK to your game
|
|
130
|
+
|
|
131
|
+
Add the Ravensight Unity SDK package (its README covers the install). There is
|
|
132
|
+
nothing to call: `RavensightPlaytestFrames` installs itself after the first
|
|
133
|
+
scene loads and stays inert unless the CLI started the game with
|
|
134
|
+
`RAVENSIGHT_PLAYTEST_FRAMES`. It answers only the process that proves it
|
|
135
|
+
started the game, sends nothing over the network but that loopback link, and
|
|
136
|
+
writes no file. While it runs, the game keeps running when its window is not
|
|
137
|
+
in front, and the Input System keeps its devices on when the window loses
|
|
138
|
+
focus; both come back when the run ends. The Input System part compiles only
|
|
139
|
+
when the project has the Input System package.
|
|
140
|
+
|
|
141
|
+
The older `--driver-config` route for `unity_driver` (a W3C automation server
|
|
142
|
+
you run yourself) is unchanged and still experimental.
|
|
143
|
+
|
|
144
|
+
## Web builds
|
|
145
|
+
|
|
146
|
+
A Unity WebGL build is played by `playwright_web` like any web game, locally or
|
|
147
|
+
in the cloud. With the SDK, a WebGL build on a playtest page publishes the same
|
|
148
|
+
3D view on the page (`window.__ravensightView3d`), so a web run's 3D findings
|
|
149
|
+
can rest on the game's own numbers too.
|
package/docs/UNREAL.md
ADDED
|
@@ -0,0 +1,123 @@
|
|
|
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
|
+
## What it cannot do
|
|
98
|
+
|
|
99
|
+
- Touch, and the mouse wheel sideways.
|
|
100
|
+
- Without the SDK module at protocol 3: gamepads, mouse look and the wheel.
|
|
101
|
+
The CLI refuses them by name and the report lists them as limits of this
|
|
102
|
+
runner, never as the game ignoring them.
|
|
103
|
+
- Read a log a Shipping build does not write.
|
|
104
|
+
- Windows and Linux packages, fullscreen modes and performance.
|
|
105
|
+
- Replay exactly: the game runs in real time during each input and its settle
|
|
106
|
+
time, so a replay can land a little differently. That is why a 3D finding is
|
|
107
|
+
checked against the game's state rather than its pixels.
|
|
108
|
+
|
|
109
|
+
## Adding the frames module to your game
|
|
110
|
+
|
|
111
|
+
The module ships inside the Ravensight Unreal plugin as a second runtime module,
|
|
112
|
+
`RavensightPlaytest`, for Mac and Linux. With the plugin enabled there is
|
|
113
|
+
nothing to call: it is inert unless the game is started with
|
|
114
|
+
`-RavensightPlaytestFd=<fd>`, it answers only the process that started the game,
|
|
115
|
+
it sends nothing over the network and writes no file. It works in a sandboxed
|
|
116
|
+
Shipping build because the pipe is inherited.
|
|
117
|
+
|
|
118
|
+
To let the playtester aim at something, give that actor a tag (`Tags` in its
|
|
119
|
+
details): the first tag of each tagged actor is a name `aim_at` takes. Only
|
|
120
|
+
letters, digits, `_`, `.` and `-` count, at most 32 characters.
|
|
121
|
+
|
|
122
|
+
The older `--driver-config` route for `unreal_driver` (a W3C automation server
|
|
123
|
+
you run yourself) is unchanged and still experimental.
|