Between the Lines: How We Fixed the Bomb
We are excited to introduce “Between the Lines”—a new blog series from our developers. In this series, they will share insights into the challenges, mistakes, and fortunate accidents we encounter while working on such a unique game as Dota 2. Dota 2 is not just a game; it’s a living, breathing ecosystem filled with intricate mechanics, competitive dynamics, and a passionate community. Every update brings with it a myriad of possibilities and challenges that our development team must navigate. Through “Between the Lines,” we aim to give you a behind-the-scenes look at the thought processes and decision-making that go into shaping the gameplay experience. In each entry, our developers will delve into specific aspects of the game, discussing not only the technical hurdles we face but also the creative solutions we devise. Whether it’s balancing heroes, resolving bugs, or implementing new features, the path is rarely straightforward. Our team often finds themselves at a crossroads, weighing the pros and cons of each potential direction. Mistakes are an inevitable part of the development process. The gaming industry is fast-paced, and decisions often have to be made quickly. In “Between the Lines,” our developers will candidly share some of the missteps we’ve taken along the way. These stories will highlight how we learn from our errors and adapt our strategies to better serve the Dota 2 community.
Moreover, we will celebrate the happy accidents that sometimes lead to unexpected breakthroughs. In game development, inspiration can strike at any moment, and a seemingly small change can lead to a significant impact on gameplay. Our developers will recount moments where a little experimentation yielded delightful results, enhancing the game in ways we hadn’t anticipated. We believe that sharing these experiences will foster a deeper connection between our team and our players. Understanding the complexities of game development can help players appreciate the fine details that contribute to the overall Dota 2 experience.”Between the Lines” is not just about the technicalities; it’s also about the people behind the game. Each developer has their own story to tell, their own unique perspective on the journey of creating Dota 2. We want to introduce you to the team members who dedicate their time and passion to this project, showcasing their personalities, struggles, and triumphs. As we embark on this new blogging adventure, we invite you to join us. Your feedback and engagement are invaluable as we navigate the ever-evolving landscape of Dota 2. We hope that “Between the Lines” will not only inform you but also inspire you to see the game from a different angle.
The Journey of Game Development: Unraveling Bugs and Surprises in Dota 2
Introducing “Between the Lines” — a new blog series from our developers. In this series, they will share the challenges, mistakes, and happy accidents we encounter while working on a unique game like Dota 2. Each update allows us to introduce new heroes, items, and abilities, not to mention refining existing ones. This means Dota not only evolves but also accumulates an endless variety of possible interactions. On one hand, this ensures that players encounter something new in every match; on the other hand, it increases the likelihood that some of our changes may lead to bugs. Or two. Or even twenty. Fortunately, our community is constantly exploring Dota and experimenting, quickly discovering hidden advantages, new strategies, and game-breaking glitches that even catch us off guard. A prime example of the latter is the sticky bomb bug related to Techies’ Sticky Bomb ability. The roots of this issue date back to last year’s update when we altered the hero’s abilities and playstyle. These changes led to a scenario where, under certain conditions, a sticky bomb could exist indefinitely, and the player who created it could control it. Interestingly, at that time, there were no circumstances in the game that could trigger this bug, so it went unnoticed until the spring update “New Horizons,” which introduced Pairing Portals.
Suddenly, the hero could create controllable sticky bombs that could be moved across the map and unleashed upon enemies in unlimited quantities. This, to say the least, provided a significant advantage, and soon the problem was widely reported on our GitHub. In game programming, especially in Dota, it is common practice to create something new (that doesn’t break the game) based on something similar (that works and doesn’t break the game) while gradually making adjustments. The prototype for sticky bombs stemmed from classic mines associated with the Remote Mines ability, which used the same base type of summoned entity known as npc_dota_techies_remote_mine. These bombs utilize a sequence of throwing, chasing, and countdown to explosion, managed by a set of server modifiers (in simpler terms, effects) that regulate the movement and behavior of the entity at each stage. Restrictions on player control are built into the chasing and countdown modifiers, while the throw effect blocked many player commands since it controlled movement. All of this was further complemented by the characteristics of the npc_dota_techies_remote_mine type — notably, the game code prohibits such an entity from attacking.
However, the hero had the ability to detonate the mine manually using its own ability, which meant that the mine had the capacity to apply abilities. This indicated that, in the game code, it was considered the player’s entity (so they would receive credit for kills) and was under their control. Right-clicking on Pairing Portals (or any other progressively activated object on the map) converts the attack command into an ability application on the target (using the Pairing Portal is akin to applying an ability to it). Other objects on the map can only be interacted with by heroes, but Pairing Portals are accessible to other entities, as Roshan traverses through them. This brings us back to the sticky bomb: at the moments when it was airborne after being thrown, the player could select it along with the hero and click on the Pairing Portal. The bomb would then start teleporting and exit the throwing state prematurely, interrupting the sequence of modifiers and resulting in a bug. Upon discovering all this, we arrived at a rather straightforward solution: the player does not need to control the sticky bomb. Simply removing the appropriate flag would ensure that the sequence remained intact and always culminated in an explosion.
As is the case with many other bugs, 99% of the time was spent tracing the root cause, and afterward, we only needed to change a single line of code — which, quite likely, also fixed another issue. This is why it is often said that debugging code is like trying to solve a murder you committed yourself. So, that’s how the sticky bomb bug inadvertently appeared in the game, created a stir, and was resolved thanks to our community bringing it to our attention. “What now?” you might ask. Well, now we wait to see if the line of code we removed was responsible for something else entirely. In conclusion, the journey of developing Dota 2 is filled with unexpected discoveries and challenges. Every update not only brings new content but also presents an opportunity to learn and adapt. Our team remains committed to transparency and improvement, and we look forward to sharing more insights in future blog posts. Stay tuned for more stories from the front lines of game development