Naval Skirmish Prototype – Gameplay & Feature Summary
This naval combat prototype was developed in roughly one month using Unity and C#. It is a physics‑driven ship combat experience where players control a sailing vessel, fire broadsides, manage movement, and engage dynamically with enemy ships that react, reposition, and fight back. The project blends realistic buoyancy, cinematic cannon fire, and AI behavior.
This is far from a finished game and intentionally lacks heavy polishing. The goal was to build a vehicle system grounded in physics, not just a simple movement controller. As this is my first attempt at vehicle mechanics, I wanted a real challenge. Instead of making a car or a plane, which operate in relatively stable environments, I chose a boat affected by buoyancy and waves to push my limits and explore complex physical interactions.
Core Gameplay Loop
Sail
Players control throttle and steering using intuitive input actions. Movement is fully physics‑based:
- Forward & reverse propulsion
- Realistic turning influenced by speed
- Automatic stabilization to prevent unnatural tilting
- Dynamic buoyancy reacting to real water height (Suimono)
Aim & Broadside
Players switch between three camera perspectives:
- Main camera (navigation)
- Left broadside camera (Q)
- Right broadside camera (E)

Each side displays a real‑time cannon trajectory preview using LineRenderers. These trajectories update every frame based on cannon orientation, gravity, and shoot force.
Trajectory Visualization
Each cannon has its own LineRenderer:
- Predicts projectile path
- Updates every frame
- Only visible when the correct camera is active
- Disappears during cooldown after shooting
This gives players clear feedback and tactical control.
Fire
Pressing the fire input launches a full broadside from the active side:
- Cannonballs spawn at each cannon’s muzzle
- Physics‑based force propels them forward
- Each projectile handles collision safely:
- Disables physics on impact
- Applies damage once
- Self‑destructs after a short lifetime
- Sound Effect to simulate cannons shot
The player’s ship receives recoil force, pushing it slightly in the opposite direction for added realism.
Combat & Damage
Every ship uses a modular HealthSystem:
- Takes damage from cannonballs
- Triggers sinking animation when HP reaches zero
- Health bars update dynamically and rotate toward the camera
On Death
When a ship’s health reaches zero, a full destruction sequence is triggered:
- Movement, AI, and shooting systems are disabled
- The ship slowly sinks below the waterline
- The game ends transition to end scene
Enemy AI Behavior
Enemy ships use a custom EnemyShipAI that creates believable naval combat patterns.
Broadside Positioning
The AI attempts to maintain a tactical position:
- Chooses left or right side randomly
- Moves to a broadside offset relative to the player
- Adjusts rotation smoothly using Slerp
- Controls distance:
- Moves forward to close the gap
- Slows down or reverses if too close
- Speeds up if too far
Firing Logic
The AI fires when the player is within a realistic firing arc:
- Left cannons fire when angle is between ‑60° and ‑120°
- Right cannons fire when angle is between 60° and 120°

Cinematic & Visual Features
Boat Tilt
The player’s ship gently tilts on the X and Z axes using sinusoidal motion:
- Forward/back rocking
- Side‑to‑side sway
- Adjustable speed and amplitude
- Adds life and motion to the vessel
Special Features Worth Highlighting
Realistic Buoyancy System
Both player and enemy ships float using real water height from Suimono:
- Calculates water height at ship position
- Applies upward force proportional to depth
- Dampens vertical velocity
- Creates natural bobbing and wave interaction
Dynamic Camera Switching
Players instantly switch between:
- Navigation view
- Left broadside
- Right broadside
Technical Strengths to Mention
- Physics‑based ship movement and buoyancy
- Modular cannon and projectile architecture
- Dynamic trajectory prediction using gravity
- AI broadside positioning and firing logic
- Event‑driven health and sinking sequence
- Cinematic recoil and ship tilt effects
Hurdles along the way
Floating
Challenges related to buoyancy, water height detection, stabilization, and maintaining realistic ship behavior on waves:
- Balancing buoyancy strength to avoid sinking or bouncing unnaturally
- Preventing the ship from flipping on its axis by applying stabilization torque without locking rotation
Shooting
Difficulties implementing broadside mechanics, projectile physics, recoil forces, and safe collision handling:
- Preventing double collisions from cannonballs hitting multiple colliders
- Managing recoil forces without breaking the boat’s physics stability
- Accurate trajectory prediction using gravity and initial velocity
- Disabling physics on impact to prevent cannonballs from spinning the boat
AI Behavior
Complexities in broadside positioning, distance management, firing arcs, and creating believable naval combat patterns:
- Making the AI move like a boat instead of sliding or rotating unnaturally
- Ensuring the AI positions itself on a broadside angle rather than facing the player directly
- Maintaining proper distance without overshooting or stopping abruptly
- Sinking the AI by reducing buoyancy strength without causing physics instability
