How Scavengers offloads AI

Midwinter Entertainment’s Scavengers game was developed using the SpatialOS GDK for Unreal.

Image: Scavengers offloads NPC AI onto a dedicated AI server, reducing the load on the main server

Main server

Out of the box, the GDK is set up to start one server when you run your game. This main server computes all Actor types across the whole game world.

You can set up additional servers to load balance the computation. There are different ways to do this: offloaded servers, zoned servers, and a combination of both. Scavengers uses offloaded servers.

Offloaded server

When you set up offloaded servers, you divide the compute load between the main Unreal server and one or more additional “offloaded” servers. Each instance computes one or more sets of Unreal Actor types across the whole game world.

You can use these offloaded servers to handle computationally expensive but latency-tolerant systems, such as AI decision-making. This leaves your main server to run other game systems at a larger scale.

AI

Scavengers uses an offloaded server to handle groups of AI. The offloaded server is separate from the main server which handles everything else (for example, player connections and physics).

This frees up the main server and enables the offloaded server to handle more AI computations than would otherwise be possible with a single native Unreal server.

By offloading their AI system on to an additional game server, Midwinter increases the number of NPCs and players per session to 60 players at a 5:1 ratio of complex NPC to player. This allows Midwinter to design a game where clusters of players and NPCs are simulated at varying density across the entire game world. This is key for their vision of a rich mix of PvE and PvP gameplay within a hostile living world.


Last edited on: August 4, 2021 (4b6e3975)