Penalty time

From Stunts Wiki
Revision as of 18:06, 6 February 2013 by Duplode (talk | contribs)

Penalty time is the built-in mechanism of Stunts to curb shortcut usage. It ensures that, in most circumstances, skipping more than two track elements consecutively will lead to several seconds being added to the final lap time. The penalty is calculated in real time, and displayed to the racer mid-lap as soon as it is calculated if the in-car (F1) view is selected. While penalty time is vital to ensure Stunts results are meaningful, it leaves some margin for gaming the rules - as everything else in Stunts.

Limitations

There are three main limitations of the penalty time system; all of them are widely exploited in competition racing whenever the rules allow it, as is usually the case.

Track elements are detected by their full tile area

For the purposes of penalty detection, a track element amounts to the area of the corresponding tiles in the track editor grid, in a 1x1, 2x1 or 2x2 arrangement depending on the size of the element. Such an area is significantly larger than the track element proper - for instance, the tile containing a straight piece of road is about four times wider than the road itself. While such leniency was necessary to avoid punishing simple mistakes such as spinning out of the track, it also means that crossing any part of the full element area, no matter how small, once every three elements is enough to avoid penalty. Below is a vivid description of how that fact is taken advantage of in competition racing:

I go to the left of the road because I know the track goes left at the top of the map. There’s a banked corner which has to be cut, but I keep getting penalty time. A Stunts track is divided into squares. Penalty time comes when your car fails to touch a square. In the case of track elements consisting of more than one square, though, you only have to touch one of the squares. Theoretically, the car can touch four squares at once, so penalty-dodging is possible to a high degree. I wish I could push my car left of the loop without getting penalty time, but I fail, so I have to go under the loop and then find exactly the right angle to let me squeeze between the end of the tunnel and the beginning of the next banked corner. This does seem to be faster then using the road. Only use the road in an emergency.
Bonzai Joe, Diary of an all-in race

Razor sharp cuts of large corners and other 2x2 elements are typically featured in powergear-heavy races, as cars in PG can drive on grass with impunity (it is no coincidence that Bonzai Joe was reporting a Corvette race in the quote above).

Stunt elements do not receive special treatment

Given that penalty computation only considers the area of the tiles which an element occupies, there is no accounting of the special paths defined by loops, u/d corks and l/r corks. That implies racers are free to drive them however they please; for instance, avoiding the upside-down turn in l/r corks and loops or even skipping them altogether through the grass. In competitions which allow shortcuts, only the ingenuity of track designers can induce a stunt element to be driven as they were originally supposed to.

Dual-way switching

The most glaring limitation of the penalty system, however, is that if a track splits in two paths at any point then switching from one path to the other will not lead to penalty as long as at least one element of the original path and two of the destination path are driven through. The general term for shortcuts which exploit that is dual-way switching. Dual-way shortcuts can lead to massive savings of time depending on the configuration of the paths; they are a perennial source of headaches for track designers keen on preventing them and ad hoc rules for damage limitation.

An alternative: racing without shortcuts

The OWOOT / no shortcuts racing codes occasionally deployed in competitions are a way to work around the shortcomings of the penalty time system by making it unnecessary through the means of rules which force racers to stick to the road. IRC rules prohibit completely all three kinds of exploits described above; ISA rules forbid the second one (avoiding stunts) partially and the other two ones fully.

Penalty rules

Below follows a reasonably complete explanation of how to find the penalty time for an arbitrary cut. If all you want to know is how to avoid penalty, things are much simpler: do not skip more than two track elements consecutively and do not miss the last track element before the start/finish tile.

Consider a racer which left the track and then rejoined it at some further point. Let us call the beginning and end points of the shortcut exit element and re-entry element, and everything in between skipped elements. Finally, by penalty chain we will refer to the elements counted in the calculation of penalty time. Under normal circumstances, the penalty chain includes:

  • the skipped elements,
  • the re-entry element, and
  • the element coming immediately after it.

Therefore, if, e.g, five elements are skipped the penalty chain will usually have seven elements. One easy way to identify the end of the penalty chain is that the penalty time message will be shown to the racer when the chain is closed, i.e., upon leaving its last element and entering the following track element.

Still assuming normal circumstances, penalty time will be given whenever there are more than two skipped elements in the penalty chain. The value of penalty attributed will be three seconds for each element in the chain if that results in more than 18s, and 18s otherwise. That explains why 18s is the most common penalty value: to get more, one typically has to skip at least 21/3 - 2 = 5 elements.

Abnormal circumstances, as opposed to the "normal circumstances" referred above, include:

  • If the start/finish tile would be met anywhere in a penalty chain, the chain ends just before the finish tile. Furthermore, any accumulated penalty will be added, even if less than three elements were skipped. For that reason, skipping the last element(s) before the finish line will always lead to penalty, in the amount of three seconds per skipped element.
  • If, after performing a penalty-inducing shortcut, one returns to the track and then leaves it immediately, without closing the penalty chain, penalty will be calculated as if all elements between the first leaving of the track and the final re-entry had been skipped, even those crossed upon the temporary rejoining of the track.
  • There are many subtle exceptions to these rules when crossroads, dual-way splits and rejoins are involved; such edge cases demand further investigation. Just to mention one of the simpler examples, skipped dual-way split tiles do not count towards penalty computation if one rejoins the track through the non-straight path.

Penalty time detection

As penalty time is calculated on the fly as a lap is driven or a replay is ran, there is currently no way to detect penalty time just by checking a replay file. Such an inconvenient affects both replay checking software like RPLINFO and automated competition management systems such as the one used by ZakStunts - in the latter case, managers have to rely on the racers reporting correct penalty times if the scoreboards are to be consistent throughout the month. Porting the game engine is the only realistic hope of improvements to this situation.