
Turn a simple idea into a playable Unity cannon shooter game by building it step by step, implementing trajectory display, slow motion, scoring, and testable gameplay.
Let's create our project and get our scene ready.
Let's import Cinemachine and create the 3 cameras that we'll use all throughout this project.
Let's see how we can switch between our cameras at the press of a keyboard button, and how to control the orbit of our cameras without writing a line of code!
Let's start with the basic controls of our cannon: turning it left and right, and let's make the movement smooth by using acceleration and deceleration.
Pitching our cannon up and down will allow the player to adjust the range of their shots. Let's see how to make that happen!
One of the most under-estimated ways to add polish to any game is through sound effects, and it doesn't take much to add them, let's do it!
Let's add and customize some visual effects to enhance the visual appeal of our cannon.
Let's use a line renderer to draw our trajectory line, which will come in handy for previewing the exact trajectory of our cannonballs.
Let's handle the Attack action and shoot a cannonball out of our cannon, and make it fly!
Let's add visual and sound effect to our shooting mechanic.
A muzzle flash effect sounds like an obvious VFX to add to any firearm, whether it's a small pistol or a 10 tons howitzer. So let's add one to our cannon!
Let's create a Finite-State Machine to organize our Player script, we want to flesh out the shooting mechanic by introducing a fuse state where the player waits for a fuse to go off, and a reloading state where the next cannonball is loaded.
Let's handle high-speed collisions and create our first ship prefabs with a basic health system.
Let's add a circle at sea level that visually indicates where the projectile will land, this is trickier than it may seem, we'll also fix some issues with our cameras and make them a bit more polished.
Let's create a ship spawner that spawns a number of ships every few seconds at specific waypoints, and let's make our ships follow those waypoints until they reach the end of the path.
Death is a natural part of life, without it our ships have been following their paths even after they're destroyed, let's fix that and create a nice sinking animation.
Let's polish up the sinking animation by displaying pirates who jump off the bridge and scream, this adds an element of silliness to our game and makes it funny. Which is very important: games that take themselves too seriously require a lot of mastery to pull off, otherwise they get boring fast, because they forget their prime purpose: entertain the crowds!
Let's spice up the game by adding a medium and small ships, these will present different challenges to the player and add variety to the gameplay
Let's spice up the gameplay even more by making the ships follow different paths and add variety to the sounds that are played by the pirates.
Let's get back to our core gameplay and implement a more robust way to estimate our cannonball's landing point.
Let's add more silliness to our pirate characters by using some funny animations from Mixamo.com.
Let's add an ocean shader to animate the sea tiles, let's also add various elements of polish like a skybox to make the scene look more appealing.
Let's add a slow motion effet.
Let's flesh out our slow motion effect with more modules.
Let's flesh out our slow motion effect with more modules.
Let's add another camera for that Sniper Elite inspired slow motion effect.
Our slow-motion effect should be a reward for good aiming, we're going to make its activation depend on how close the player's shot will be to the future position of the ship when the cannonball touches the sea level.
Let's create a user interface (UI) for our game, and let's start by downloading and using a custom Google font, because that's the first step in making unique visuals for our game, then let's display a message warning the player that enemy ships are coming.
We want the player to be more involved when reloading, so let's require a keypress before starting the reload process, and let's display a progress bar on our UI.
Games are fun but sometimes you need to pause them, let's make that happen and also add a drop-down list to choose the trajectory display mode, this is our mini options menu that you can expand on your own.
Let's keep track of score when the player destroys enemy ships, each ship type gives the player different score points, let's also work on the score display to highlight the points that the player has just acquired.
Let's display a game over screen when the player runs out of ammo, with a button allowing them to restart. With this lecture our course comes to an end, thank you for watching and for taking this course!
Sink Pirate Ships with C# & Unity 6. Build a Juicy Cannon Shooter from Scratch!
Ever dreamed of manning a cannon on a stormy sea, lining up your shot, and watching pirate ships explode in slow motion as they sink beneath the waves?
That's exactly what we're building in this course.
You'll take full control of a powerful cannon and rain cannonballs on wave after wave of enemy pirate vessels sailing across the horizon. We're talking satisfying explosions, dramatic slow-mo projectile cameras, predictive trajectory lines, smooth cannon aiming, juicy sound & visual effect feedback.
If you already know the basics of Unity and have been frustrated for a long time, struggling with the complexity of putting together a complete, polished game, with interesting gameplay, or if you are an intermediate or advanced Unity user tired of scattered prototypes where gameplay never seems to be fun enough, and you get lost in a mire of unmaintainable code, messy architecture, and all sorts of pitfalls, then this is the perfect course for you.
What you'll actually create:
A cannon with buttery-smooth rotation, recoil, firing effects, and proper ballistic physics
Cannonballs that feel weighty and satisfying to launch
A dramatic projectile-follow camera that slows down time for those perfect hits
An optional trajectory prediction line so players can line up trick shots (great for an easy mode)
Pirate ships that follow smart curved paths across the sea
A flexible spawner system that controls enemy waves, difficulty ramp-up, and spawn timing
Tons of polish: particle explosions, splash effects, ship sinking animations, audio cues, screen shake, multiple camera, slow-motion effect, everything that makes gameplay feel alive and rewarding
By the end, you'll have a fun, standalone mini-game that looks and plays well. And you'll walk away with practical, real-world techniques you can reuse in your own projects.
Let's load the cannon! BOOM!