STEP 1

Generate an interactive speed typing game in a single HTML file, featuring side-scrolling gameplay and Tailwind CSS styling.

How to use the Cosmic Keystrokes AI Prompt

Overview: This template generates a complete, single-file HTML application for an interactive, side-scrolling speed typing game. It integrates Tailwind CSS for modern, aesthetic styling and uses WASD controls for character movement. The core gameplay loop involves encountering random words during movement and rewarding the player with points based on typing speed and accuracy.

Who is this for:

  • Front-End Developers looking for a quick, self-contained project to test HTML/CSS/JavaScript integration.
  • Game Developers interested in rapid prototyping of simple 2D mechanics.
  • Educators or Trainers seeking an engaging tool to practice typing skills with a gamified interface.

How it works: The prompt instructs the AI to synthesize all necessary components—HTML structure, embedded Tailwind CSS (via CDN or utility classes), and JavaScript logic—into one file. The JavaScript handles the game loop, character physics (WASD movement), random word generation, collision detection (when the player nears a word prompt), and a dynamic scoring system that rewards faster completion times. The aesthetic requirement ensures Tailwind is heavily utilized for visual appeal.

Pro-Tip: To enhance the game further after generation, focus your follow-up prompts on refining the word list (e.g., "Use only programming terms") or adjusting the physics (e.g., "Make the character jump when the spacebar is pressed"). Since this is a single file, all modifications must be made directly within the generated code block.

# HTML
# Tailwind
# CSS
# Game

Original Prompt Template

Write me a fully complete web app as a single HTML file. The app should contain a simple side-scrolling game where I use WASD to move around. When moving around the world, occasionally the character/sprite will encounter words. When a word is encountered, the player must correctly type the word as fast as possible.The faster the word is successfully typed, the more point the player gets. We should have a counter in the top-right to keep track of points. Words should be random and highly variable to keep the game interesting. You should make the website very aesthetic and use Tailwind.