We are hard at work, developing the World Expansion IV Update for The Riftbreaker. While we don’t have much to show for it just yet, there have been some carefully controlled leaks on our Discord, which should tell you where we’re going with it (wink, wink, sign up to our Discord). You’ll undoubtedly learn more about the new expansion in the coming weeks. In the meantime, we would like to share with you a little story on our never-ending quest for improvement. This time, we’re taking a look at the latest updates for the Shotgun and High Caliber Rifle.
You can also watch the video about this by clicking here: https://youtube.com/shorts/m8AA_RMfRwg
With our old piercing damage system, hits that fell in-between frames wouldn't always register. It was barely noticeable at high framerates, but over the course of the campaign it added up to significant amount of damage missed.
The number of registered hits is significantly higher with our new system in place. The High Caliber Rifle is still not the best weapon for the job of thinning swarms, but this is just an example.
The Shotgun was present in the game since the pre-alpha days. Our implementation of this weapon was quite simple. Shotguns fired several projectiles in a cone. The exact path of each projectile was randomized with every pull of the trigger to simulate the spread that you would expect from firing a buckshot round. Each of those rounds had a 100% chance to pierce through enemies, even those who were resistant to physical damage. The weapon worked very well up close, when you were guaranteed to hit with all the projectiles. However, it was difficult to hit more distant targets, as those had to fall precisely in line with the randomized trajectory of the projectile. Sometimes, you would shoot at a group of enemies clearly in your range and get zero hits. The High Caliber Rifle (known in the early days as the Sniper Rifle) had fewer problems, but they were similar in nature. Bullets fired from this gun would always pierce enemies. However, the damage after the first hit wouldn’t always register. We wanted to improve that, and piercing damage mechanics were the key to this.
The lower your frame rate, the worse the problem. This is an extreme example - a shot that would easily take down 10+ units only hits two!
With the new sub-frame polling system, bullet hits register much more reliably, even at very low frame rates.
Previously, if you fired at several enemies standing in a single line, the projectile should be able to hit all of them at once. Sounds great on paper, but in reality, you would often see that the bullet “skipped” several viable targets along the way. It happened because the bullet traveled at a very high speed, and some hits would fall in the space between the game engine’s logic updates, which occur every 33 milliseconds. By the time the next logic update rolled around, the projectile was much further and couldn’t register the hits “from the past”. Our solution was to rework the piercing algorithm so that it worked independently of the logic update timing - or in ‘sub-frame polling’. Suppose any targets are hit in the time between logic updates. In that case, that information is now stored and used during the next update. This ensures that the hits registered in-between frames are taken into account and the damage is distributed without random ‘skips’, increasing the overall reliability of piercing in the game.
It wasn't only the High Caliber Rifle that suffered because of this. In this example the Canoptrix are clearly in range of our Shotgun, yet we fail to kill them repeatedly!
The Shotgun's reliability is much higher now - the damage numbers alone tell a whole story about how many enemies get eliminated with each shot. Swarm control just got an upgrade.
This upgrade made piercing weapons considerably stronger, as you were almost guaranteed to hit all enemies in a group with a single shot, which was not our intention either. Let’s assume that we have a weapon that deals 12 damage each shot. We’re aiming for 3 Canoptrix standing one behind the other. Each of them has 5 HP. They are all in range of our weapon. In the old model, all Canoptrix would take 12 damage and die, and the bullet would continue traveling even further. This is where the second piece of the puzzle comes in - damage dissipation. This damage model works differently. Each bullet starts with a number of damage points it can distribute. For the sake of this example, let’s keep it at 12. We’re aiming at 3 Canoptrix again. The first one receives the maximum value, which is 5. The bullet has seven damage left. It hits the second target, again, for a maximum of 5. The bullet still has 2 points of damage left, so it pierces again and hits the last Canoptrix. Essentially, the bullet loses a portion of its damage with each “pierce”, making the weapon much more sensible with the new, precise piercing algorithm.
Shooting a creature that doesn't really react to a blast from a shotgun did not add to immersion or the feeling of power.
Single projectiles from the Shotgun now sum up to deal a higher amount of damage in one go. Thanks to this, you can stagger larger creatures.
Another subtle change to the Shotgun is the ability to stagger large enemies. Singular projectiles, even on the highest level, were simply too weak to cross the damage threshold necessary to stagger an enemy. After our small rework, if you shoot a large enemy point-blank and hit with several bullets, the game will sum up all the individual damage ‘events’. If the number is high enough, you will be able to stagger the enemy and create a gap between you and your foe. This is highly useful when trying to kite creatures - if you run out of ammo in your primary weapon, you can give yourself a safety buffer using the shotgun, while you wait for the ammo to replenish.
Conclusion
Overall, these changes slightly alter the characteristics of the Shotgun and its intended use case in the game. The weapon will now be much more effective against groups of smaller enemies. The sub-frame sampling rate will ensure that more enemies actually get hit, allowing you to clear entire packs of creatures with fewer shots than before. There is a tradeoff, though - firing a shotgun into a horde of tanky creatures won’t do as much damage as before. That’s due to the change in piercing and the addition of damage dissipation. This makes the Shotgun less of a ‘catch-all’ weapon. The changes we introduced also affect the operations of the High Caliber Rifle. Similar to the Shotgun, the shots fired from the Rifle would pierce enemies with full force, but tended to skip over the targets that didn’t align with the projectile’s polling rate. With the new systems in place, bullets will only pierce enemies if they have any damage left to distribute, but they have a much easier time registering hits for targets further back.
Thanks to our recent improvements both the Shotgun and the High Caliber Rifle are more reliable, easier to use, and simply better in most gameplay scenarios.
If there is one thing to learn from this article, it’s this: you never stop learning new things, and there is always room for improvement. Your ideas and perspectives shift over time and might offer solutions to problems you left buried a long time ago. We have been learning new things throughout the entire development process for The Riftbreaker. Who knows where it will lead us in the future? We don’t, but as soon as we do, we’ll be sure to tell you via our newsletter (you can sign up here), as well as on our Discord server at www.discord.gg/exorstudios.
See you there!