GDC Logo

Deep Dive: How Black Salt Video video games designed Dredge’s spatial inventory

Posted on

Sport Developer Deep Dives are an ongoing assortment with a objective of shedding gentle on specific design, art work, or technical choices inside a on-line recreation to have the ability to current how seemingly simple, primary design alternatives aren’t truly that simple the least bit.

This textual content was written by Joel Mason — programmer, writer and co-designer at Black Salt Video video games, a model new, small, studio of 4 from New Zealand engaged on our debut recreation Dredge, a sinister fishing journey.

In January of 2021 we began prototyping Dredge, our cosmic-horror impressed fishing recreation. Throughout the first iteration, you’d sail over to a spot effervescent with fish, press an interaction button, and a “+1 Fish” notification would pop up. You’d try this for a while, after which return to a dock to advertise your fish.

This was terribly boring.

We would have liked to do one factor with our inventory system. In a recreation a number of fisherman dealing with their cargo keep, we knew that Inventory Administration — whereas it might be the dullest sounding Steam tag available on the market — wanted to play an enormous half. In the end, it develop into the core mechanic for our recreation.

On this text, we’ll stroll via how our in depth spatial inventory system works, then dive into the cautionary tales of design ramifications that it had for our recreation.

What’s a Spatial Inventory System?

Spatial inventory applications revolve throughout the notion that stuff occupies home. We’ll ignore applications harking back to Skyrim that merely add merchandise weights in the direction of most participant encumbrance, as they don’t concern home.

Really, a spatial inventory desires merely 2 components:

  • Home.
  • Stuff that matches into that home.

Players can place devices into the home, selecting up, re-arranging, and sorting devices as they please. In Dredge, our home is a grid.

A container filled with fish, represented by a 6 by 5 grid occupied by fish that take up two tiles each.

Why a Spatial Inventory System?

At its root, spatial inventories are supposed in order so as to add willpower elements for avid gamers. Objects should be weighed up in the direction of others, and counting on the participant’s current state of affairs, one may be additional applicable than one different. There’s an inherent value-density calculation that avid gamers can perform – and eventually obtain mastery in that analysis means.

The above image of normally shaped mackerel in a normally shaped grid is…nonetheless pretty boring. What if devices had been completely completely different sizes and types? What if that they’d completely completely different values? What if that they’d completely completely different hottest positions?

We’ll pretty shortly make our definition of a spatial inventory system additional refined, and way more thrilling. It may be comprised of:

  • A grid.
    • (Non-compulsory) The grid may be an irregular kind.
    • (Non-compulsory) Cells could accept a number of varieties of stuff.
  • Stuff that matches on the grid.
    • (Non-compulsory) The stuff may be completely completely different sizes.
    • (Non-compulsory) The stuff may be irregular shapes.
    • (Non-compulsory) The stuff could should be subsequent to / away from completely different stuff.

Working Occasion

So, let’s stroll via how we use this all in Dredge.

First, we start with a main grid. It’s a 7×9 grid, with some specific cells.

  • On the corners, there are some unusable, clear cells which you’ll be able to’t even see.
  • On the bottom are some cells the place engines might be positioned.
  • To the sides are cells the place fishing gear might be positioned.
  • On the prime are some cells for lights.

A 7 by 9 square grid. Six spaces in each corner are inaccessible to players. Seventeen squares are marked by special symbols.

So we’d anticipate a participant to populate their inventory with the subsequent objects of equipment:

  • A variety of rods on the sides to allow them to catch a number of varieties of fish.
  • Some main lights and engines to allow them to maneuver and see via the fog.

The same 7 by 9 square grid, now with fishing rods, lights, and engines occupying 1/3 of the spaces.

And we might anticipate day’s fishing to finish in a catch that seems like the subsequent:

The same 7 by 9 square grid, now compltely filled with two types of fish in addition to existing fishing rods, lights, and engines.

Participant firm is important. In Dredge, whereas gear can solely be positioned on devoted attachment elements, fish (and completely different non-equipment devices) might be positioned wherever – even over empty attachment elements. So, there are alternatives that could be made:

  • You would presumably depart a number of of your rods in storage on the dock, reducing your fishing velocity and expertise, nonetheless making additional cargo home.
  • You would presumably promote a number of of your engines, making you slower, nonetheless as soon as extra, liberating up extra room.
  • You would presumably forgo lights completely, nonetheless you’d larger get once more sooner than darkish…

A participant could decide to take some (or all) of these risks, resulting in a additional worthwhile catch of:

The same 7 by 9 square grid, now with only one fishing rod and engine but filled to the brim with even more fish

Equally, you would possibly choose to spend cash on some upgraded hydraulic rods, allowing you to catch some additional invaluable species like sharks or stingrays.

The same 7 by 9 square grid, containing equipment that takes up more space. Large fish occupy the rest of the space

Nevertheless the ocean is unpredictable, and by no means every day goes to plan. You could get misplaced inside the fog and run aground – taking damage to your engines. Or a creature from the deep could blindside you — inflicting that prized shark to fall overboard.

The 7 by 9 square grid storage space, with some missing fish and a large X marking a space that cannot be used.

In Dredge, your inventory will also be your nicely being bar. Hurt occupies bodily home, damaging or destroying devices and stopping new ones from being positioned there until the damage is repaired. Fish might be misplaced overboard, and equipment can malfunction. Take an extreme quantity of damage to your hull and you might slip beneath the waves for good.

Now we have talked about alternatives avid gamers may make with the grid we’ve given them — nonetheless what if they might customise their grids? It’s the proper various for upgrades to swimsuit into the core loop. These allow our avid gamers in order so as to add additional slots for rods, engines, and further.

An upgrade tree allows players to customise their spatial storage. The pictured upgrade adds 4 additional spaces near the hull.

There’s moreover no trigger that merchandise placement should be restricted to the participant’s private inventory. A pure place for it is in shops — it’s an effective way of representing a retailer’s stock. As an alternative of distributors having a finite amount of money with which to buy your stuff, they may be restricted by whether or not or not or not they’ll even fit your devices in the least bit.

A traveling merchant sells fishing gear and purchases the player's fish.

Otherwise you would possibly use it in environmental puzzles. Placing a positive set of issues in a particular configuration may be the vital factor to unlocking some forbidden secrets and techniques and strategies…

A puzzle requires players to organize L shaped blocks of fish into a certain shape.

It will not be obvious from the nonetheless pictures, nonetheless the act of packing your inventory successfully is (in step with our playtesters) “pleasing.” There’s a specific sense of satisfaction gained from slotting a plaice into the appropriate place. And as soon as extra, there’s potential for mastery in planning ahead and leaving a correctly-shaped home for the fish you might even see on the horizon.

Bringing It Collectively

So we’ve merely illustrated the facets of our inventory mechanics. To summarize the above, we have a list that encapsulates the subsequent standard applications:

  • Merchandise Storage (it holds devices)
  • Participant Properly being (it might presumably take damage and inconvenience the participant at low nicely being)
  • Participant Talents & Stats (it provides the slots for gear loadouts)
  • Upgrades (avid gamers can customise their grids)
  • Retailer Inventories (distributors can solely keep so many devices)
  • Inventory Administration Gameplay (it’s pleasing to maneuver stuff spherical)
  • Environmental Puzzles (supplies depth to discoveries)

Lessons Found

Okay, so the above examples are kinda cool (on the very least, cool for an inventory administration recreation). Nevertheless sooner than you go away and start working spatial inventories into your total video video games, let’s focus on a number of of the knock-on design problems we’ve run into with ours.

Merchandise Placement

At the beginning, if we’ve decided that merchandise placement is important, we should always all the time make it the participant’s responsibility. You presumably cannot place an merchandise for the participant. Correctly, you might, nonetheless it may be a little bit of bit like opening your entrance door and discovering an sudden couch in your hallway. It’s in a foolish place, and in addition you’d marvel who’s been in your house.

This immediately has some ramifications for choosing up devices. Whether or not or not it is catching fish, discovering treasure, or being given a necessary quest merchandise, the participant needs to be given a chance to rearrange this new merchandise into their cargo as they see match. This means an entire lot of potential stopping and starting, which can interrupt the circulation of gameplay. Your recreation has to swimsuit this in all probability gradual cadence.

Quest Objects Are Explicit

I merely talked about quest devices. In Dredge, people will incessantly offer you devices for quite a few causes. Primarily essentially the most main occasion of this could be a bundle deal that should be delivered. So we work together in dialogue with a quest giver, who then shoves a bundle deal into our palms. What happens if we’re full of eels? Our boat, that is. Do we have to toss eels overboard until the bundle deal fits? That appears as if a punishing reply — how had been we to know from the outset of this dialog that we may be required to discard our hard-caught, slippery revenue?

The participant needs to be given the possibility to refuse the merchandise — on the very least, briefly! This means new dialogue needs to be written — an “Oh, you don’t have any home for it now? Nevermind, come once more later.” type of deal. Then on the alternative facet, as quickly because the participant has provided all of their eels to the native fishmonger and they also return for the bundle deal, additional quest logic needs to be utilized to play some additional distinctive dialogue for an “Oh, you’re once more for the bundle deal?” line. And naturally, these additional traces and flows should be examined and localized.

Quest Objects Are Not Explicit

So, about that bundle deal…Take into accout as soon as I confirmed you the way in which your inventory can take damage? And the way in which it could ‘hit’ devices in your inventory, in all probability destroying them? Correctly, you might be contemplating that quest devices (and the cells beneath them) are immune from damage.

Dredge has a bunch of quest devices. Not an obscene amount, nonetheless enough that, if key devices had been invulnerable, you may need a very laden boat of quest devices performing as an invincibility defend. We didn’t want this.

In Dredge, most key devices might be destroyed. Not just by an unlucky collision with a rock each; avid gamers can discard people’s packages, distinctive devices, and even…

A boat's grid-based inventory, where a person labeled

Positive, we allow avid gamers to lose or ‘discard’ key devices, even once they’re characters who’ve hopped on board on the promise of protected passage. Quests and their outcomes change primarily based totally on these events. It’s brutal, but it surely absolutely’s part of giving avid gamers full administration over their inventory and making avid gamers actually really feel chargeable for the integrity of their vessel.

The canine is invulnerable, though.

A sleeping dog occupies the central 4 spaces of a ship's grid-based inventory system.

Scorching Swapping

Whereas rearranging devices, avid gamers will pretty usually be holding an merchandise and have to swap it with an merchandise beneath it. Supporting this efficiency is totally vital to avoid participant frustration.

Going extra, what if avid gamers are holding an enormous merchandise and attempting to place it extreme of various smaller devices? We cannot do a 1-for-1 swap. It’s a lots harder downside. Some potential choices are to:

  • Give avid gamers a brief lived placement grid by which to put devices.
  • Allow the larger merchandise to be positioned, after which retailer the various smaller devices on the participant cursor, prepared for placement.

Quick Exit

Rearranging devices moreover has one different pitfall. If the participant is presently holding an merchandise and about to place it, do you proceed to allow them to exit their inventory? There’s simple logic that claims “Sure, permit them to exit, and easily place the merchandise once more to the place it received right here from.”

Sadly, that logic doesn’t keep up if in case you may have merchandise swapping. The issue they’re holding may need merely been modified – there are no free cells for it to return to! Do you throw it overboard on their behalf? Do you try to robotically place it for them?

Controls

Dealing with the grid is just one different issue to indicate people. Because it is not a ubiquitous mechanic, it’s unfamiliar to some. No matter having huge tooltips displaying which you’ll be able to “Rotate” this merchandise, quite a few avid gamers is just not going to study this, and it might presumably take quite a few inefficient fishing voyages sooner than they decide it out. You presumably can help people out by:

  • Pre-placing some devices at completely completely different angles to indicate that devices might be rotated.
  • Designing grids and devices in methods wherein encourage rotation and tessellation by along with corners and awkward shapes.

With out some additional work to help the participant alongside, transferring devices spherical with a controller might be a clunky course of too – notably if the participant is transferring devices prolonged distances or between completely completely different grids. You presumably can current some assist proper right here:

  • Give avid gamers a “Auto Switch” button that robotically places the merchandise into the alternative grid. No guarantee of intelligent or optimum placement, nonetheless that seems trustworthy, given the participant has taken a shortcut.
  • Give avid gamers a “Swap Sides” button that places their cursor into the middle of the alternative grid (or perhaps at a sound candidate location), then letting them regulate and make sure the final placement.

Visibility of Knowledge

A draw again of visually laying out a participant’s inventory is that it makes it powerful to point particulars of specific individual devices — there isn’t a concise itemizing of stats and values.

I mentioned beforehand that we have got tooltips. These current all of that detailed information that avid gamers are missing out on; that is an occasion of 1 in Dredge:

A tooltop displays the durability and capacity of a crab pot held in a ship's inventory.

Can you see the problem? If I have to re-arrange this crab pot, I have no idea what the left-hand facet of my inventory seems to be like like, on account of the chosen merchandise’s detailed information obscures a number of of the spatial information of my grid.

Some choices:

  • Make smaller tooltips.
  • Maintain the tooltips off the grid. This reduces the moment affiliation between the merchandise and the tooltip (because it is not instantly related to the merchandise), nonetheless would seemingly be nicely definitely worth the tradeoff.
  • Discuss vital information by the use of merchandise image states. For example, in Dredge we’re planning on making latest fish glisten with water droplets, or giving rotten fish stink traces. This offers useful information at a glance with out the need to hover to study the tooltip – nonetheless too a lot of these would possibly end in seen litter.

Stability

This ultimate one type of goes with out saying – giving devices bodily dimensions supplies one different aspect to stability. Not solely must your shapes be attention-grabbing and diversified, nonetheless it is important to guarantee that avid gamers are nonetheless ready to bodily keep the objects you want them to on the correct time.

In our case, if we wish our avid gamers to be transferring at a positive velocity by the purpose they encounter a positive creature of the deep, we’ve to ensure we’ve given them the possibility to assemble their boat’s grid big enough to hold enough engines.

Conclusion

Will we embody a spatial inventory system in our subsequent video video games? It depends upon.

I don’t think about they’re applicable for every recreation. I really feel the game has to produce plausible pauses inside the movement for the participant to be in the very best mindset for a bit little bit of inventory rearrangement.

To utilize an occasion, Tarkov [a hardcore FPS], moreover makes use of a spatial inventory system — but it surely absolutely’s onerous to actually really feel such as you may need the freedom to optimize your inventory (and obtain satisfaction from that glorious optimization) when you’re in near-constant hazard. In distinction, it’s narratively pretty acceptable for our participant character in Dredge to take a second to maneuver some mackerel about.

From the outset, we truly did not foresee all of the design challenges we’d face with our spatial inventory. Nevertheless as a result of it sank its tooth deeper into our core loop, we knew that the issues had been all nicely definitely worth the effort to resolve.

On the end of the day, few recreation mechanics are with out flaw. And we didn’t received all the way down to make the appropriate recreation. What we do try for, however, is to point you one factor you haven’t seen sooner than.

I’ve by no means delved into the fairly superior technical facet of points on this text; for individuals who’re curious or to ensure that you a few pointers, please attain out to me @bsg_joel.