Key Master - Typing Defense Game

Seele01-Flash
By
Key Master is an innovative typing defense game that combines puzzle-solving with fast-paced action. Type demon names to blast away menacing creatures and defend yourself in this unique educational gaming experience.

Prompt

MODEL: Seele01-Flash
Please use Three.js to generate a **mobile-first game** with the theme "**Key Master: The Wizard's Defense**". Please read the following detailed game design requirements first, and then generate the code accordingly: ### 1. Assets & Environment * **Visual Style:** Low-poly Fantasy style. A dark, mystical atmosphere with neon-glowing text to ensure high contrast and readability on small screens. * **Main Character (The Wizard):** A simple cone-shaped mesh representing a wizard with a hat and staff, positioned at the **center of the screen**. * **Enemies (Demons):** Simple geometric shapes (cubes, spheres, jagged rocks) with glowing red eyes that spawn from the edges of the screen and move slowly toward the Wizard. * **Environment:** A flat, dark grid or stone texture floor. The background should be a dark void or deep purple fog to keep focus on the text. * **VFX:** When a word is completed, the enemy should explode into particles (simple geometry). A "Magic Shield" visual around the wizard that cracks if hit. * **Mobile Optimization:** Use simple geometries (BoxGeometry, SphereGeometry) instead of external model loading to ensure instant loading. Use a single directional light and ambient light for performance. ### 2. Audio Requirements * **BGM:** Fast-paced, retro 8-bit "Boss Battle" music or tense orchestral fantasy loop. * **SFX - Typing:** A "magical sparkle" or high-pitched click sound for every correct letter typed. * **SFX - Error:** A dull "thud" or buzzer sound if the player types a wrong letter. * **SFX - Destruction:** A blast/explosion sound when an enemy is defeated ("Kaboom!"). * **SFX - Game Over:** A shattering glass sound. ### 3. Gameplay Loop * **Core Mechanic:** Enemies spawn with a random word floating above their heads. The player must type the word to destroy the enemy. * **Targeting System:** When the player types a letter, the game checks if it matches the first letter of any active enemy's word. If multiple match, prioritize the closest one. Once an enemy is "locked on," subsequent keystrokes only apply to that enemy until it dies or the player makes a mistake resetting the lock. * **Word Highlighting:** As the player types, the letters above the enemy should change color (e.g., from White to Gold) to indicate progress. * **Win/Loss:** * **Score:** +10 points per letter, +100 bonus for killing an enemy. * **Loss:** If an enemy touches the Wizard, the game is over. * **Progression:** Words get longer and enemies move faster as the score increases. Occasional "Upgrade" words (e.g., "HEAL", "BLAST") spawn; typing them grants a bonus (clearing all enemies or granting a shield). ### 4. Mobile Controls & Interaction * **Input Method (Critical):** Since this is a typing game on mobile, use a **hidden HTML input field** (`<input type="text" style="opacity: 0; position: absolute; top: -1000px;">`). * **Interaction Flow:** * **Tap to Start:** When the user taps the screen, programmatically `.focus()` the hidden input field to force the native mobile keyboard to open. * **Keyboard Handling:** Listen to the `input` event. Ensure `autocomplete`, `autocorrect`, and `autocapitalize` are set to "off" on the input field to prevent mobile OS interference. * **Screen Layout (Vertical Adaptation):** * **View:** The Three.js canvas must occupy the **top 50-60%** of the screen. The camera should be angled top-down (isometric view). * **Safety Zone:** The bottom 40-50% of the screen must be reserved (black space or UI overlay) for the native keyboard so that the keyboard strictly does *not* cover the game character or enemies. * **Visual Feedback:** * Screen Shake effect (camera jitter) when an enemy is destroyed. * Red flash overlay on the canvas if the player takes damage/loses. Do not ask for clarification. Do not request confirmation. Directly execute the generation task based on the given instructions.

Game Introduction

About the Game

Key Master is a thrilling typing defense puzzle game that transforms keyboard practice into an exciting battle experience. With a solid 3.6/5 rating from players worldwide, this game proves that learning can be incredibly entertaining. Face off against waves of menacing beasts and demons by typing their names with lightning speed and precision.

The game follows a simple yet addictive premise: "Typing is a deadly art - you must practice!" As supernatural creatures advance toward you, your only weapon is your keyboard skills. The faster and more accurately you type, the more effectively you can defend yourself against the demonic invasion.

Core Features

Unique Typing Mechanics

Key Master revolutionizes traditional typing games by adding strategic defense elements. Instead of simple word practice, you're engaged in life-or-death combat where your typing speed directly determines your survival.

Educational Value

While having fun blasting demons, you're simultaneously improving essential computer skills: - Typing Speed : Increase your words-per-minute naturally through gameplay - Accuracy : Develop precise finger placement and reduce typing errors - Hand-Eye Coordination : Enhance reaction time and visual processing - Keyboard Familiarity : Master key positions without looking

Progressive Difficulty

The game features escalating challenges as you advance, ensuring continuous skill development. Early levels allow you to familiarize yourself with mechanics, while later stages test even experienced typists.

Instant Feedback System

Receive immediate visual and audio feedback for every successful demon defeat, creating a satisfying gameplay loop that motivates continued play.

Gameplay Mechanics

Key Master creates tension through its time-pressure mechanics. Demons approach at varying speeds, requiring quick decision-making about which threats to prioritize. Some creatures have longer names that take more time to type, while others move faster across the screen.

The upgrade system adds strategic depth - type specific upgrade words to enhance your abilities temporarily. This mechanic requires players to balance immediate threats with long-term advantages.

Operation Guide

Basic Controls

  • Keyboard Only : All gameplay uses standard typing - no mouse required
  • Type Demon Names : Look at approaching creatures and type their displayed names
  • Complete Words : Press Enter or Space to execute the spell after typing
  • Upgrade Activation : Type upgrade words when they appear to activate power-ups

Strategy Tips

  • Prioritize Fast Movers : Target demons approaching quickly first
  • Practice Common Patterns : Many demon names share letter combinations
  • Stay Calm : Panic leads to typing mistakes - maintain steady rhythm
  • Use Upgrades Wisely : Time upgrade activations for maximum benefit

Why Play Key Master

Perfect for Students and Professionals

Key Master offers an entertaining way to develop typing skills essential for academic and workplace success. Unlike boring typing tutors, this game makes practice engaging and rewarding.

Accessible Learning

The game requires no prior gaming experience - anyone who can type can play. The gradual difficulty curve ensures players of all skill levels can enjoy and benefit from the experience.

Free and Convenient

Play directly in your web browser without downloads, installations, or subscriptions. The game loads quickly and runs smoothly on most devices.

Measurable Progress

Watch your typing speed and accuracy improve naturally as you advance through levels. The game provides clear indicators of skill development.

Stress Relief with Purpose

Unlike mindless casual games, Key Master offers relaxation while building valuable real-world skills. Transform study breaks into productive typing practice sessions.

Frequently Asked Questions (FAQ)