PsihoKekec
Educated
- Joined
- Nov 15, 2023
- Messages
- 119
Looks like I will enjoy destroying these as well.
Crash Test Dummies In Brigador Killers
What happens if you drive a 2000 kg car into four Daves?
Restitution -
Physics
. the return to an original physical condition, especially after elastic deformation.
Video games are not bound by what we understand to be the laws of the universe. Objects can be given ridiculous values for their acceleration or mass and they won’t suddenly create shock waves or distort space time around them if the engine running that game doesn’t have systems trying to simulate those things. Generally speaking, games trend towards simplification when recreating the underlying chaos of nature. Note that this
doesn’t
mean work isn’t involved - the math for things like real time fluid simulation are very complicated and resource intensive, so to get the thing running at a steady framerate concessions must be (literally) made. At the same time, this simplification process is where things that might be referred to as “jank” can appear.
Entities in the Brigador engine love to spin
Jank isn’t necessarily bad - in the above case it’s just an example of the Lobo inflicting pure impulse on the car with both set to deal no damage - but it looks “off”. Within the game data,
impulse
is the value that decides how much “push” another entity has. In this instance the Lobo is applying impulse with its arm swing, while the car is applying its own pushing force by driving into the Lobo, but
it’s not quite right
because the Lobo is being shunted slightly while the car bumps off it and spins nearly 270 degrees. In isolation this might look fun, but in the heat of gameplay a vehicle wildly clipping into the player might get old fast.
[Tangential: one in-game distance unit is equivalent to just over 8 ft (or 2.44 meters). A “tile” in-game is two units by two units. Mass correlates to kilograms 1:1. For example, “Dave” who has featured in previous posts has a mass of 70 kg.]
Dave standing on a tile
To keep things simple in the Brigador engine, only NPCs are affected by
impulse
. Props (static objects like lampposts or office buildings) are not affected by it - though that is not to say props do not have an effect
as was discussed in this previous post
. So how do we go about reducing janky moments like the one above? It sounds crude but in truth we just start smashing things into one another and keep changing the values until it’s right. In other words, a crash test.
Two identical Lobos at one end, with two cars going at full speed towards them. The car on the left can go faster than the other one, though in this next gif the “slower” one arrives first in frame.
In this demonstration the slower car (with all its doors) has a mass of 615 kg, the faster one (no doors) has a mass of 750 kg. The Lobos are both 1000 kg.
There is a name for the phenomenon when two bodies collide with one another:
Coefficient of Restitution
. To directly quote the wikipedia article:
For our purposes, we need the COR for the bodies involved to be neither too close to 0, nor too close to 1. In the example above the COR is about 0.35.…the Coefficient of Restitution (or COR) is a dimensionless parameter defined as the ratio of the relative velocity of separation after a two-body collision to the relative velocity of approach before collision. In most real-word collisions, the COR lies somewhere between 0 and 1, where 1 represents a perfectly elastic collision (in which the objects rebound with no loss of speed but in the opposite directions) and 0 a perfectly inelastic collision (in which the objects do not rebound at all, and end up touching).
In this next example, the Lobos have a higher COR of about 0.75 meaning they will spring back more than in the previous GIF - notice how the Lobo on the bottom being hit by the slower car doesn’t get knocked over until the second impact.
If we keep these same parameters but decide to
increase
the mass of the Lobos up to 1500 kg from 1000 kg, then the impact will look like this.
Neither Lobo is knocked over on the first hit and both cars bounce back pretty hard. Since there’s a greater disparity in mass between the two entities, the resulting bounce is harder.
Because restitution is basically how much inertia is preserved after an impact, this ties into another system
that we’ve mentioned before - reverse trample
(short version: both rapid acceleration and deceleration can be deadly). So if cars end up having a default COR of 0.35, and that at full speed that deals about 50% of their HP on impact (such as from hitting a wall, or hitting another NPC of equal or greater mass with a COR of 0.35 or lower), then hitting a unit that is both bigger (like the Lobo, or a mech, or a tank)
and
has a higher COR means the impact will be more destructive.
Whether that destruction is
fun
, however, is a different question. We expect players will want to gun the engine, but we might not want to make every impact potentially lethal to the player.
Something else discovered during these crash tests is that reverse trample damage does carry over into what’s called overkill damage. In plain terms this is what happens if you drive a 2000 kg cop cruiser into four Daves.
In other words, if you have a heavy enough vehicle moving fast enough, you will insta-gib infantry.
Over on the Brigador: Up-Armored Edition news section we’ve just announced four new pewter minis are coming to our merch store, as well as a 20% holiday discount. Full details can be seen here.
Brigador: Up-Armored Edition AnnouncementThu, November 28, 2024
ARE CORVIDS SELL OUTS?
Spacer Arlo, Corvid Tuk Tuks, Loyalist Treadbikes and the Treehouse now available
Alternatively, if you want to go straight to the store, click here and don’t forget to enter
HOLIDAYS2024
at checkout.
Meet the Teddy Boy
A look at some new art assets for Brigador Killers
A short post this month for the end of 2024, this time again from our lead artist who previously wrote about the Lobo, the Mar Nosso SWAT vehicle and the spacer redesign. This post is about a few new vehicles assets recently added to the game.
Earlier this year we put out an alpha of Brigador Killers over on Itch. We learned a lot of good lessons—one lesson being that the game world felt empty between playable vehicles. It was time to add a lot more civilian vehicles to Brigador Killers, starting with smaller ones.
Many of the fan favorites in Brigador were small, so we knew the Tuk Tuk had to come back, and we already had a motorcycle. What else fits into that category? I wanted an electric scooter, and some kind of goofy small commuter car.
Teddy Boy
A freely-styled, loud, sort of 80s/90s scooter which I named Teddy Boy, partly because I think the jokingly Italian scooter names in games are tired, partly as a nod to the underground fashion style in the UK of the mid 20th century, and partly as an echo of the fan-christened Pantry Boy from Brigador: Up-Armored Edition. Here’s how it looks in-engine.
Liliputter
For a small commuter, I looked no further than the deeply charming and goofy Comuta-Car of the late 70s/early 80s, one of the first widely available electric cars. Exaggerating its small scale, I turned it from a two seater into a single seat vehicle. Below is the Liliputter in action in GIF form.
An aside on the process
Sometime last year I moved all of my hard surface modeling to a program called Plasticity, and it was an incredible gain in speed. Now it was time to revamp our rendering pipeline—not for the sprites, but some new way to show off items and vehicles in the game with close-up beauty renders. Blender and image-based rendering came to the rescue, as per this tutorial:
Following this tutorial I had my new template for beauty renders. The added bonus is that once the game is out, we will include this render scene for modders. This means that any gun or vehicle you add to the game can use exactly the same rendering!
The Tuk Tuk
As mentioned earlier, here’s the return of the Tuk Tuk, which now comes in multiple configurations:
Like with the other new additions, here is the lineup within Brigador Killers.
Remember that over on the Brigador: Up-Armored Edition news section we announced four new pewter minis available on our merch store, as well as a 20% holiday discount until the end of 2024. A rundown of the new models can be read here.
Brigador: Up-Armored Edition AnnouncementThu, November 28, 2024
ARE CORVIDS SELL OUTS?
Spacer Arlo, Corvid Tuk Tuks, Loyalist Treadbikes and the Treehouse now available
Alternatively, head straight to the store by clicking here, and don’t forget to enter HOLIDAYS2024 at checkout.
Happy Holidays!