Buy advertising: banner, link and showcase with online payment

Between the Lines: Behind the Scenes of Dota 2 (Issue 1)

Continuing our Journey “Between the Lines: Behind the Scenes of Dota 2,” we present a captivating series of blog posts from our developers. In this series, they will share intriguing stories about the challenges, mistakes, and fortunate coincidences they encounter while working on the unique game that is Dota 2.

Each update allows us to introduce new heroes, items, and abilities to the game, not to mention tweaking the existing ones. Thus, Dota 2 not only evolves but also enriches itself with countless potential interactions. On one hand, this brings something fresh to every match for the players, but on the other hand, it increases the likelihood of some changes leading to unintended errors – one, two, or even twenty of them.

Fortunately, our community is always exploring Dota 2, experimenting, and quickly discovering hidden advantages, new strategies, and flaws that even catch us, the developers, by surprise.

A brilliant recent example of this is the issue with Sticky Bomb from Techies’ ability, Sticky Bomb. The groundwork for this bug was laid in a previous update when we made changes to the hero’s abilities and playstyle. These adjustments led to a situation where, under specific conditions, Sticky Bomb could exist indefinitely, and the player who created it could control it. Interestingly, there were no circumstances in the game at that time that could trigger this bug, so it remained unnoticed until the “New Horizons” spring update, which introduced the “Paired Portals.”

Suddenly, the hero gained the ability to create controllable Sticky Bombs that could be moved around the map and unleashed on enemies an unlimited number of times. This, as you can imagine, provided a significant advantage, and soon the issue was buzzing on our GitHub.

Between the Lines: Behind the Scenes of Dota 2 (Issue 1) → photo 7

In game development, especially in Dota 2, it’s common to build something new (without breaking the game) based on something similar (something that works and doesn’t disrupt the game) and gradually make changes. The concept for Sticky Bombs was inspired by the classic mines from the “Remote Mines” ability, which used the same base creature type named “npc_dota_techies_remote_mine.”

The bombs followed a sequence of throw, chase, and countdown to explosion, controlled by sets of server-side modifiers that regulated the creature’s movement and behavior at each stage. Player control was restricted during the chase and countdown, and some player commands were blocked during the throw phase, as it controlled movement. Additionally, the game code prohibited such a creature type like “npc_dota_techies_remote_mine” from attacking.Between the Lines: Behind the Scenes of Dota 2 (Issue 1) → photo 8

On the other hand, the hero could manually detonate the mine using its own ability, which meant the bomb had the capability to use abilities. In the game code, this associated the bomb with the player, allowing the player to receive credit for the kill when using it. By right-clicking on “Paired Portals” (or any other gradually activating object on the map), the player could turn the attack command into the ability cast command on the target (essentially applying the ability to it). Other objects on the map could be interacted with only by heroes, but “Paired Portals” were an exception, as even Roshan could use them.

And this is where we circle back to the Sticky Bomb issue: when the bomb was in the air after being thrown, the player could select both the bomb and the hero, then right-click on the “Paired Portal.” This action caused the bomb to start teleporting as well, prematurely ending the throw sequence, leading to an error.

Once we identified all this, the solution was rather simple: the player didn’t need to control the Sticky Bomb via the “Paired Portal.” Removing the corresponding flag was enough to keep the sequence intact and ensure the bomb always exploded as intended.

Between the Lines: Behind the Scenes of Dota 2 (Issue 1) → photo 9

As with many other bugs, 99% of the time was spent on finding the cause, and then only one small code change was needed – which could very well have fixed another bug unintentionally. That’s why they say debugging code is like trying to solve a murder that you committed yourself.

In conclusion, the Sticky Bomb issue accidentally made its way into the game but was successfully addressed thanks to the active involvement of our community. So, what’s next? We are always open to your feedback and suggestions. If you discover anything else, feel free to let us know on our GitHub.

With your support and collaborative efforts, we continue to make Dota 2 even better and more exciting. We are confident that many more thrilling discoveries, challenges, and adventures await us ahead. Get ready for an exhilarating journey “Between the Lines” within the realm of Dota 2!

Leave a Reply