Swashy is a cute prototype pirate game I developed in a couple of days for my application to a graduate game design program. It’s a Unity game that features some neat stuff and semi-sorta-realistic boats.

ship game

Little boats just hangin' out.

Concept

The core concept of Swashy is to be a pirate (but like, less threatening), sailing your little pirate ship around from a top-down perspective and engaging in swashbuckling adventures. The only sort of swashbuckling adventure currently available in the prototype is some relatively basic ship-to-ship combat. The overall vision for Swashy includes more varied environments that include islands, pirate forts, and some more varieties of play. One of the things I wanted to include in this prototype but will have to wait is the ability to anchor your ship and continue on foot onto small islands to collect resources or do pirate things. Idealy, if I revisited this project, I would also want to do all-original art along with better lighting and more effects such as white water, wakes, and splashes.

Water

One of the hurdles of this prototype was getting the boats to bob and roll along waves like actual boats. The pattern of the waves that the ocean mesh uses is a basic sin wave with some perlin noise giving somewhat natural looking ripples and texture. This is implemented in a geometry shader applied to the material being used by the water mesh.

buoyancy

The white and blue lines show where the actual interaction is happening.

The buoyancy is achieved using a method outlined in this Gamasutra article. The boat rigidbodies are applying downward force while the mesh is applying upward force depending on how submerged each vertex on the boat mesh is. The meshes on the boat models weren’t very well suited to this model and the results had the boats immediately capsizing. My solution was to have a thick invisible platform the boats rest on which is technically the true “hull” of the boat interacting with the waves. This allowed the boats to have a lower center of gravity and generally stay much more stable; this also helped a lot with gameplay by helping the ships recover from being hit in semi-realistic ways.

Art

For the art direction I wanted to something sort of in a low-poly style that could look sort of cute-ish and generally be easy to work with. Currenlty, the prototype uses free assets (the ships and rocks) created and offered by kenney.nl. I modified the ship models a little bit in order to animate and use them in the way I wanted. I also added a rudder on the back that’s being controlled when the ship is steered. The ocean is just a solid color I picked out layered over the mesh with some specular highlights I added in a shader.

Gameplay

While I originally wanted to have a lot more features and things to do in this prototype, I was heavily limited by my available time. (I was given 2 weeks to complete this and was out of town or too busy with work for most of those days.) Currenlty, the prototype features other ships that shoot their cannons at you if they detect you’re within range and you can shoot back at them. Every ship including your own sinks in three hits making it somewhat challenging to stay afloat for a long time. Enemies spawn in a circle around you while you sail and then just kind of sail with their rudders pointed either to port or starboard. Every enemy ship you sink counts towards your score in the top left which you can then compare with your friends.

Go give the latest build of the game a try over at kamran.itch.io/swashy!