Adaam
إسمي جف
Hello everyone. The timer is an essential component to battling. It prevents players spending minutes per turn planning their entire game while rewarding those who see the better play fast. Many games have been outright lost on players timing out. Others have had their endgames influenced by rushed decision-making. Despite how important the timer is, it is frankly baffling how next to nobody knows how it works.
Here is the only public post I could find regarding the timer. It is from 2019 and is not pinned anywhere in the Tournaments subforum. This would naturally explain the overall confusion around the timer, but I am not here to critique Smogon's publishment of the timer. Rather, I want to first clarify how it actually works, and then I want to suggest improvements to be made.
Here is the source code for the battle timer. There are many relevant lines, but the most important ones are Lines 298-308. From gleaming the code, Smogtours timer works as follows (note I will focus only on the singles format timer):
My Solution
I do not want to reinvent the wheel here. I think a simple 300 second base time + 15/10 second increase per turn is a sufficient implementation. Every player will easily remember this instead of the complex reduction we have today, and it values every turn the same. We can debate the amount of time to be added per turn, but I strongly recommend against any form of diminishing return implementation. Players shouldn't be forced to stay low forever.
Final Note
I spent a couple hours reading Pokemon source code on a 60 degree day so please toss a like to justify my pathetic use of time.
Here is the only public post I could find regarding the timer. It is from 2019 and is not pinned anywhere in the Tournaments subforum. This would naturally explain the overall confusion around the timer, but I am not here to critique Smogon's publishment of the timer. Rather, I want to first clarify how it actually works, and then I want to suggest improvements to be made.
Here is the source code for the battle timer. There are many relevant lines, but the most important ones are Lines 298-308. From gleaming the code, Smogtours timer works as follows (note I will focus only on the singles format timer):
- Battle timer is initialized to 300 seconds at the start of a battle.
- Timer is capped at 300 seconds.
- At the end of turn 1, 0 seconds are added to the timer.
- At the ends of turns 2-100, 10 seconds are added to timer.
- At the ends of turns 101-200, only 5 seconds are added at the end of every turn.
- At the ends of turns 201 onwards, 5 seconds are added at the end of every other turn.
- Total time is only reduced every 5 seconds. For example, if your timer is at 150 seconds at the beginning of turn 62, and you make your move after 3 seconds, your total time will be 160 seconds next turn and NOT 157 seconds.
- Battle log will display timer updates every drop in 30 seconds until the player reaches 30 seconds. Then, the next update will be at 20 seconds, and then 15, 10, 5, until the player times out.
- At the beginning of a turn, the player is alerted of their time remaining if, and only if, their timer is <= 30 seconds. The text in this case is different from the normal updates: "Player X has Y seconds left this turn."
- Due to the nature of the implementation of the timer, it is possible that this is not totally precise.
- Me vs TPP (OST) - On turn 75 battle log shows I reach 30 seconds. The next update is not until I reach 20 seconds, which does not occur turn 75. This means I clicked when my timer was at 25/30 seconds. I gained 10 seconds to put me at 35/40 seconds, which is why I did not receive an "iwillbeatyou69 has 30 seconds left this turn" at the start of turn 76. Turn 78 I reach 10 seconds before clicking, and at the beginning of turn 79 I have 20 seconds. However, at turn 80, I only have 25 seconds instead of 30. I don't know why, perhaps there is an internal race condition with respect to the timer's implementation causing the inconsistency.
- beatiful vs Luispeikou (SPL I think) - Skip to turn 201 and you can see Luis only gain a mere 5 seconds on even numbered turns. With such a low amount of timer given, he is unable to ever rebuild his timer despite speed clicking for 100+ turns.
- TPP vs Lord_Enz (OST) - Both players get low on time in turns 100+. To give a specific turn, at the end of turn 181, TPP and Lord_Enz have 5 and 15 seconds respectively, and at the start of turn 182, they have 10 and 20 seconds.
My Solution
I do not want to reinvent the wheel here. I think a simple 300 second base time + 15/10 second increase per turn is a sufficient implementation. Every player will easily remember this instead of the complex reduction we have today, and it values every turn the same. We can debate the amount of time to be added per turn, but I strongly recommend against any form of diminishing return implementation. Players shouldn't be forced to stay low forever.
Final Note
I spent a couple hours reading Pokemon source code on a 60 degree day so please toss a like to justify my pathetic use of time.
Last edited: