Castle Wars - 2 Player Pixel Battle Game

Seele01-Flash
By
Castle Wars is an exciting 2-player retro-pixel battle game where players control opposing castle warriors, using catapults, building blocks, and various weapons to defeat their opponent in fast-paced medieval combat.

Prompt

MODEL: Seele01-Flash
Please use Three.js to generate a **mobile-first game** with the theme "**Castle Wars: Pocket Edition**". Please read the following detailed game design requirements first, and then generate the code accordingly: ### 1. Assets & Environment * **Visual Style:** 2.5D "Retro Voxel" aesthetic. Although the gameplay is on a 2D plane (side-scrolling), use 3D `BoxGeometry` for all assets to give depth. * **Characters:** Construct Player (Blue) and Enemy (Red) using simple distinct cubes (Head, Body, Limbs). They should look like flat pixel art extruded into 3D. * **Environment:** A modular tile-based system. Floating grass platforms with dirt undersides. * **Background:** A parallax scrolling background featuring pixelated clouds and a faded castle silhouette to imply a large fortress. * **The Moat:** At the bottom of the screen, a dynamic water shader (blue plane with simple sine wave vertex animation) representing the "death zone". * **Mobile Optimization:** Use `MeshLambertMaterial` for performance. Merge static environment geometries where possible. Shadows should be baked or simple blobs to maintain 60FPS on mobile devices. ### 2. Audio Requirements * **BGM:** An energetic, looping 8-bit / Chiptune track with a "Medieval Battle" melody (flutes and drums synthesized). * **Sound Effects (SFX):** * **Jump:** A classic retro rising "bloop" or varying pitch square wave. * **Attack/Throw:** A "whoosh" noise followed by a metallic "clink" if it hits armor. * **Catapult:** A heavy wooden "creak" and a low-frequency "thud" for the rock launch. * **Building:** A quick "pop" sound when placing a defensive block. * **Balloon Pop:** A high-pitched noise when a loot balloon is shot down. ### 3. Gameplay Loop * **Core Logic:** A 1v1 battle (Player vs CPU AI) on a confined 2D stage. The goal is to deplete the opponent's health bar (3 Hearts) or knock them into the water. * **Combat Mechanics:** * **Melee:** Short-range sword swing. * **Ranged:** "Throw Sword" ability (consumes the weapon, requires pickup of new one). * **Catapults:** Interactive objects on the map. When standing near a catapult, the "Attack" button acts as a trigger to launch a heavy rock in an arc. * **Building Mechanic:** Players have a "Build" button with a cooldown (3 seconds). This places a temporary 1x1 stone block in front of them to block projectiles or create a step to higher ground. * **Dynamic Loot:** Every 15 seconds, a "Mystery Hero" (pixel sprite) flies by on balloons, dropping a crate containing weapon upgrades or health. ### 4. Mobile Controls & Interaction * **Screen Orientation:** Forced **Landscape Mode** to view the width of the battlefield. * **Virtual Joystick (Left Side):** A floating thumbstick for Left/Right movement. Up on the stick triggers Jump (or a dedicated Jump button if preferred for precision). * **Action Buttons (Right Side):** * **A Button (Large):** Attack / Fire Catapult. * **B Button (Medium):** Build Block. * **C Button (Small):** Jump (if not on joystick). * **Touch Feedback:** Add visual "press" states to buttons (opacity change). If the device supports it, trigger `navigator.vibrate(50)` on damage taken or heavy hits. * **Camera:** Implement a smooth dampening camera that follows the midpoint between the Player and the Enemy, zooming out slightly if they move far apart, ensuring both are always visible. Do not ask for clarification. Do not request confirmation. Directly execute the generation task based on the given instructions.

Game Introduction

About Castle Wars

Castle Wars is a thrilling 2-player pixel art battle game that brings medieval castle warfare to your browser. This retro-style action game pits two players against each other in intense castle-themed combat, combining strategic building mechanics with fast-paced battle action. With its charming pixel graphics and competitive multiplayer gameplay, Castle Wars offers endless entertainment for friends looking to settle scores in medieval style.

Core Features

Epic 2-Player Castle Battles

Engage in head-to-head combat with a friend in this classic 2-player battle format. Each player controls their own castle warrior, complete with unique weapons and defensive capabilities. The split-screen action ensures both players stay engaged throughout the intense battles.

Retro Pixel Art Graphics

Enjoy the nostalgic charm of detailed pixel art graphics that bring the medieval castle setting to life. The colorful, retro-style visuals create an immersive atmosphere while maintaining smooth gameplay performance across all devices.

Dynamic Weapon System

Collect various weapons and ammunition from mysterious balloon-flying heroes who drop bonuses throughout the battle. From swords to special projectiles, each weapon offers different advantages in combat, adding strategic depth to every encounter.

Strategic Block Building

Use small building blocks to create defensive structures or trap your opponent. The building mechanic adds a tactical layer to the game, allowing players to modify the battlefield in real-time and create advantages through clever construction.

Powerful Catapult Combat

Utilize the catapults positioned in your tower to inflict maximum damage on opponents. These siege weapons provide long-range attack options and can turn the tide of battle when used strategically.

Gameplay Mechanics

Battle Objectives

The primary goal is to defeat your opponent using any combination of weapons, catapults, and tactical building. Players must balance offensive attacks with defensive positioning to achieve victory in this fast-paced medieval combat.

Weapon Collection System

Throughout battles, mysterious heroes fly overhead with balloons, occasionally dropping weapon upgrades and special ammunition. Timing your collection of these bonuses can provide crucial advantages in combat.

Emergency Sword Throw

When cornered or in desperate situations, players can throw their sword as a last-resort attack. This high-risk, high-reward move can save you from defeat or deliver a surprise victory.

Operation Guide

Blue Player Controls

  • A/D Keys : Move left and right
  • W Key : Jump to higher platforms
  • E Key : Attack with current weapon
  • S Key : Place building blocks

Red Player Controls

  • Left/Right Arrow Keys : Move left and right
  • Up Arrow Key : Jump to higher platforms
  • P Key : Attack with current weapon
  • Down Arrow Key : Place building blocks

Combat Tips

  • Use the catapult for long-range attacks
  • Build blocks to create defensive walls or climbing platforms
  • Collect weapon drops quickly before your opponent
  • Master the timing of sword throws for emergency situations
  • Use jumping and building blocks to gain tactical positioning

Why Play Castle Wars

Perfect for Local Multiplayer : Castle Wars excels as a local multiplayer experience, making it ideal for friends, family gatherings, or competitive gaming sessions. The simple controls ensure anyone can jump in and play.

Free Browser Gaming : Enjoy this complete battle experience without any downloads or installations. Simply open your browser and start battling immediately.

Balanced Competitive Action : The game's mechanics create fair, skill-based competition where strategy and reflexes determine victory, not luck or pay-to-win elements.

Nostalgic Appeal : The pixel art style and classic gameplay mechanics appeal to both retro gaming enthusiasts and newcomers to the genre.

Quick Battle Sessions : Each battle is fast-paced and decisive, making it perfect for quick gaming sessions or extended tournament-style play.

Frequently Asked Questions (FAQ)