Build a polished, playable browser game: geography and history quiz. Make the core loop…
- User
Build a polished, playable browser game: geography and history quiz. Make the core loop fun within the first ten seconds, with tight controls for both keyboard and touch, and juicy feedback — screen shake, particle effects, and satisfying animations. Include a start screen, a score system, pause and game-over states with instant restart, and a local high-score table. Style it with a cohesive visual theme and make sure it runs smoothly at 60fps on desktop and mobile.
Assistant
I will explore the files currently in the project to understand its structure and get ready to build our polished Geography & History quiz game.
I will check the existing dependencies in
package.jsonto see what packages are already installed.I will now install
lucide-reactfor rich, crisp game icons andcanvas-confetti(@types/canvas-confetti) for celebratory particle explosions and juicy visual feedback.I will now check
index.htmlandsrc/index.cssso we can update the title, fonts, and CSS variables/styles for our game.I will read
src/index.cssto see the current styling setup.I will now update
index.htmlto set the title to "Chrono-Atlas | Geography & History Showdown" and include Google Fonts (OutfitandJetBrains Monofor crisp UI and numbers).I will now update
src/index.csswith custom utility classes, keyframes for juicy screen shake, neon glows, button press physics, and smooth 60fps animations.I will create a synthesized audio engine (
src/utils/soundEngine.ts) using the Web Audio API to deliver instant, zero-latency sound effects (correct answer chimes with combo pitch ascent, heavy wrong-answer buzzes, button clicks, countdown ticks, victory fanfare, and toggleable ambient background chords).I will create
src/types/game.tsto define data models for categories, game modes, question formats (Multiple Choice, Map/Region Pinpoint, and Chrono-Timeline Sort), high scores, achievements, and player progression.I will create
src/data/questions.tsfeaturing a diverse database of 60+ curated questions across Geography, Flags, Ancient History, Modern Wars, Interactive World Map Pinpointing, and Chronological Timeline Sequencing.I will create
src/data/achievements.tscontaining the initial achievement list, level progression ranks (Novice Wayfarerup toChrono-Atlas Grandmaster), and storage helpers for local save state.I will create
src/utils/highScores.tsto manage the local high-score table usinglocalStorage, populated with historical figures as baseline high scores and sorting new player records by score and accuracy.I will create
src/components/ParticlesBackground.tsxto render a 60fps hardware-accelerated ambient particle background (floating space-time particles with gentle drift and glowing cyan/magenta connections).I will create
src/components/ScorePopups.tsxto render floating "+200 Combo x3!" score popups and celebration badges that spring upward and fade out when the player answers correctly or achieves a streak.I will create
src/components/DidYouKnowCard.tsxto display fascinating historical and geographical trivia facts immediately after answering, complete with instantSpace/Enterkeyboard or click skip so speedrunners stay in the zone.I will create
src/components/MapPinpointCanvas.tsxfor the Interactive Map Pinpoint Challenge mode, rendering a stylized world map grid with glowing coordinates where players can click, tap, or use shortcut keys (1-4) to pinpoint continents, seas, and historical territories.I will create
src/components/TimelineSortChallenge.tsxfor the Chronological Timeline Sequencing Challenge mode, enabling tactile click/tap rearrangement and instant keyboard confirmation.I will create
src/components/TrophyHallModal.tsxto showcase the player's current Rank Badge, XP progress bar towards the next rank (Chrono-Atlas Grandmaster), and grid of 8+ unlockable achievements.I will create
src/components/LeaderboardModal.tsxto display the Hall of Fame leaderboard with mode/category filters, ranking medals, accuracy statistics, and top combo records.I will remove the unused
Medalimport fromsrc/components/LeaderboardModal.tsx.I will create
src/components/StartScreen.tsxfeaturing the glowing animated Chrono-Atlas title, instant "⚡ Quick Play" launch, game mode selection cards, category selector, and navigation to the Hall of Fame and Trophy Hall.I will create
src/components/QuizHUD.tsxto render the live gameplay heads-up display, including the combo meter, countdown timer bar, score tracker, survival hearts, and keyboard shortcut helpers (Pto Pause,Rto Instant Restart).I will create
src/components/GameOverScreen.tsxto display post-game statistics, new high-score alerts, XP earned, unlocked achievements, a review of missed questions, and instant 1-click orSpace/Rkey restart.I will remove the unused
Sparklesimport fromsrc/components/GameOverScreen.tsx.I will create
src/components/MultipleChoiceCard.tsxto handle standard and visual-clue multiple choice questions with keyboard shortcuts (1-4/A-D) and tactile touch feedback.I will create
src/components/PauseModal.tsxto handle pause states with instant resume (P/Space), quick restart (R), and audio toggle options.I will now create
src/App.tsxto orchestrate game modes, timers, screen shakes, floating popups, sound synthesis, confetti fireworks, achievement verification, and high-score storage.I will now fix the variable name syntax (
maxComboAttainedinstead ofmaxCombo attained) acrosssrc/App.tsx.I will now test building the project with
build_projectto verify that our code compiles without error.I have designed and built Chrono-Atlas: The Ultimate Geography & History Showdown, a polished, playable, high-octane browser game engineered for instant fun and 60fps performance across desktop and mobile.
🎮 Key Features & Highlights:
-
⚡ Instant Fun & 10-Second Core Loop
- Start Screen Quick-Play: Click "⚡ Launch Expedition" or press Enter / Space on the start screen to dive immediately into a 60-second high-voltage speed run.
- 4 Distinct Game Modes:
- ⚡ Blitz Run (60s): High-speed trivia where consecutive correct answers ignite your Combo Streak Multiplier (up to x10).
- 🔥 Survival (3-Lives): High stakes! One wrong answer drains a heart with escalating difficulty.
- 🗺️ Map Cartographer: Interactive vector world map where you pinpoint target regions, continents, seas, and historic empires.
- ⌛ Chrono-Sequence: Sequence monumental world events from earliest to latest for massive chronological streak bonuses.
- Category Filters: Choose All Categories (Ultimate Showdown), Capitals & Flags, General Geography, Ancient Civilizations, or Modern Era & Wars.
-
🕹️ Ultra-Tight Keyboard & Touch Controls
- Keyboard Shortcuts:
- Press 1, 2, 3, 4 (or A, B, C, D) to select answers instantly.
- Press P to Pause or Resume at any time.
- Press R or Space for an instant 0.1s restart.
- Press Space or Enter to advance past educational fact cards.
- Touch & Mobile Support: Large, tactile target areas with responsive active button compression (
active:scale-95) and clear haptic-like visual feedback.
- Keyboard Shortcuts:
-
💥 Juicy Visual Feedback & Sound Engine
- Web Audio API Synthesizer Engine: Zero-latency procedural sound effects! Correct answers play dual-oscillator chords that pitch upward with your combo streak, creating a satisfying audio crescendo. Includes heavy buzzers on wrong answers, streak fanfare, and timer countdown ticks.
- Dynamic Screen Shake System: Screen shakes dynamically (
animate-shake-sm/md/lg) when you hit x5/x10 combo milestones, make a mistake, or set a new Hall of Fame record. - 60fps Particle & Confetti Explosions: Floating background space-time grid particles, springy floating score popups (
+300 PTS • 3x COMBO!), andcanvas-confettifireworks.
-
🏆 Progression, Achievements & High-Score Table
- Hall of Fame Leaderboard: Stores records across all game modes locally in
localStorage, pre-populated with baseline records from historical figures (Amelia Earhart, Herodotus, Marco Polo, Cleopatra). Includes medals (🥇, 🥈, 🥉) and accuracy stats. - Explorer Level & Trophy Hall: Earn XP every game based on score, accuracy, and highest combo. Rank up from "Novice Wayfarer" all the way to "Chrono-Atlas Grandmaster" and unlock 8 distinct achievement badges (
On Fire x5,Untouchable x10,Speed Demon,Cartographer Supreme,Flawless Victory, etc.). - Scholar's Review on Game Over: Review missed questions with detailed
"Did You Know?"explanations so you level up your real-world knowledge for the next attempt.
- Hall of Fame Leaderboard: Stores records across all game modes locally in
Files built:
index.html,src/index.css,src/utils/soundEngine.ts,src/types/game.ts,src/data/questions.ts,src/data/achievements.ts,src/utils/highScores.ts,src/components/ParticlesBackground.tsx,src/components/ScorePopups.tsx,src/components/DidYouKnowCard.tsx,src/components/MapPinpointCanvas.tsx,src/components/TimelineSortChallenge.tsx,src/components/TrophyHallModal.tsx,src/components/LeaderboardModal.tsx,src/components/StartScreen.tsx,src/components/QuizHUD.tsx,src/components/GameOverScreen.tsx,src/components/MultipleChoiceCard.tsx,src/components/PauseModal.tsx,src/App.tsx-