Automate screenshots of QuakeWorld maps (mapshots) using FTE and Playwright
pnpx playwright install --with-deps chromium
pnpm install- Put
.bspmaps inpublic/maps - Rename
config.example.tstoconfig.ts - Rename
config.maps.example.tstoconfig.maps.ts - (optional) edit
config.ts
export default {
width: 1280,
height: 720,
jpegQuality: 90, // 1-100
skipExisting: true, // skip if screenshot already exist in /dist
};Camera position (first triplet) and angle (second triplet).
export default {
"2bfree": "1380 1067 468 25 194 0",
dm3: "1835 -342 18 19 128 0",
outpost: "0 0 480 90 91 -59",
};pnpm exec playwright testpnpm exec playwright test --grep "#dm2#"pnpm exec playwright test --grep "dm2"Playwrights compression is sub-optimal. Use mogrify from the imagemagik package for better compression.
mkdir -p dist/compressed
mogrify -format webp -quality 80 -path dist/compressed dist/*.jpgmkdir -p dist/compressed/thumbs
mogrify -format webp -thumbnail 640x360 -path dist/compressed/thumbs dist/*.jpg