Ahoy again, my fellow seafarers!
Welcome to Ships and Scurvy GameDev Diary 7. Once again, it’s been a while – though I put that down to communication on the high seas not being particularly swift!
Since the last game dev diary, I’ve been hard at work focusing on building the many islands in the game. At its very heart, Ships and Scurvy is a game of exploration and adventure. The beauty of making an ocean based RPG is you can quite quickly build a huge world. The ocean covers 95% of it, but you populate it with islands and you can create a seemingly huge world without having to spend months and months detailing it.
That’s not to say there will be long boring stretches of empty ocean – nobody likes that. I’ve started to add a stack of sea monsters and swarms of fish that swim around – you can try to fight them if you dare. I’m going to implement large transparent floating ‘X’ marks on the ocean – stop here and you might catch a rare fish or find some sunken treasure. Bits of flotsam containing wood, wreckage of ships and mysterious bottles will float around the currents. Combine this with the hundreds of ships in the game and special text events and every day will be full of interesting happenings.
The ocean itself varies between 100,000 pixels and 250,000 pixels in width/height at the moment. I haven’t locked down a final number, I have to play with the game a fair bit more to try and achieve that balance between voyages feeling like they’re not super fast and also not feeling like a chore. I’d ideally like for it to take 30 seconds to a minute to sail from one island to another – any longer and it starts to get boring.
Time for a quick bit of maths: If you consider the average screen width of a device playing the game is roughly 1024 pixels, and a fast ship travels about 200 pixels a second, it would take 5 seconds to navigate it. If the entire ocean is 100,000 pixels wide, it’d take 500 seconds, or about 8 minutes to sail the length of it. In terms of a little casual RPG, that’s a fair distance. It creates a sense of wonder and exploration, but not so much that the game feels insurmountably big.
So, no ocean is complete without islands! Back in the second dev diary, I actually detailed how I created and placed islands in the game. They were nothing but images in a grid back then. The ship would reach them, then have to turn around because they did nothing. Several months later, I’ve finally reached a point where I could populate and detail them. It’s a seemingly easy process on the surface, but like most things in game development, is more complicated than that.
Let’s go through the process how I create an island in the game. Each island needs:
- A name. This name usually comes from one of the events in the island’s adventure scenario. For example, an adventure scenario where your crew run into a herd of stray blue cats naturally leads me to calling the island something like “Azura Felis’ . I tend to lean towards bastardised Spanish/Latin sounding names like “Isla” or “Volcanum” because it kind of lends itself to the theme of the game – the Spanish and Portuguese journeys of great exploration were a huge inspiration in developing this game.
- A location. This is an X and Y point on a map, somewhere between 0 and 100,000 ( or whatever the final map size is). I have designed the game so the starting island our hero washes up on is at the very center of the map, and I wrote a little bit of code that spawned islands at increasing distances from that point, further and further out at a random angle. So it almost looks like a spiral galaxy. From there I then move these islands around a bit to randomize it, check to make sure no islands are touching, and then I assign a number to each island.
- A difficulty level. This is a subtle one. Why would an island have a difficulty level? The reason for this is actually to create a world that feels dangerous and has a sense of danger. Games like Skyrim scale their difficulty as the player’s level improves, but I don’t think that suits a game of exploration like this. You need to feel trepidation when landing on a mysterious island – will you face a tribe of pygmies? Or perhaps a 50 foot gorilla? The difficulty level is assigned for each island , and any battles that might be fought on this island will be scaled to that level.
- An adventure scenario. Each adventure contains a ‘choose your own adventure’ style scenario in which the captain and the crew explore the island, encountering mysterious situations, hostile tribes, fantastic beasts and so on. An adventure can be attempted at any time on an island, except it can only be completed once per island. If you decide to run from the herd of giant fluffy kittens, you don’t get a second chance to go back and try again until you start a new game.
- Resources. There’s currently about 150 resources that can be collected in Ships and Scurvy, everything from rice and bananas to whiskey, jewels and rare gems. Each island contains a number of these resources that can be mined/harvested in activities. I haven’t yet decided whether these resources will ever become exhausted or not – this will probably be a design decision further through the build. I’ll detail each resource a bit further below.
- Activities. Each resources has an associated activity. Gold can be mined, wheat can be harvested and so on. Depending on the resources allocated to each island, little icons will appear on the island to show that an island can be mined, its waters fished or its animals hunted. There’s currently up to 10 activities that can be completed on any island, but most islands will have 3-4 activities depending on its resources.
So, as you can see, there’s a lot to do for each island! Here’s a screenshot of an island showing a few activities that can be attempted.
I’ve written some code that automatically allocates resources to each island so I didn’t have to do it manually. The pseudocode for this is pretty simple. For each island I wish to create:
- Generate a random number between 1 and 100
- Pick a random resource. See if its hidden rarity value is less than the number rolled. If so, add this resource to the island. This way, common items like fresh water, grain and wood will appear on most islands. Rarer items like silver or exotic fruits will appear much less.
- Repeat this scenario up to X number of times per island, guaranteeing each island will definitely have at least a few items to find.
Each resource has a number of properties, as hinted at above, and is grouped into either a consumable (such as beer) or a non-consumable (such as cobalt). Let’s take a quick look at two such items. Both items contain common properties such as those found in the non-consumable item cobalt.
// non consumable
rObj.itemDesc= “One of your sailors remarks that he has killed plenty of cobalts and goblins in his day. You suspect he means ‘kobold’ but don’t have the heart to tell him.”
rObj.itemWeight = 10
rObj.consumable = false
rObj.itemDesc=”Beer: The number one reason dugongs get mistaken for mermaids.”;
rObj.nutritionValue = 0;
rObj.consumable = true;
When you perform an activity on an island, there’s a random chance you’ll find one of these items, and you’ll see a popup such as the one below:
Anyway, that’s it for this week. Next up, we will be concentrating on the ship herself – feeding the crew, repairing and maintaining your vessel, and dealing with the ever-present threats of mutiny and scurvy.
It is a long and often difficult process to build a large game as a solo developer, but I’m as always grateful for the interest from the community – thanks for reading and being a part of it. We shall get there, and what an adventure we will have!
Cheers and happy journeys!