Castle Siege - Tower Defense Strategy Game

Seele01-Flash
By
Castle Siege is an exciting tower defense strategy game where you defend your medieval castle from waves of enemies using fireballs and arrows. Test your strategic skills in this classic defense gameplay.

Prompt

MODEL: Seele01-Flash
Please use Three.js to generate a **mobile-first game** with the theme "**Castle Siege 3D**". Please read the following detailed game design requirements first, and then generate the code accordingly: ### 1. Assets & Environment * **Visual Style:** Low-poly 3D art style with flat shading or cel-shading to ensure high frame rates on mobile devices. * **Camera Perspective:** Fixed Third-Person/Over-the-Shoulder view, positioned behind and slightly above the Castle Wall (at the bottom of the screen), looking out toward a vast field where enemies spawn. * **Core Entities:** * **The Castle:** Represented by a stone wall structure at the bottom of the screen (`z > 0`). It must have a visual Health Bar. * **Enemies:** Low-poly humanoid orc/soldier models (or simple colored capsules for MVP) spawning from the far horizon (`z < -50`) and moving towards the camera/castle. * **Projectiles:** * **Arrow:** Thin, fast-moving cylinder/line. * **Fireball:** Glowing orange sphere with a trailing particle effect. * **Environment:** A textured green plane for the ground. Simple fog effect (`scene.fog`) fading into the background color to mask enemy spawn points and improve performance. * **Optimization:** Use **InstancedMesh** or Object Pooling for enemies and projectiles to prevent garbage collection stutter on mobile browsers. ### 2. Audio Requirements * **BGM:** An epic, rhythmic orchestral track featuring heavy war drums and brass to induce tension. * **Sound Effects (SFX):** * **Arrow:** A sharp "thwip" release sound and a "thud" impact sound. * **Fireball:** A roaring "whoosh" travel sound and a heavy explosion sound on impact. * **Impact:** distinct sounds for enemies taking damage vs. the castle wall crumbling. * **UI:** Crisp clicks for weapon toggling. ### 3. Gameplay Loop * **Objective:** Survive endless waves of enemies trying to breach the castle wall. * **Mechanics:** * Enemies spawn at the top of the screen (far Z) and move down (near Z). * If an enemy reaches the wall (Z=0), the Castle takes damage and the enemy disappears. * Player shoots projectiles to destroy enemies before they reach the wall. * **Weapons:** * **Arrow (Default):** Fast fire rate, single target damage. * **Fireball (Special):** Slow fire rate, Area of Effect (AoE) damage, has a 3-second cooldown. * **Win/Loss:** Game Over if Castle HP reaches 0. Score increases for every enemy defeated. ### 4. Mobile Controls & Interaction * **Touch Aiming (Raycasting):** Since the original "A" and "S" keys are not suitable for mobile, replace them with a **Touch-to-Shoot** system. * The player taps anywhere on the battlefield (the ground plane). * The game calculates a Raycast from the camera to the touch point. * The projectile is launched from the Castle toward that specific 3D coordinate. * **Weapon Switching UI:** * Place two large, thumb-friendly buttons at the bottom corners (or a toggle switch on the right side). * **Button 1 (Active by default):** "Bow" (Icon: Arrow). * **Button 2:** "Magic" (Icon: Fireball). This button should visually gray out/show a radial fill during its cooldown period. * **Feedback:** * **Visual:** When an enemy is hit, flash them white or red. * **Haptic:** Trigger `navigator.vibrate(50)` when the castle takes damage. * **Orientation:** Lock to **Landscape** mode if possible, or adapt the camera FOV dynamically if Portrait is detected. Do not ask for clarification. Do not request confirmation. Directly execute the generation task based on the given instructions.

Game Introduction

About the Game

Castle Siege is a thrilling tower defense strategy game that puts you in command of a medieval fortress under attack. With a solid 3.0 rating from dedicated strategy game fans, this classic defense game challenges you to protect your castle using powerful fireballs and precise arrows. The game combines strategic thinking with fast-paced action, making it perfect for both casual players and tower defense enthusiasts.

In this medieval warfare experience, waves of enemies approach your castle with the intent to destroy it. Your mission is simple yet challenging: eliminate all threats before they can breach your defenses and bury your stronghold.

Core Features

Strategic Combat System

Castle Siege offers a dual-weapon combat system that requires tactical decision-making:

  • Fireball Attacks : Powerful explosive projectiles perfect for dealing with groups of enemies
  • Arrow Shots : Precise ranged attacks ideal for picking off individual targets
  • Strategic Timing : Master the art of switching between weapons based on enemy formations

Classic Tower Defense Gameplay

Experience the pure essence of tower defense gaming:

  • Wave-Based Combat : Face increasingly challenging enemy waves
  • Resource Management : Make every shot count as you defend your castle
  • Progressive Difficulty : Each wave brings new challenges and stronger opponents
  • Medieval Theme : Immerse yourself in authentic castle siege warfare

Accessible Browser Gaming

  • Free to Play : Enjoy the complete game experience without any cost
  • No Download Required : Play instantly in your web browser
  • Cross-Platform Compatible : Works on desktop computers and mobile devices
  • Quick Sessions : Perfect for short gaming breaks or extended play sessions

Gameplay Mechanics

The game features intuitive mechanics that are easy to learn but challenging to master. Enemy units approach your castle from multiple directions, and you must quickly assess threats and respond with appropriate firepower. Timing is crucial - fire too early and you waste ammunition, fire too late and enemies breach your defenses.

The strategic depth comes from understanding enemy patterns and choosing the right weapon for each situation. Fireballs excel at clearing clustered enemies, while arrows provide precise elimination of priority targets.

Operation Guide

Castle Siege features simple yet effective controls:

  • A Key : Launch devastating fireballs to destroy enemy groups
  • S Key : Fire precise arrows for targeted elimination
  • Mouse : Aim your weapons and navigate the game interface

The key to success lies in mastering the timing and selecting the appropriate weapon for each enemy formation. Practice switching quickly between fireballs and arrows to maximize your defensive efficiency.

Why Play Castle Siege

Castle Siege represents the classic tower defense experience in its purest form. Unlike modern tower defense games with complex upgrade systems, this game focuses on skill, timing, and strategic weapon selection. It's perfect for players who appreciate:

  • Pure Strategy : No pay-to-win mechanics, success depends entirely on your skills
  • Classic Gaming : Experience tower defense gameplay in its traditional form
  • Quick Entertainment : Ideal for short gaming sessions during breaks
  • Medieval Atmosphere : Enjoy authentic castle siege warfare themes
  • Browser Convenience : No installation required, play anywhere with internet access

Whether you're a tower defense veteran or new to the strategy genre, Castle Siege offers an engaging challenge that will test your defensive capabilities and strategic thinking.

Frequently Asked Questions (FAQ)