Sfondi veri di Piazza Colonna, Fortezza e Trebbio, aiuti del castello, Docker

Tre scene con aree calpestabili e punti cliccabili ricavati dagli sfondi,
tools/prepare_background.py per ridurli a 640x360, il castello del Trebbio
che dà indizi in base ai progressi, container nginx sulla porta 8080.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-23 00:32:32 +02:00
co-authored by Claude Opus 5.5
parent 826f5f99ec
commit a855b5805f
18 changed files with 325 additions and 94 deletions
+14 -5
View File
@@ -68,7 +68,7 @@ try {
if (verb === 'talk') await page.screenshot({ path: `${OUT}/03-dialogo.png` });
await settle(page);
if (target === 'cosa_luccicante') await page.screenshot({ path: `${OUT}/04-squama.png` });
if (target === 'verso_salita') await page.screenshot({ path: `${OUT}/05-salita.png` });
if (target === 'vicolo') await page.screenshot({ path: `${OUT}/05-fortezza.png` });
}
await page.waitForSelector('#ending:not([hidden])');
await page.screenshot({ path: `${OUT}/06-fine.png` });
@@ -78,24 +78,33 @@ try {
// Una partita a metà riprende da dove era rimasta.
await page.click('#restart');
await settle(page);
await clickScene(page, await hotspotCenter(page, 'verso_salita'));
await clickScene(page, await hotspotCenter(page, 'verso_trebbio'));
await settle(page);
await page.click('#verbs [data-verb="talk"]');
await clickScene(page, await hotspotCenter(page, 'torre'));
await page.locator('#choices li', { hasText: 'bloccato' }).click();
await page.waitForFunction(() => game.speech?.who === 'castello');
await page.waitForTimeout(100);
await page.screenshot({ path: `${OUT}/07-trebbio.png` });
await settle(page);
await page.locator('#choices li', { hasText: 'pace' }).click();
await settle(page);
await page.reload();
await page.waitForSelector('#continue:not([hidden])');
await page.click('#continue');
assert.equal(await page.evaluate(() => game.state.scene), 'salita');
assert.equal(await page.evaluate(() => game.state.scene), 'trebbio');
const phone = await open({ width: 390, height: 844 });
await phone.click('#new-game');
await settle(phone);
const overflow = await phone.evaluate(() => document.documentElement.scrollWidth > innerWidth);
assert.equal(overflow, false, 'scorrimento orizzontale su telefono');
await phone.screenshot({ path: `${OUT}/07-telefono.png` });
await phone.screenshot({ path: `${OUT}/08-telefono.png` });
const landscape = await open({ width: 844, height: 390 });
await landscape.click('#new-game');
await settle(landscape);
assert.equal(await landscape.evaluate(() => document.documentElement.scrollWidth > innerWidth), false);
await landscape.screenshot({ path: `${OUT}/08-orizzontale.png`, fullPage: true });
await landscape.screenshot({ path: `${OUT}/09-orizzontale.png`, fullPage: true });
assert.deepEqual(errors, [], 'errori nella console');
console.log(`Browser OK: soluzione completa, ripresa del salvataggio, telefono. Schermate in ${OUT}`);