I am going to explore the project directory to understand its current structure.
I will check the existing dependencies in package.json.
I will now install lucide-react to provide icons for our tactical warfare game UI.
I will inspect index.html to update the game title and ensure proper viewport settings.
I will now update index.html to set the game title, add premium Google Fonts ('Russo One' and 'Inter') for an authentic warfare aesthetic, and prevent unwanted mobile scrolling/pinch-zoom.
I will inspect src/index.css to make sure it includes Tailwind properly and configure custom scrollbars or game utility animations.
I will now enrich src/index.css with font families, scanline/grain effects, custom animations like screen-shake, and themed military scrollbars.
I will now create src/types/game.ts which defines the data models for units, squads, trenches, projectiles, particles, upgrades, and game states.
I will now create src/audio/soundEngine.ts to synthesize battle sound effects (rifle cracks, machine gun fire, explosions, officer whistles, and ambient battlefield rumbles) directly using the Web Audio API without needing external sound files.
I will now update src/audio/soundEngine.ts to remove the unused ambientNoise property.
I will now create src/data/units.ts with the detailed tactical specifications for German units, British AI units, and Fire Support strikes.
I will now create src/data/upgrades.ts which defines the unlockable Perks & Armory shop where players can spend experience points (XP) to upgrade their troops, gas masks, and command points.
I will now create src/data/campaign.ts with 4 historical and highly engaging campaign missions of increasing tactical complexity.
I will now create src/utils/storage.ts to persist player XP, unlocked perks, completed campaign missions, and local high scores in browser localStorage.
I will now create src/components/Navbar.tsx which provides the live in-game heads-up display (HUD), displaying the dynamic Morale Tug-of-War bar, Command Points (CP) generator, current score, and audio/pause controls.
I will now create src/components/ArmoryModal.tsx which allows players to spend their earned battlefield XP on permanent technological upgrades (such as Stormtroopers, Tanks, Gas Masks, and Logistics).
I will now create src/components/HighScoresModal.tsx to display the local High Scores table with rankings, trophies, modes, and timestamps.
I will now create src/components/InstructionsModal.tsx to provide a helpful field manual for new players explaining trench warfare mechanics, morale dominance, and fire support combinations.
I will now create src/components/StartScreen.tsx which serves as the immersive main menu, allowing players to jump into the historical Campaign, customize a No Man's Land Skirmish, open the technological Armory, or consult the combat archives.
I will now create src/components/GameOverScreen.tsx to showcase the post-battle statistics (such as casualties, score breakdown, time elapsed) and handle instant restart or advancing to the next mission.
I will now create src/components/PauseModal.tsx which pauses the battlefield action and gives options to resume, restart instant, or retreat.
I will now create src/components/ControlPanel.tsx which serves as the tactical command deck at the bottom of the screen, providing one-click access and hotkeys for troop wave recruitment, artillery/gas strikes, and trench charges.
I will now create src/components/Battlefield.tsx, the master game loop component that embeds an optimized HTML5 Canvas to execute the 60fps trench warfare simulation, rendering units, parallax terrain, dynamic tracers, mustard gas clouds, and intuitive touch/click controls.
I will now update src/types/game.ts to include 'explosion' in the supported particle types.
I will now fix the mouse event types and add the onStartNextMission prop in src/components/Battlefield.tsx.
I will now update handleMouseDown and handleMouseMove in src/components/Battlefield.tsx to correctly type React.MouseEvent<HTMLDivElement>.
I will inspect the GameOverScreen rendering in Battlefield.tsx to verify onStartNextMission.
I will now update Battlefield.tsx to call onStartNextMission when advancing to the next mission.
I will check the destructuring of props in Battlefield.tsx.
I will now include onStartNextMission in the destructured props for Battlefield.
I will now rewrite src/App.tsx to serve as the application coordinator, connecting the storage layer, main menu, battlefield, technological armory, and high score tables.
I will check src/main.tsx.
I will now update src/App.tsx to export App as the default export.
I am going to execute build_project to verify the application successfully builds and passes all TypeScript and Vite checks.
I have successfully built Warfare 1919: Trench Assault, a polished browser game clone of the classic Flash strategy hits.
⚔️ Key Features & Mechanics Built:
-
Authentic WWI Trench Warfare Loop:
- Play as Germany vs. Britain: Command the German Imperial Army against entrenched British AI positions across historical and custom sectors.
- 7 Specialized Troop Classes: Deploy Infanterie (Riflemen), Sturmtruppen (MP18s & Grenades), MG08 Machine Gun Teams, Scharfschütze (Snipers), Flammenwerfer (Liquid Fire Jets), Hauptmann Officers (Inspires Morale & Speed), and the ultimate A7V Sturmpanzer Battle Tank (immune to small arms, rolls over barbed wire).
- Tactical Fire Support Strikes: Call down pinpoint Mortar Barrages, lingering Mustard Gas Clouds, Fokker Aerial Strafing Runs, and devastating Krupp Heavy Artillery Strikes.
-
Precise Trench Control:
- HOLD Stance: Troops take deep sandbag cover (65%–75% damage reduction) and continuously shoot down incoming enemies.
- ASSAULT Stance: Troops climb out of their trenches and charge forward across No Man's Land to breakthrough and capture forward bunkers.
- Tight Controls: Switch stances instantly by clicking/tapping individual trenches or use the global All Assault ([A]) and All Hold ([H]) command buttons. Fully mapped hotkeys
[1-7] and [Q/W/E/R] ensure effortless play on desktop, alongside large responsive touch targets for mobile.
-
Juicy Feedback & Polish:
- Audio Synthesizer Engine: Autonomous Web Audio API sound generator producing incredibly crisp rifle cracks, water-cooled MG chatters, deep booming artillery explosions, officer whistles, and an immersive ambient rumble. Includes an instant mute toggle.
- Visual Effects: Built a custom 60fps canvas particle engine rendering muzzle sparks, bullet tracers, shrapnel dirt plumes, fiery flamethrower jets, blood particles, drifting toxic gas, and floating combat numbers.
- Satisfying Animations: Layered parallax skyline, ruined silhouettes, mangled barbed wire, rolling tank tracks, running soldier animations, and dynamic nation flags.
-
Game Modes & Progression:
- Historical Campaign Deck: 4 increasingly difficult campaigns (The Frontier Trenches, , , and ).
Files built: index.html, src/index.css, src/types/game.ts, src/audio/soundEngine.ts, src/data/units.ts, src/data/upgrades.ts, src/data/campaign.ts, src/utils/storage.ts, src/components/Navbar.tsx, src/components/ArmoryModal.tsx, src/components/HighScoresModal.tsx, src/components/InstructionsModal.tsx, src/components/StartScreen.tsx, src/components/GameOverScreen.tsx, src/components/PauseModal.tsx, src/components/ControlPanel.tsx, src/components/Battlefield.tsx, src/App.tsx