For this month were going to explain how the Brigador Killers engine handles the emission of gib sprites from entities during gameplay. In other words, this.
Weve established in previous news posts that all youre looking at on screen are flat 2D sprites and that BKs systems can overlap in interesting ways to create unexpected outcomes, but we havent touched on the data end of these things.
First off, to save on space, both the Brigador and the BK engine store all assets in a large collection of compressed data called a pack file which has the exciting name of assets.pack. By using the games debug panel, we can look up these assets via the Pack file tab. At time of writing there are roughly 19 thousand assets categorized into 60+ different resources. Sometimes these assets are .png image files (such as the various sprite sheets for all the building props and characters) but a large portion of them are JSON files which allow us to specify the values of all sorts of various things in a human readable manner. Most of the screenshots in this post are of the games debug panel, which is a version of Dear Imgui that among other things allows us to look up and iterate on data values during a games runtime without having to make a new build of the game.
The JSON for a specific unit can be made up of several JSONs itself. For instance, lets look at foot_loy_bd_01.json, which is the JSON file for a typical enemy infantry unit, and which turns out to be made out of a lot of JSONs.
The keen of eye will notice that, yes, infantry in Brigador Killers are all technically mechs behind the scenes - anything in assets/data/vics/units is a mech, be it the player in a carmine suit or an NPC-controlled forklift truck. This is just how the game data is organized. From this list of JSONs, we want to inspect the units salvage, which is a file called salvage_foot_01.json.
Here you can see not only even more JSONs attached to this one, but also the types of values that can be assigned to its salvage hulk. A units hulk is what is left over after its health has been fully depleted. Vehicles that have been destroyed will leave a wreck, which is usually just the top part of the same model but desaturated to give the appearance of burned out armor. From the above menu most of the values are set to zero, as the hulk left over is for a body instead of a chunk of metal, but for purposes of player reactivity, hulks will still have some amount of health. Tangentially, infantry units as seen from the opening GIF will go through a series of animations as they are being attacked, which is not handled in this menu - thats part of whats called Flinch, Suppression, Flop and Weapon Stability, which looks like this:
Getting back to the gib sprites, we look at whats assigned for the on_damage_pyro, which is pyro_blood_mist_01.json, which is emitted by infantry-type NPCs and is a pyro-type resource.
Within that JSON we look for the gibs assigned to that pyro, which leads us to gibs_blood_mist_01.json. Explosion layers and lights are for bigger pyro effects. For instance, a gas station blowing up will need a fireball attached. Three layers down we have arrived at the resource that handles the attributes of blood sprites that an infantry NPC will emit on receiving damage: gibs_blood_mist_01.json
Here we can see what type of sprite has been assigned and how the animation for that sprite is set to play. We also get to decide how many blood mist sprays shoot out from the unit and at what speed, height, angle etc. These numbers are kept low for infantry gibs but, if we want to get silly, we can crank the numbers up and end up with something like this.
Again, the use case for more flamboyant gibs would be the destruction of a bigger entity like a heavy vehicle or a building prop that will have their own pyro and gib effects. Note again like in the first GIF at the top of the post an entity will do more than just shoot out a blood mist spray - just like a practical effect in movies, a squib also plays out to leave a blood stain on the ground. But unlike movie FX, we have to account for more situations than a carefully staged scene. Therefore one of the many other things to bear in mind with making these gib effects is that they have to have different spreads depending on what caused the hit. Here for instance is what happens if we put a bunch of infantry NPCs in a straight line and attempt to drive a heavy caliber round through them.
On top of the fireball explosion sprite and the bloom of light for the explosive bullet, youll notice that theres some uniformity to the ground spatter. This is because the sprites will only shoot out from an entity a limited number of ways. It would be too expensive (and a waste of time) to have our artists render out every single possible angle. Instead, the hope is that the gibs are done in just enough ways that the player fantasy is maintained.
Thanks for reading, and happy halloween!
Brigador Killers
Stellar Jockeys
Stellar Jockeys
Indie Singleplayer
Game News Posts 28
🎹🖱️Keyboard + Mouse
🎮 Full Controller Support
No user reviews
(0 reviews)
http://stellarjockeys.com/games/brigadorkillers
https://store.steampowered.com/app/903930 
BRIGADOR KILLERS is an intense story-driven isometric action game. Can a secret hit team of Solo Nobreans get revenge on the traitors deep in enemy territory, and still get out alive? The mercenary violence of BRIGADOR (2016) spills over onto a new planet, with revised controls and an all-new storyline mode.
WISHLIST NOW!
- Processor: 2.6 GHz or fasterMemory: 4 GB RAM
- Memory: 4 GB RAM
- Graphics: AMD Radeon 5770 / NVIDIA GTX 460 or better
- Storage: 1 GB available spaceAdditional Notes: Mouse and keyboard or controller required.
[ 5951 ]
[ 3198 ]