Fix paragraph line order and remove red text effect on misses

- Fixed paragraph display: first typed line now correctly appears at bottom, matching the Star Wars text crawl effect
- Removed red text flash when typing incorrectly - only red laser effect remains for visual feedback
- Adjusted perspective factors to properly scale lines from bottom (largest) to top (smallest)
- Clean up: removed all 'wrong' state handling from both rendering and game logic
This commit is contained in:
2025-11-04 18:13:18 +00:00
parent 8d093f2c85
commit ca0f20c5ca
3 changed files with 131 additions and 75 deletions
+2 -9
View File
@@ -6,7 +6,7 @@ const LETTER_SPEEDS: Record<GameMode, number> = {
letters: 100,
words: 50,
sentences: 25,
paragraphs: 50,
paragraphs: 15, // Even slower for longer text
};
const SPAWN_INTERVAL = 1000; // ms between letter spawns
const MAX_ACTIVE_LETTERS = 1; // Only one letter on screen at a time
@@ -202,8 +202,7 @@ export function useGameStatus(onGameLoopTick?: (deltaTime: number, letters: Fall
currentLetter.letter = fullText[charIndex];
}
} else {
currentLetter.state = 'wrong';
currentLetter.stateStartTime = performance.now();
// Don't change the letter's visual state - only show red laser
setScore(prev => Math.max(0, prev - 1));
setMissed(prev => prev + 1);
@@ -226,12 +225,6 @@ export function useGameStatus(onGameLoopTick?: (deltaTime: number, letters: Fall
};
lasersRef.current.push(newLaser);
setTimeout(() => {
if (currentLetter.state === 'wrong') {
currentLetter.state = 'normal';
}
}, 200);
}
};