• Register

The Shadow Envoys are back—they never left! Take command of your strike fleet and brave marines on an epic, turn-based tactical campaign to discover the real truth behind the demise of colony MC83-A, and protect Humankind from an ancient, unimaginable alien threat. USC is back with a Counterforce featuring in-depth, complex game mechanics, modern graphics, various game modes and endless high-stake missions.

Post news Report RSS Map randomization process

Let's take a look at how maps are generated in USC: Counterforce with our random map generator and its rules. The map generator is tailored to create specific maps based on mission parameters, but also on the layout descriptor to define room size, population or item placement, for example.

Posted by on

Hey Marines!

As you’ve been exploring the planetary body M-8322, you have noticed that the map changes with every deployment. USC: Counterforce features procedurally generated maps and missions. But what does this mean? What can you expect when playing the different game modes? In this article, we’re going to answer these questions, and also take a look at more nuanced technicalities for the acute soldiers who enjoy knowing how this all works.

First off, every single mission you play in the game is procedurally generated—at least the map you’re playing on. We use our homemade random map generator (RMG) algorithm tailored to fit the exact needs of the game to do this. But random doesn’t mean "uncontrolled". Specific map and mission parameters are fed to the RMG as invariables, as rules that need to be satisfied under all conditions. But whatever is not "fixed", will be randomized. So, for example, a Single Mission with the objective "Reach extraction point" will always have insertion and extraction zones far away from each other, but otherwise, the layout of the actual map will be random, including which corner of the map those zones are in. In missions during the various Operations, more rules are enforced: we can tell the RMG to "seal off" complete areas of the map by making impassable walls and narrow connections, or we can control where buildings should be on the surface, etc.

But there’s more to it than the layout of the map. Objects, items, and even aliens are placed randomly. Of course, the placement algorithms for these elements also follow rules. The total number of aliens (per species) is controlled by the difficulty level and other parameters, but the exact composition of the horde (Alphas, Betas) is randomized, as are their starting locations on the map. The items you can find in crates during a mission are also random, but we use "loot tables" for different room types to determine what kind of equipment you can find in a crate you open there.

Now let’s see how this works a little bit closer, so you can get an idea of the depth of randomness and control we can use already, and in the future in new game modes. The map generator works in multiple passes, and we can exert constraints or randomization separately in all of these.

Pass 1: Layout descriptor

This is a lot of data that describes various properties of the mission and the map, including objectives, environment, etc. At this point, we can already use randomization for almost all parameters (size, time of day, number of nests, position of starting zone, etc.), or specify the ones we want, selectively. This means we can use the system either to make a very specific mission or a completely random mission with a few selected fixed properties.

Pass 2: Layout generator (RLG)

Based on the rules and settings in a layout descriptor, the RLG creates a logical map layout that adheres to all specified rules, and other invariants (like all parts of the map should be accessible via a door, etc.). Mind you, this is not yet a map! It contains data about nodes that have connections with each other, join into bigger rooms, or are excluded from the effective map area. At this point, we can check and ensure the general properties of a map without dealing with, say, 1024 or more grids directly.

usc randomization pic01

Pass 3: "Inflation"

The layout is converted into an actual map made of grids based on specific map parameters. At this point, we can use the very same layout to create a map with small rooms and narrow corridors, or one with bigger rooms and wider corridors, while logically it is still very similar to the first one. In the picture below, you can see the same layout resulting in different maps due to a different "room size" inflation setting:

usc randomization pic04

Or we can instruct the generator to make all walls single-width, which not only results in another kind of layout, but also greatly differs gameplay-wise (aliens can break through much sooner, etc.). In the picture below, you see a map with this sort of layout. You can also see that the extraction zone is placed in the opposite corner from the insertion point—all other elements are randomized.

usc randomization pic03

Connections are also converted into doors with many randomizable properties (single or double, locked, hardwired, etc.). Specific environments (for example, mines and caves) have other special rules that modify how the actual "rooms" are processed—for example, protruding wall segments can be placed in addition. In the picture below, you can see some of these extra features.

usc randomization pic02

Pass 4: Population

This process has many sub-passes to ensure everything is put where it needs to be. Floor hazards, static and usable objects, generators, nests, service tunnel hatches, and finally, aliens and marines. Placement rules for each type of thing can be overridden or extended (for example, a few extra item crates with specific items are placed in a specific region of the map, etc.).

Balance in a game like USC: Counterforce is one of the most important things, and one crucial factor in creating it is the very map you play on. We think randomness brings a lot of uncertainty, tension, and replayability to the game, but it’s also important to "control the chaos" to some extent. We’re constantly iterating on these aspects of the game during development and continuously adding new elements, so you can expect even more interesting scenarios and death traps!

Now that you know the behind-the-scenes details of the maps you've been exploring, this will help you come up with new tactics to assess the battlefield!

The USC: Counterforce

Post a comment

Your comment will be anonymous unless you join the community. Or sign in with your social account: