1. Brigador Killers
  2. News
  3. "Randomness" in Brigador Killers

"Randomness" in Brigador Killers

[p]Before we get to the post - it's time for another MAVS track from the Brigador Killers OST titled "Where's the Beef".[/p][previewyoutube][/previewyoutube][p]If you have already played the Garage Build or the recent Fabricator Build, this is the track that plays during the Dromon sniper fight after you make your way through the Villa or Undercity mission. Now onto the post.[/p][p][/p]
A new layer to map making
[p]A while ago we looked at some of the map making features of Brigador Killers and it's high time we returned to the topic since some new things have been used extensively for Brigador Killers.[/p][p][/p][p]Our game uses a program called Tiled to make its levels. Tiled is a free and open source WYSIWYG editor used by many games to make maps or levels. We also used it for the first Brigador - and we have been able to add more features to the version we use for BK. One of those features is present in one of the new early missions in the current Itch build, which is called Crow's Field. This level mostly looks like this zoomed all the way out in the game (click to enlarge).[/p][p]Now, because there is now a penalty to the player dying in the recent build, the intention behind Crow's Field is that the player can always go into this level empty-handed to grab some low tier weapons, ammunition and parts for the garage with little to no risk.[/p][p]To keep things fresh, Crow's Field's overall layout changes slightly every time the level loads. Take this initial part of the map just left of the middle. It may appear with a bunch of junk barricades…[/p][p]It might appear with a bunch of concrete barriers…[/p][p]Or it might have no barriers at all.[/p][p]Moving to the northern part of Crow's Field around this destroyed building, a box might appear in one of three places. You might find this box in front of the building…[/p][p]You might find it to the west of it…[/p][p]Or you might find it in the corner behind the building.[/p][p](Those of you scrutinizing the images above carefully may also have noticed slight differences in rubble arrangement.) [/p][p]So what's going on? If we look at this section of the Crow's Field map over in Tiled with most of the map layers turned on, we see the following.[/p][p]Placed on the map are two blue icons and a purple icon, which are the spawn locations of the boxes mentioned earlier. The blue boxes contain parts, which are used in the Fabricator back at the garage. Meanwhile the purple box contains ammo. Other box types exist, but more on that later.[/p][p][/p][p]In the context of Tiled, these item boxes are called objects and are located on what's called an object layer (a list of the map's layers are visible in the top right of the image). Objects are typically things like enemy spawns, item boxes like these, and anything else the level designers would want to freely place independent of the underlying grid of tiles.[/p][p][/p][p]The other main type of layer is a tile layer. Since the map is on a grid, we use that grid to snap down building props or ground tiles that look like dirt or gravel and the like. If we return to the barricades area, this is what that area looks like with all the possible tile layers visible in that area.[/p][p]Seen in this image are both the concrete barriers and the junk barricades, but in-game they are not visible at the same time. The reason is because of a third type of layer, called a group layer. Functionally, a group layer is like a folder that you can put other layers into (even another group layer if you like). Looking at the layer list a little more closely…[/p][p][/p][p]These barricade tile layers are labelled barricades A, B and C and they are located inside the "barricades left" group layer. What is special about this group layer is it has a custom property string called enable_if with the value of __CHOOSE_ONE__. What this means is when the level loads, the game chooses one of those layers to load for that area, and that's what appears on the front end to the player. In other words, there's a one in three chance of seeing one of those barricade setups in that area when you enter Crow's Field.[/p][p]
In addition, just like with different object or tile layers, the contents of a group layer folder don't need to apply to the whole map, they can just exist within a specific area to suit the designer's intentions.[/p][p][/p]
Item variance inside boxes
[p]Returning to the Crow's Field boxes mentioned earlier, when the player opens up one of those boxes, they may see the following contents…[/p][p]If the player returns to the level and, assuming the level rolled the same box position as before, the contents might instead look like this.[/p][p]Now remember: the positions of these three boxes are static in the Tiled editor. In addition, they all have the same inventory .json file attached to them, so how can one box produce different results? The answer is by opening up the inventory .json file, and taking a look. This specific inventory file is called salvagechest_parts_t0_sm_01.json, and this is what's inside.[/p][p][/p][p]To translate the above, there are eight possible things that can appear inside this box, and they are:[/p]
  • [p]100% chance for five simple parts (maximum of seven)[/p]
  • [p]20% chance for two armor parts (maximum of three)[/p]
  • [p]20% chance for one small battery (min. and max. values are the same)[/p]
  • [p]50% chance for two small actuators (maximum of three)[/p]
  • [p]20% chance for one small engine (min. and max. values are the same)[/p]
  • [p]40% chance for one small gimbal (maximum of two)[/p]
  • [p]65% chance for two small hardpoints (maximum of four)[/p]
  • [p]90% chance for one jerrycan of fuel (maximum of three)[/p]
[p]In other words, this is a loot drop table. This kind of thing isn't exclusive to just the contents of boxes - anything that has an inventory like an enemy NPC or a vehicle can have loot tables. Corvids might drop with a good chunk of ammo. Civilians might have a lot of credits on them. The backseat of a cop sedan might contain a shotgun. Knock over a mobile trash collecting Froggy and you might be surprised what they've vacuumed up.[/p][p]
All these loot drop tables on all these things are entirely authored by the designers and, if we're doing it right, the player shouldn't get too tired from picking through the same levels again, because there's just enough of a chance that it'll be different the next go around.[/p][p][/p]
Delivering a narrative payload on top
[p][/p][p]Our designers can also sneak in some narrative wordlessly through the use of group layers to roll different locations of enemies, crate spawns and building props. A good example of this is in a later map called Vilutian Promenade, which looks like this zoomed all the way out.[/p][p]In the middle of the map at the right angle turn of the road, there are three potential appearances. This area is either clear…[/p][p]Occupied by a heavy police presence guarding a large weapons crate…[/p][p]Or that same police blockade but the large crate is gone and instead it's strewn with corpses and there are now Corvids about.[/p][p]The idea here is, when the player revisits this level, they get the sense that some kind of turf war has taken place between these two factions, though the player is never told explicitly. You may know this phenomenon better as "environmental storytelling", which is when a level's physical layout is used to tell a story, instead of a wall of text, as if to evoke the question in the player's head of "what happened here?"[/p][p][/p][p]We don't intend to directly answer that, at least not in the sense of "What are they fighting over?", but in the sense of what level design tools were used? It is nothing more complicated than crafting different arrangements of props and enemy spawns, and letting the game pick between those layouts.
[/p]
The reasoning behind all this
[p]By having slightly different level layouts, a variance of loot that can appear in the inventories of boxes or vehicles, and different things dropping from enemies, we expose the player to what we think is a healthy amount of what's sometimes referred to as "volatility". Volatility is a word that refers to the frequency of rewards a player can get from play. [/p][p][/p][p]If volatility is too high e.g. a single crate that might appear in one spot but it has the most powerful end game weapons in it, then you end up with a scenario where play is ultimately trivialized because any sort of challenge disappears and so does the player. The opposite problem exists when volatility is too low, such as having the same crummy things always appearing in the same places. Creating situations like that is how you end up with players repeatedly farming those locations until they inevitably get bored and quit, because that's not a compelling form of play either. Trying to find the amount of volatility that is "just right" is not an easy task.[/p][p][/p][p]Fortunately, we now have the ability with our map making tools to sprinkle volatility across levels in Brigador Killers in even patches. In addition, all the data behind various inventories is hand authored and tiered according to a set of difficulty ranges. Ultimately the goal behind this design philosophy is that after a prolonged session of play, the player ends up neither feeling like they are on a flat treadmill, nor banging into a wall, but on a power fantasy ramp gently taking them upwards.[/p][p][/p][p][dynamiclink][/dynamiclink][/p]