STRATEGY

AR Pirate

Tools & Workflow

  • AR Framework: Unity’s AR Foundation + XR Interaction Toolkit for gesture recognition.

  • Art Pipeline: Low-poly ship models (Blender) + stylized water shaders (Amplify Shader Editor).

  • QA: Tested on iOS (ARKit) and Android (ARCore) devices to ensure cross-platform functionality.

 

Game Overview: "AR Pirates: Last Captain Standing"

Battle for survival on the high seas—blended into your world.

Setting

You are the last surviving captain of a rebel crew, hunted by a ruthless colonial warship. Stranded on the open ocean, you must defend your damaged vessel while outmaneuvering the enemy. Using AR, the game transforms your real-world environment into a dynamic battlefield, where ships clash on your tabletop, floor, or desk.

Core Mechanics

  1. AR Environment:

    • Surface Tracking: Unity’s AR Foundation scans and anchors ships, ocean, and UI to real-world surfaces (tables, floors).

    • Phone Movement Integration: Tilt/rotate your phone to steer your ship, adjust cannons, or sprint across the deck.

  2. Ship Management:

    • Repair System:

      • Hull Damage: Physically walk to the cabin (via phone movement) to grab wooden planks, then tap damaged areas to repair.

      • Mast Fixing: Shake the phone vigorously to “reattach” sails (mimicking manual labor).

    • Health Bar: A floating AR UI displays ship integrity; let it drop to zero, and your vessel sinks.

  3. Combat:

    • Cannon Aiming: The enemy ship sways with virtual waves. Time your screen tap to fire when the crosshairs align.

    • Dynamic Difficulty: Missed shots make the enemy smarter—they zigzag or return fire faster.

  4. Resource Constraints:

    • Limited planks and cannonballs force strategic prioritization (repair vs. attack).

Development Cycle

  • Using the unity XR toolkit and the Android build support module to build a game for mobile which utilizes the player’s camera to be used as the plane where the player would move to fire a cannon at the opposing ship, get parts to repair and repair the ship.

Configuration of the AR

  • The XR Origin act as the root for the XR tracking. It contains (Tracked Pose Driver), which handles device tracking. (AR Camera Manager) manages the AR session. (AR Camera Background) renders camera feed
  • In my game, the AR Camera Background renders the live phone camera feed and the game background, allowing players to see the real world through their phone screens.
  • AR Plane Manager, which is built into your setup, uses the phone’s camera and sensors to scan objects and identify horizontal and vertical planes, such as walls, floors, and tables.
  • Tracking Mode: Position And Rotation Uses phone sensors (gyroscope, accelerometer, camera) to track: Device position (X/Y/Z movement in physical space), Device rotation (tilt/turn/lean angles).

Start

  • First, we started with a script that created a low-poly water effect in a wave pattern using mesh manipulation.
  • Which I was able to edit in the inspector, Parameters controlled by:
  • waveHeight: Vertical wave amplitude
  • waveFrequency: Wave speed
  • waveLength: Distance between wave peaks
  • waveOriginPosition: Wave emission center

Scripts boats sway

  • A boat sway script was made to mimic the swaying of being on the sea.
    The parameter swayAmplitude tilts the boat at 5 degrees by default, and I assigned the sway speed to 1. I used Mathf.Sin to create a smooth movement and make it so that it can only move at a z axis.

Canon Script

  • So, in this script, the logic is to fire a cannonball. In the script, it spawns a projectile from the “firePoint” where the cannon should appear.
  • It applies a forward speed and upward force to create an arching trajectory and destroys at a certain time to avoid memory leaks
  • I enforce a “cooldownTime” between shots to simulate an actual cannon and display the cooldown time with UI.
  • I also added “fireParticle” when fired as well as fireSound from the “audiSource”.
  • The cannonTouchHandler sets so the game listens for the screen touches (Input.touchCount > 0)
  • Creates a ray from the AR camera to the touch position Ray ray = arCamera.ScreenPointToRay(touch.position), and if the ray hits fire cannon

Health Script

  • Health Management
  • maxHealth: Total health capacity (default 100)
  • currentHealth: Dynamically updated health value
  • TakeDamage(): Reduces health, triggers sinking at 0

Other Similar Games

VR Boxing
Dive into the immersive world of VR Boxing, where you
Fighting
To Be Human
To be Human’ is a first-person sci-fi horror Made with Unity and Love for Ukie Game Jam 2024
3D Scifi
Project Asteroid
Embark on a thrilling adventure
Claim the highest score
Flight
flying game
Adventure
Movement Prototype
A prototype to showcase movement mechanics
Dungeon Shooter
Thrilling Dungeon experience
Action Adventure
Its Just a Game
In Development
Football, Simulation