Cannon Ball - Castle Artillery Game

Seele01-Flash
By
Cannon Ball is a strategic artillery game where players take turns firing cannons at each other's medieval castles. Use precise aim and power control to destroy your opponent's fortress and claim victory in this engaging turn-based strategy game.

Prompt

MODEL: Seele01-Flash
Please use Three.js to generate a **mobile-first game** with the theme "**Cannon Ball: Pocket Siege**". Please read the following detailed game design requirements first, and then generate the code accordingly: ### 1. Assets & Environment * **Visual Style:** Create a "2.5D" side-scrolling aesthetic using **Low-poly, vibrant Toon-shaded models**. The game should look like a colorful toy diorama. * **Castles:** Generate two opposing castles (Left side: Blue team, Right side: Red team). They should be constructed of individual blocky geometries (stone bricks) with cone-shaped roofs. * **Environment:** A rolling green hills terrain (simple geometry) in the foreground, with a parallax scrolling background of mountains and fluffy white clouds against a bright blue sky. * **Characters:** Place a simple, cute "King" or "Soldier" avatar (composed of primitive shapes: spheres/cylinders) visible on the ramparts of each castle. * **Optimization:** Use `BoxGeometry` and `CylinderGeometry` primarily to keep draw calls low for mobile performance. Use simple Lambert or Toon materials; avoid expensive real-time shadows—use a simple DirectionalLight. ### 2. Audio Requirements * **BGM:** A whimsical, marching-band style track (snare drums and flutes) that loops seamlessly. * **SFX:** * **Fuse:** A hissing sound while aiming/charging power. * **Fire:** A satisfying "Thump-Boom" when the cannon fires. * **Flight:** A cartoonish whistling sound as the ball travels through the air. * **Impact:** Cracking stone sounds and a particle explosion effect upon hitting a castle. * **Voice:** Cute, high-pitched grunts or cheers from the Kings when hit or winning. ### 3. Gameplay Loop * **Turn-Based Artillery:** The game starts with Player 1 (Left). The camera focuses on their cannon. * **Wind Mechanic:** At the start of each turn, generate a random "Wind" value (displayed as an arrow in the UI) that affects the projectile's X-axis velocity during flight. * **Firing:** Once the player inputs the angle and power, the cannonball launches following a physics-based parabolic arc. * **Damage Logic:** If the ball hits the opponent's castle, reduce a **Health Bar** displayed above the castle. If it hits the King directly, instant win or massive damage. * **Turn Switch:** After the projectile lands (or goes off-screen), the camera pans smoothly to the opponent's castle for their turn. * **Victory:** First player to reduce the enemy castle HP to 0 wins. ### 4. Mobile Controls & Interaction * **Touch-to-Aim (Slingshot Mechanic):** * **Input:** Do **not** use on-screen arrow buttons. Instead, implement a "Drag-and-Release" control anywhere on the screen. * **Visual Feedback:** When the user touches and drags back, render a **dotted trajectory line** (prediction path) showing the estimated arc based on current drag distance (Power) and angle. * **Release:** Releasing the finger fires the cannon. * **Camera Control:** Allow the user to use a **two-finger swipe** to pan the camera to look at the enemy castle before firing. * **Orientation:** Lock to **Landscape Mode**. * **UI/UX:** * Power and Angle values should be displayed as large, readable text during the drag action. * "Fire" button is not needed (release to fire), but a "Reset Game" button should be placed in the top corner (min size 44x44px) safe from accidental touches. * **Haptic Feedback:** Trigger a short vibration (`navigator.vibrate`) when the cannon fires and a longer vibration when a castle is hit. Do not ask for clarification. Do not request confirmation. Directly execute the generation task based on the given instructions.

Game Introduction

About the Game

Cannon Ball is a classic artillery strategy game that combines precision aiming with tactical thinking. In this medieval-themed battle game, two opposing forces face off across a battlefield, each defending their own castle while attempting to destroy their opponent's fortress. The game features charming cartoon-style graphics with colorful castles, brave knights, and explosive cannon fire that creates an engaging and family-friendly gaming experience.

This turn-based strategy game challenges players to master the art of ballistic warfare, calculating the perfect angle and power to launch devastating cannonballs at enemy fortifications. With its simple yet addictive gameplay mechanics, Cannon Ball has entertained players for years as a perfect example of accessible strategy gaming.

Core Features

Strategic Turn-Based Combat

The game revolves around tactical decision-making where each shot counts. Players must carefully consider wind conditions, distance, and trajectory to maximize damage to the enemy castle while protecting their own fortress. The turn-based system allows for thoughtful planning and creates intense moments as cannonballs arc through the air.

Two-Player Competitive Mode

Cannon Ball shines as a multiplayer experience, allowing two players to battle head-to-head on the same device. This makes it perfect for family game nights, friendly competitions, or casual gaming sessions with friends. The competitive element adds excitement as players try to outsmart and outmaneuver each other.

Cute Medieval Art Style

The game features a charming cartoon art style with vibrant colors and adorable character designs. Medieval knights manning the cannons, colorful castle towers with fluttering flags, and smooth animation effects create a visually appealing experience that appeals to players of all ages.

Physics-Based Gameplay

Realistic ballistic physics govern cannonball trajectories, making each shot feel authentic and rewarding. Players must account for gravity and distance when aiming, creating a satisfying skill-based gameplay loop that improves with practice.

Gameplay Mechanics

Castle Destruction System

Each player controls a medieval fortress equipped with powerful cannons. The objective is to completely destroy the opponent's castle structure while keeping your own intact. Successful hits cause visible damage to castle walls and towers, with debris flying in all directions for satisfying visual feedback.

Precision Aiming Controls

The game uses intuitive controls where players adjust cannon angle and power before firing. This creates a perfect balance of accessibility for newcomers while offering depth for experienced players who can master advanced techniques and precise shots.

Victory Conditions

The battle continues until one castle is completely destroyed, with the surviving player declared the winner. This clear win condition creates exciting comeback scenarios where a well-placed shot can turn the tide of battle.

Operation Guide

Mastering Cannon Ball requires understanding the simple yet effective control scheme:

  • UP & DOWN Arrow Keys : Adjust your cannon's aiming angle to target different parts of the enemy castle
  • SPACE Bar : Hold to build power, then release to fire your cannonball
  • Strategic Timing : Take your time to line up the perfect shot - there's no time pressure

The key to success lies in finding the right balance between angle and power. Higher angles with moderate power work well for close targets, while lower angles with maximum power are ideal for distant castles. Experiment with different combinations to develop your artillery skills.

Why Play Cannon Ball

Cannon Ball offers the perfect combination of strategy, skill, and fun that makes it an ideal choice for both casual and competitive gaming:

Instant Accessibility : No complex rules to learn or lengthy tutorials to complete. Jump straight into the action with intuitive controls that anyone can master.

Competitive Fun : The two-player mode creates memorable gaming moments and friendly rivalries. Perfect for family entertainment or challenging friends to artillery duels.

Skill Development : While easy to learn, the game offers genuine depth through physics-based aiming that rewards practice and precision.

Timeless Appeal : The classic artillery gameplay formula has entertained players for generations, proving its enduring fun factor.

Free Browser Gaming : Play instantly without downloads, installations, or payments. Simply open your browser and start battling!

Frequently Asked Questions (FAQ)