Battle Typer - Naval Typing Defense Game

Seele01-Flash
By
Battle Typer is an innovative naval-themed typing game that transforms typing practice into an exciting battleship defense adventure. Perfect for improving typing speed and accuracy while having fun.

Prompt

MODEL: Seele01-Flash
Please use Three.js to generate a **mobile-first game** with the theme "Battle Typer". Please read the following detailed game design requirements first, and then generate the code accordingly: ### 1. Assets & Environment * **Camera & Perspective**: Use a fixed **PerspectiveCamera** positioned slightly above the water level, looking towards the horizon (similar to a naval commander's view). Ensure the camera adapts its FOV based on aspect ratio (Landscape orientation preferred). * **Environment**: * **Water Shader**: Create a performant, animated ocean using a shader material (blue/turquoise gradients) with gentle wave movement and reflection capabilities to mimic the screenshot. * **Background**: A bright blue skybox with scattered clouds and a distant island model on the horizon as a static backdrop. * **Territory Line**: A visible line of red/white floating buoys near the player's position, marking the "Game Over" boundary. * **Models**: * **Player Ship**: A low-poly battleship turret or bow visible at the bottom center of the screen (anchored). * **Enemy Ships**: Low-poly destroyer/battleship models that spawn at the horizon and move slowly toward the player. They should scale up (LOD) as they get closer. * **Text Assets**: High-contrast, billboarded 3D text floating above each enemy ship showing the target word. Use a bold, sans-serif font (e.g., Helvetiker). Text color should change dynamically (e.g., White = Untyped, Green = Typed, Red = Error). * **Effects**: Simple particle systems for muzzle flashes (when player shoots), water splashes (misses), and smoke/fire (when enemy ships are destroyed). ### 2. Audio Requirements * **BGM**: An energetic, marching-style orchestral track (drums and brass) to build tension. Loop seamlessly. * **SFX**: * **Typing**: A mechanical keyboard "clack" or digital "beep" for every correct keystroke. * **Shooting**: Cannon fire sound when a word is fully completed. * **Impact**: Explosion and metal crunching sounds when an enemy is destroyed. * **Error**: A buzzer or alarm sound when the player types a wrong letter or takes damage. * **Ambience**: subtle wind and ocean wave sounds. ### 3. Gameplay Loop * **Spawning Logic**: Enemy ships spawn at the horizon at random intervals. Each ship is assigned a random word from a dictionary array. * **Targeting System (The "Lock-on" Mechanic)**: * The game listens for keyboard input. * If no target is locked, typing a letter that matches the *first letter* of any visible ship's word locks onto that ship. * Once locked, all subsequent keystrokes apply *only* to that specific ship until the word is finished or the player fails. * **Typing & Combat**: * **Correct Input**: The matched letter turns green/disappears. Upon completing the word, a projectile travels from the player to the enemy, destroying it. * **Incorrect Input**: The screen flashes red, and the player loses Health Points (HP). * **Progression**: * As time passes (or score increases), ships move faster, spawn more frequently, and possess longer/more complex words. * **Win/Loss Condition**: * **Loss**: If an enemy ship crosses the "Buoy Line" or Player HP drops to 0. Show a "Game Over" overlay with the final score. * **Score**: +100 points per letter, +500 bonus for destroying a ship. ### 4. Mobile Controls & Interaction * **Mobile Adaptation Strategy**: Since this is a typing game on mobile, the logic must handle the **Virtual Keyboard**. * **Input Mechanism**: * Place a transparent, full-screen overlay HTML input element. When the user taps anywhere on the "Game Scene" (top 60% of screen), focus this hidden input to trigger the native mobile keyboard. * Alternatively, provide a "Toggle Keyboard" button in the UI. * **UI Layout (Landscape Mode)**: * **Top Left**: Score Display. * **Top Right**: Health Bar (visual representation with heart icons or a green bar). * **Center Overlay**: A "Tap to Start / Focus Keyboard" prompt if the keyboard is closed. * **Feedback**: Implement **Haptic Feedback** (vibration) using `navigator.vibrate()` on mobile devices specifically when a wrong key is pressed or when the player takes damage. * **Visual Feedback**: * When a letter is typed correctly, fire a small projectile or laser beam immediately to give instant visual feedback before the word is finished. Do not ask for clarification. Do not request confirmation. Directly execute the generation task based on the given instructions.

Game Introduction

About the Game

Battle Typer is a unique casual typing game that combines naval warfare with keyboard skills training. Set against a stunning ocean backdrop with realistic battleships, this game transforms mundane typing practice into an thrilling defense experience. Players must type words quickly and accurately to fire cannons at incoming enemy ships, making it both educational and entertaining.

The game features beautiful 3D graphics with detailed naval vessels sailing across crystal-clear waters, creating an immersive maritime atmosphere that keeps players engaged while they develop their typing abilities.

Core Features

Progressive Difficulty System

Battle Typer offers carefully designed difficulty levels that accommodate everyone from typing beginners to seasoned professionals. The game starts with simple, short words and gradually introduces longer, more complex vocabulary as your skills improve.

Real-Time Typing Combat

Experience the unique thrill of using your keyboard as a weapon. Each correctly typed word fires your ship's cannons at enemy vessels, creating an immediate connection between typing accuracy and gameplay success.

Educational Value

This isn't just entertainment – it's a powerful learning tool. Players naturally improve their: - Words per minute (WPM) speed - Typing accuracy and precision - Vocabulary recognition - Hand-eye coordination - Spelling skills

Immersive Naval Environment

The game features stunning ocean visuals with detailed battleships, realistic water effects, and atmospheric naval settings that make typing practice feel like an epic sea battle adventure.

Game Mechanics

The gameplay revolves around defending your maritime territory from waves of enemy battleships. Words appear above each approaching vessel, and players must type them completely and accurately to destroy the threats.

Strategic Elements

  • Word Lock System : Once you begin typing a word, you're committed to completing it
  • Health Management : Typing errors result in enemy fire and health loss
  • Progressive Challenges : Enemy ships become larger with longer words as you advance
  • Territory Defense : Prevent enemy ships from reaching your territorial boundaries

Operation Guide

Basic Controls

  • Keyboard : Type the displayed words above enemy ships
  • Spacebar : Pause/unpause the game
  • Mouse : Click to focus game window

Gameplay Strategy

  1. Focus on accuracy first - mistakes cost health points
  2. Prioritize closer threats - ships approaching your territory are most dangerous
  3. Practice rhythm typing - develop consistent typing flow
  4. Use proper finger positioning - maintain good typing form for speed
  5. Stay calm under pressure - panic leads to more errors

Winning Conditions

  • Destroy as many enemy ships as possible before they breach your defenses
  • Maintain health points by avoiding typing mistakes
  • Achieve higher scores by improving typing speed and accuracy

Why Play Battle Typer

Perfect for Skill Development : Whether you're a student looking to improve academic typing skills, a professional seeking to increase workplace efficiency, or someone who simply wants to type faster, Battle Typer makes practice enjoyable and rewarding.

Completely Free : No downloads, no subscriptions, no hidden costs. Simply open your browser and start improving your typing skills immediately.

Universal Accessibility : The game works perfectly on both desktop computers and mobile devices, allowing you to practice typing anywhere with an internet connection.

Engaging Learning Experience : Unlike boring typing tutorials, Battle Typer gamifies the learning process, making you want to return and improve your skills naturally.

Measurable Progress : Track your improvement through score systems and observe your words-per-minute increase over time as you defend against increasingly challenging enemy fleets.

Frequently Asked Questions (FAQ)