Settings & screen
The player's Settings window, the screen ratio and its bars, and the image viewer.
Settings
Per device, separate from save slots, in the settings window, grouped in tabs: General (language, screen ratio, hide idle mouse, fullscreen, dev panel, erase all data), Text (text size, font, text box opacity, text speed, auto-play pause, skip options, reduce shaking and flashes, read text aloud), Audio (master/music/sfx/voice/movies, voices play to the end, lower music under voices, voice language when the game has more than one), Voices (a portrait per voiced character; pick one, then its volume slider and mute button; below them the system voice picker when a character has system voice clips; hidden when no character has a voice, see Voices) and Controls (a picture of the keyboard or controller: press a key / button, then pick what it does; see Input). General also has Vibration, shown only while the player uses a controller or a touch screen that can buzz (keyboards do not vibrate). Controls is hidden while the player uses touch, and comes back on the first key or button press. See Saves & settings.
The choices and defaults for the reading options are in src/content/scenes.ts:
text: {
sizes: [0.85, 1, 1.15, 1.3, 1.5], // Text size
defaultSize: 1,
fonts: { // Font: the first is the default
game: { name: 'Game font' },
sans: { name: 'Plain (easy to read)', family: 'Verdana, sans-serif' },
},
defaultBoxOpacity: 1,
logLines: 200,
},
comfort: { reduceMotionByDefault: 'system', reducedFlash: 0.25 },
rumble: { onShake: true, strength: 0.6 },
- Font changes the whole UI. Your own font files go in
src/content/fonts/and join this list by themselves (unless they arefallbackorinternal);playerPicksFont: falseinscenes.tstexthides the row: see Fonts. - Read text aloud uses the device's speech: lines without a voice clip, choices, and the focused button. The switch only shows where the device can speak (not in the Android app yet).
- Vibration:
game.input.rumble({ strength: 0.8, duration: 200 })shakes the controller in use, or buzzes a phone.
Your own settings
The game's own settings go in src/content/settings.ts, each with its default (its type comes from it). They are kept per device like the engine's, erased with Erase all data, and a setting added later gets its default for players who already have settings saved.
// src/content/settings.ts
export default defineSettings({
bigCursor: false,
hints: 'on' as 'on' | 'off', // a few choices
brightness: 0.5,
})
game.settings.get('hints') // 'on'
game.settings.set('hints', 'off')
const hints = useGameSetting('hints') // React (from '@/core/managers/gameSettings')
A row for one in the Settings window (src/content/windows/settings/), with the helpers from parts.tsx:
<SettingSwitch gameSetting="bigCursor" label={t('Big cursor')} />
<SettingSelect label={t('Hints')} value={useGameSetting('hints')} onChange={putGame('hints')}
options={[{ value: 'on', label: t('On') }, { value: 'off', label: t('Off') }]} />
<SettingSlider label={t('Brightness')} value={useGameSetting('brightness')} onChange={putGame('brightness')} /> // 0..1, shown as %
Screen ratio
The game runs in one box, #game-screen, 16:9 by default, with pure black bars around it. Players pick 16:9, 16:10, 4:3, 21:9 or "Fill screen" in Settings → General (settings.screenRatio).
The choices, default, bar colour, "short screen" height, the map zoom and the image viewer's zoom limit and speeds are set in src/content/config/screen.ts:
export default defineScreen({
ratios: ['16:9', '16:10', '4:3', '21:9', 'fill'],
defaultRatio: '16:9',
barColor: '#000',
shortHeight: 520,
landscapeOnly: true, // phones held upright see "turn your device" instead of the game
cursorAutoHide: [0, 10, 5], // seconds, 0 = never
defaultCursorAutoHide: 0,
map: { tilesHigh: 12, textHeight: 720, pixelPerfect: false }, // see Maps → Zoom
imageViewer: { maxZoom: 4, zoomPerSecond: 2.5, panSpeed: 900, doubleTapZoom: 2.5, background: '#000' },
})
- The game is landscape only on phones: the Android app turns between the two sideways positions and never upright (
screenOrientation="sensorLandscape"inAndroidManifest.xml); in a browser an upright phone shows a “turn your device” screen (landscapeOnly). - Size UI to the box, not the browser window:
100cqw/100cqhinstead of100vw/100dvh. - For compact layouts on short screens use the
SHORT_SCREENsx key (game screen 520px tall or less), not a height@mediaquery. - A full-screen overlay outside the layers? Portal it into
gameScreen()(both fromsrc/core/layers/screen.ts).
sx={{ maxHeight: 'calc(100cqh - 32px)', [SHORT_SCREEN]: { p: 0.5 } }}
Image viewer
<ImageViewer pictures start? caption onClose /> (src/core/ui/ImageViewer.tsx) shows pictures over the whole game screen with zoom and pan. The Extras gallery uses it. Each picture is { layers: [url, …], locked? } (layers stack, bottom first); with more than one, dots show which is on screen.
- Mouse: scroll to zoom, drag to pan, double-click to zoom in/out. Touch: pinch, drag, double-tap.
- Pad / keyboard: hold A (confirm) to zoom in up to
maxZoom, d-pad, stick or arrows to pan, hold B (cancel) to zoom back out. Once fully out, release and press B again to close. - Switching pictures: left/right while not zoomed in (zoomed in they pan), shoulder buttons / tab keys at any zoom, swipe, or tap a dot. Locked pictures are skipped.