Act as an expert React, Tailwind CSS, and Frontend Game Developer. We are building a…
- User
Act as an expert React, Tailwind CSS, and Frontend Game Developer. We are building a high-end, ultra-professional Android Landscape mobile arcade game called "NEON STARDUST".
The gameplay concept will feature a rising/forward-moving box character that dodges obstacles and defeats mini-enemies, but right now we are starting strictly with STEP 1: The Premium Loading Screen and Architecture Setup.
CRITICAL ARCHITECTURE REQUIREMENT: To prevent code splitting or broken screen transitions later, you must build this using a Single Page State Machine structure. Define a
gameStatestate variable capable of handling: 'LOADING', 'MAIN_MENU', 'WORLD_SELECT', 'LEVEL_SELECT', and 'GAMEPLAY'.Implement the following for Step 1:
-
Viewport & Responsiveness:
- The entire game must be contained within a strict 16:9 landscape aspect ratio box (
aspect-video, max-w-[1024px]), optimized perfectly for Android mobile devices in landscape mode. No vertical scrolling allowed.
- The entire game must be contained within a strict 16:9 landscape aspect ratio box (
-
Premium Visuals & Theme:
- Cyberpunk/Neon arcade theme. Deep dark background (#030712 or #040a18) with a subtle neon cyber-grid pattern overlay.
- Title: "NEON STARDUST" with a high-end glowing text shadow effect, gradient colors (Cyan to Pink/Purple), and a smooth pulse animation.
-
Loading Logic & Progress Bar:
- Use
useStateanduseEffectto simulate a real loading sequence from 0% to 100% over 3 seconds. - The loading bar must look extremely professional: a sleek outer capsule border, a glowing gradient fill that moves smoothly, and a subtle glowing particle/shadow at the tip of the progress bar.
- Display dynamic text underneath like "INITIALIZING QUANTUM ENGINES...", "LOADING AUDIO ASSETS...", etc., changing based on the percentage.
- Use
-
State Transition:
- As soon as the progress bar reaches 100%, wait for 500ms, then cleanly switch the
gameStateto 'MAIN_MENU'. - For now, create a clean placeholder UI for the 'MAIN_MENU' state that says "MAIN MENU PLACEHOLDER - READY FOR STEP 2" so we know the state transition works perfectly.
- As soon as the progress bar reaches 100%, wait for 500ms, then cleanly switch the
Provide the complete, production-ready React component code in a single block. Do not use external image URLs; use high-quality Tailwind CSS gradients, shadows, and animations instead.
-
- Assistant
Implemented the complete Step 1 experience in:
src/App.tsx: Typed single-page state machine, 3-second loading sequence, dynamic statuses, progress effects, and 500ms transition to the main-menu placeholder.src/index.css: Cyber-grid, scanlines, neon glow, particle motion, responsive viewport controls, and reduced-motion support.
The game remains locked to a strict 16:9 landscape frame with
max-w-[1024px], scales against both viewport dimensions, and prevents scrolling.Production build verified successfully with
npm run build.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.