Ship Game Starter Kit

It's a game starter package (playable here) that has the basics for a tycoon-style game (buy ships, assign trade routes) or a Sid Meier's Pirates-style game (sail around with a ship, shoot at pirates!).

Are you a game designer that can think of a couple more ways to make the game more fun? Are you an artist that can add new ships, props, or even weather effects? Are you a programmer that can add ship-to-ship combat? Well then! Make your game, and let this kit help you get started.

The way you establish trade routes would change (the way you draw them out of waypoints), but the rest would remain the same. The ship follows a spline of waypoints. It can be linear if desired, and going over land would be a simple matter of sampling the height of the terrain under the unit and repositioning it accordingly as the unit moves. Space would be even easier, although I'm not sure how you would set up your waypoints in 3D.

The main suggestion I'd make is to have some sort of mini-map where you can see a layout of where everything is. I found it difficult to locate some areas after scrolling around a bit. Even if not a mini map then some sort of "fast zoom out to extents" where the camera would zoom out all the way, allowing someone to then double click on a town or area to zoom to that point.

I'd also like to see auto camera panning while placing waypoints for the routes. When I get to the edge of the screen I have to use Right Mouse to pan, but that's also the button for undoing a way point so I accidentally undid some along the way.

I really like this though. I'm in the middle of a huge update to my game but when I finish I'm thinking about taking a detour and making some sort of ship game with this.

Version 1.3 has been submitted to the asset store, and the web player link has been updated.

- Camera zoom has been extended.
- Camera will pan when the mouse is on the edge of the screen.
- New ship model added (Brigantine). It's a more advanced model than the Ship of the Line as it's split into 3 parts and uses 3 shaders -- hull, sails, and rigging. As an added bonus I've added support for decal textures on the sails of this new ship.
- Added a pirate ship using the new ship model by changing the sail material.
- Added a new game mode (Exploration) -- just sail around with a ship.
- Added wave trails behind the ship in exploration mode.
- Added support for a 360 controller in exploration mode.

Right now the documentation is via the extensively commented code, same as the Space Game Starter Kit. After I'm done with the update for the latter I'm going to focus on creating a writeup of what each script does and how to best use it, and it will be available to read without picking up the package. I'll post another update when that's done.

Adding the ability to shoot cannons would be pretty easy to add, but without the combat system it would be merely an aesthetic change. I'll have to think about how to do it in a way that will be easy for artist-minded people to use.

Features:
- Very flexible combat system (any number of cannons per ship, each cannon can have varying damage, range, recharge time, etc).
- Visible damage on the ship (sails get damaged and ship sinks when destroyed).
- Auto-aim in combat.
- Soft edges shader for trees.
- Various tweaks and fixes.
- Some other things...

Thank you, I did consider how I would like the game to control if it was using touch-based input, but I didn't add this functionality -- in part because the kit will most likely not run very well on mobile platforms (Unity's terrain and UI results in too many draw calls), and some parts won't work well (water reflection wont work). I currently don't have access to a Unity machine with iOS/Android Pro on it, so it's a bit of a challenge for me to add and test this kind of stuff.

Hi, just bought your product Ship Game Starter Kit. I have some problem. The water just stay still and no animation. In web demo I saw the water animate very beautiful and reflect. Is that because I am using indie lisence instead of pro ? or there are some tweak in Water Object ? also ... does this product compatible with iOS and android ? thx

Hi, yes the reflective water shader requires unity pro, and targets PC/mac platforms. iOS and Android would be doable, but some things will need to change (change UI to not use OnGUI, different control scheme, simplify the water shader to not use dynamic reflections just off the top of my head).

If I was to buy this, using the Unity free version, would I still be able to create a game and then publish it? Or does it require Pro to even open up? As well, if I was to then give my files to someone with Unity Pro, could he build it and then would I get the beautiful effect with the water?

You can publish it in the free version of Unity but you won't have the nice looking water. If you give the project to someone that does have the Pro version and they publish it, the water will look like it does in the demo.

You could, sure -- but you will need some logic that will either check to see if the terrain is suitable to place a town, or logic that would modify the terrain to make sure it's suitable. The towns in the kit have been placed by hand as examples.

Hi, yes the reflective water shader requires unity pro, and targets PC/mac platforms. iOS and Android would be doable, but some things will need to change (change UI to not use OnGUI, different control scheme, simplify the water shader to not use dynamic reflections just off the top of my head).

Click to expand...

Hi Aren,

beyond these changes what would be needed to acive 30 fps on the iPad1? Do you have maybe any feedback from customers who used your kit for iOS?

Nope, haven't heard of anyone trying it. I don't know how well Unity's terrain performs on iOS, so it's rather hard to tell. You will also want to change the camera angle so the camera sees less (make it more top-down).

Great kit...I've been working on expanding it to add some more functionality to my game and was wondering if you could point me to where I can modify a few sections in the code.

1.) In the main menu, I'm adding a third button to point to a different player controller/starting point...let's say, a pirate ship. What scripts do I need to attach to the pirate ship to allow the camera to detach from whatever target it has and go to the pirate ship?
2.) I noticed the menu at the beginning is toggle. If I have the menu toggled off (good for developement) where do I put my starting camera position...again, here let's say I wanted to start on a pirate ship. I've been playing around with the Config.cs script but all I am able to do is get the camera to position to a grey screen when detached. I created a...

...and attached my gameObject to it, but still not working right. Figured I missed something. Mainly looking to develop out the pirate side of the game here and can't really do anything until I get control of my camera
3.) What scripts would I look at and maybe what sections, to play around with to modify the trade surplus type inventory. I'll be looking for a way to change what each town starts with and then add the ability to save it...I will do the saving part on my own of course, just need pointing to where to start and find the data. It looks like many of the core functionality scripts are attached to the _Config object. Is this correct? Just needing a little guidance on how you've sort of have everything laid out, so I can go in and play. Just needing the highlights.
4.) Lastly, I noticed in an earlier post...

The way you establish trade routes would change (the way you draw them out of waypoints), but the rest would remain the same. The ship follows a spline of waypoints. It can be linear if desired, and going over land would be a simple matter of sampling the height of the terrain under the unit and repositioning it accordingly as the unit moves. Space would be even easier, although I'm not sure how you would set up your waypoints in 3D.

Click to expand...

...I am also looking to modify how the waypoints work and probably look at adding land and water functionality. Which areas would I look at for this? I could potentially switch the ship container to a mule or something when a raycast detects too shallow water and thus moving to a land waypoint. Also I imagine there is a simple way to change the speed of the ships on the routes...do you have it broken down to the more expensive ships travel faster etc? I know it is just a starter kit, fun things I am looking at playing with.

Thanks for the info. I am posting on here as well as sending you an email. Not sure how much info you want on the forum, but I know I prefer having questions answered on forums so I don't have to answer it twice

1.) In the main menu, I'm adding a third button to point to a different player controller/starting point...let's say, a pirate ship. What scripts do I need to attach to the pirate ship to allow the camera to detach from whatever target it has and go to the pirate ship?

Click to expand...

I've figured this first part out for the most part...I created an emtpy game object and put the GameShip.cs on it as well as my own Controller script. Then created 2 children under this empty game object...my actual game object and a Camera Node, which I basically just duplicated from the original player ship and found I could turn offer everything except the GameCameraTarget and ShipCamera scripts. Then just attach my new player ship to the Config.cs. Next I'm working on loading a 3rd menu option as at the moment I am just replacing the player ship, and leaving only the minimum scripts on it and then building back up from there.

Doh, I was checking my email before going to bed, saw your long post and told myself "I'll answer it in the morning", then forgot all about it.

In regards to #2, as I recall the initial camera position is just where you left the camera. There is also a key that switches between third person exploration mode and the god mode camera strategy mode, so you can look into what it does.

For the trade surplus, check the scripts attached to towns. You specify what resources the town produces and needs on that script, right in the inspector.

You can define what kind of ships you have and their stats. Some may have higher hull capacity, but will travel slower. As I recall I have two in there, and the brig accelerates faster, but doesn't travel as quickly as the ship of the line. You could easily modify that, and add your own ships.

My initial reaction was to go hunting for audio sfx and noises to suit the theme. Noises like swooshing waves, creeking ropes, seagulls, cannons, ships smashing and breaking, chattery markets and swashbuckling sounds -- then I thought you might actually have some of your own that you'd be willing to package up and share/sell?

I thought it would be worth asking seeing the level of detail you've already put into this kit.

I've been having issues with the targeting of the game camera to viewports on multiple Ships. It seems like almost everything is in place for having multiple targets but by default going beyond one strategic and one viewpoint GameCameraTarget gets funky.

I'd just like to point out that the target property of the GameCamera has been the main area of concern. As this is a Starter Kit I can't really say the implementation is wrong but it certainly doesn't feel right.

mTargets.Clear(); was breaking my desired outcome. Removing this line of code fixes my problem and doesn't seem to break the Demo scene but I can't really see why or where this setter is getting set in the first place? GameCameraTarget uses the AddTarget method.

I don't wan't to mess up some design pattern that's in place that I'm just not picking up on, so before I go and make a total mess of the GameCamera (fix it my way) I'd like to know your point of view on this.

It's a great kit but for now I am asking myself why several textures are swapped during import. For example when importing the package the ships' hull is rotated about 180°, same with the towns and the lighthouse whereas the sails... well they look like they are behaving correctly.

Anyway I am still using Unity 3.4 so what could cause this mysterious uv misbehavior?