Videos

The AI of Sea of Thieves

A four-part series exploring the AI systems behind the game.
Featured Video Play Icon

Tommy Thompson of AI and Games has just released the final video of his four part series on Sea of Thieves.

Thompson interviews some of the programming team at Rare, and covers subjects like enemy AI, quests and voyages, pathing in Unreal Engine, and much more.

You can watch the whole series here.

For posterity, here are a few points of interest from the series:

  • Only skeletons, pigs, chickens and snakes are controlled with Unreal’s built-in AI framework; for everything water-based, Rare had to custom-build support by extending Unreal via access to the engine’s source code.
  • Voyages (islands, bounty targets etc) are procedurally generated at purchase time from each trading company, within a set of constrained parameters.
  • Skeletons largely use identical movement and animation assets as playable characters. Technically they could run, jump or swim if told to do so. Even key actions at given points – like eating a banana during battle – are triggered by firing “controller input” in code, rather than executing unique “skelly-only” code. One onboarding task for new AI developers has been to gather a group of four skeletons in one place and get them to all start playing musical instruments together – anything players can do, skellies can do.
  • Sharks use a custom navigation framework that feeds back into Unreal. (For more detail on how the shark AI was built, watch this talk from Andy Bastable at Unreal Fest 2018).
  • When kraken tentacles attack a single player, the AI controller (named “Overlord”) sets a cool-down timer, ensuring the same player isn’t directly targeted too often during an encounter.
  • There is no cool down, however, on the number of times a ship can be attacked by the kraken on any given server.
  • On skeleton ships, the ship has its own AI for sailing, however the ship’s captain acts like a toggle for the steering ability. If the captain is removed from the wheel the ship no longer steers (even though the captain was never technically steering the ship in the first place).
  • AI enemies use navigation meshes in Unreal to move around the world. These are either baked in to the environment, or calculated on the fly depending on changes in terrain (like debris blocking a path). But navigation meshes themselves don’t move. This means in order to enable skeletons to move around onboard skelly ships while sailing, Rare had to create a fixed nav-mesh (that exists hidden deep in the sea) that translates directly to the ship decks in real time. It’s an interesting and somewhat elegant solution to handling nav-meshes that sit on a object that gets pushed around by physics.
  • The automated testing infrastructure handles the bulk of the extensive testing required when introducing new code to the game; internal testers often focus on polish and experience; while the Insider group gives feedback on the game in a broad sense.

Related: Check out this article from 2018, by Rare engineer Jessica Baker, on the math that powers cannon Skellies: Secrets of the Skellybrain.

If you’ve ever played Sea of Thieves, the game I’m working on as an engineer at Rare Ltd, you may have run afoul of skeletons firing cannons at you while you sail past an island, minding your own business. One of the first pieces of work I did here at Rare was programming the algorithm the skellies use to aim the cannon and provide a sense of emergent danger for players. In this article I’ll give you a peek behind the curtain at how we’d build up the moving parts of a gameplay feature.

fiber_manual_record

The latest