From ce53d60ff16abbbf757cd49b59517682399705ff Mon Sep 17 00:00:00 2001 From: "Z. Cliffe Schreuders" Date: Sun, 30 Nov 2025 00:23:56 +0000 Subject: [PATCH] Reduce duration of failure and success messages in PasswordMinigame for improved user experience - Decreased the display time for various failure and success messages from 3000ms to 1000ms or 1500ms, enhancing responsiveness during gameplay. - Adjusted the cancellation message display time from 2000ms to 800ms for quicker feedback. --- .../js/minigames/password/password-minigame.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/public/break_escape/js/minigames/password/password-minigame.js b/public/break_escape/js/minigames/password/password-minigame.js index d69ce30..b5f4219 100644 --- a/public/break_escape/js/minigames/password/password-minigame.js +++ b/public/break_escape/js/minigames/password/password-minigame.js @@ -391,7 +391,7 @@ export class PasswordMinigame extends MinigameScene { console.log('Entered password:', enteredPassword); if (!enteredPassword) { - this.showFailure("Please enter a password", false, 2000); + this.showFailure("Please enter a password", false, 1000); return; } @@ -450,7 +450,7 @@ export class PasswordMinigame extends MinigameScene { } } catch (error) { console.error('Server validation error:', error); - this.showFailure("Network error. Please try again.", false, 3000); + this.showFailure("Network error. Please try again.", false, 1500); // Decrease attempts counter since this wasn't a real attempt this.gameData.attempts--; this.attemptsDisplay.textContent = this.gameData.attempts; @@ -459,7 +459,7 @@ export class PasswordMinigame extends MinigameScene { passwordCorrect() { this.cleanup(); - this.showSuccess("Password accepted! Access granted.", true, 3000); + this.showSuccess("Password accepted! Access granted.", true, 1000); // Set game result for the callback this.gameResult = { @@ -474,7 +474,7 @@ export class PasswordMinigame extends MinigameScene { if (this.gameData.attempts >= this.gameData.maxAttempts) { this.passwordFailed(); } else { - this.showFailure(`Incorrect password. ${this.gameData.maxAttempts - this.gameData.attempts} attempts remaining.`, false, 3000); + this.showFailure(`Incorrect password. ${this.gameData.maxAttempts - this.gameData.attempts} attempts remaining.`, false, 1500); // Clear the password field this.passwordField.value = ''; @@ -485,7 +485,7 @@ export class PasswordMinigame extends MinigameScene { passwordFailed() { this.cleanup(); - this.showFailure("Maximum attempts exceeded. Access denied.", true, 3000); + this.showFailure("Maximum attempts exceeded. Access denied.", true, 1500); this.gameResult = { success: false, @@ -496,7 +496,7 @@ export class PasswordMinigame extends MinigameScene { cancelPassword() { this.cleanup(); - this.showFailure("Password entry cancelled.", true, 2000); + this.showFailure("Password entry cancelled.", true, 800); this.gameResult = { success: false,