Difference between revisions of "Checkline"

From Frankfurt STK Wiki
Jump to navigation Jump to search
m (→‎Problems and hacks: Existing checklines that are not placed!!!)
m (→‎Videos: newlines)
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
A '''checkline''' in STK is a virtual line preventing unintended shortcuts.
 
A '''checkline''' in STK is a virtual line preventing unintended shortcuts.
 +
[[File:mars-park-checkline.png|right|thumb|A checkline in [[Mars Park]]]]
  
 
== Explanation ==
 
== Explanation ==
Every [[List of STK tracks|track]] has to have a few checklines. They are set so that players have to stay on the road and cannot cut a part of the track. If checklines are set wrongly by track creators or even are missing, exploits are possible. In [[STK 0.9.3]], a lot of tracks included unintended shortcuts because of this.
+
Every [[List of STK tracks|track]] should have a few checklines. In the very basic case, a player should ride through all the checklines in the order of their appearance on the track, otherwise the lap is not counted. Of course, checklines should be set so that players have to stay on the road and cannot cut an important part of the track.
 +
 
 +
If checklines are set wrongly by track creators or even are missing, exploits are possible. In [[STK 0.9.3]], a lot of tracks included unintended shortcuts because of this.
  
 
== Technical details ==
 
== Technical details ==
 +
[[File:two-checklines.png|right|thumb|Only the red checkline is waiting for the player]]
 +
[[File:united-checklines.png|right|thumb|Several checklines grouped to make a vertical one]]
 
Right now, a checkline is considered to be a rectangle '''of height 5''', constructed by extruding a segment between two points on the same height in the upwards direction. This means a tilted checkline, or a checkline that has a bigger height, are only possible if several checklines are combined.
 
Right now, a checkline is considered to be a rectangle '''of height 5''', constructed by extruding a segment between two points on the same height in the upwards direction. This means a tilted checkline, or a checkline that has a bigger height, are only possible if several checklines are combined.
  
Line 10: Line 15:
  
 
Initially, the lap line is waiting for the player, and all other checklines are inactive. For each checkline, the track creator can specify which checklines begin to wait after this particular checkline is crossed. Checklines are usually organized into cycle (i.e. one checkline makes exactly one other checkline active), but if the track has several drivelines, checklines can be grouped, so that checklines in one group make the same set of checklines waiting, and usually these checklines in a group are located on different paths.
 
Initially, the lap line is waiting for the player, and all other checklines are inactive. For each checkline, the track creator can specify which checklines begin to wait after this particular checkline is crossed. Checklines are usually organized into cycle (i.e. one checkline makes exactly one other checkline active), but if the track has several drivelines, checklines can be grouped, so that checklines in one group make the same set of checklines waiting, and usually these checklines in a group are located on different paths.
 +
  
 
== Problems and hacks ==
 
== Problems and hacks ==
Line 19: Line 25:
 
It sometimes happens in particular tracks like [[Black Forest]], [[XR591]] or [[Hacienda]] that one misses a checkline because he was going off-road too much (not intentionally). For example, in Hacienda, the checkline at the very start is not long enough, so if you drive too much at the side, you won't validate the checkline and your lap won't count. Because of checkline problems on [[Ranked]], there are sometimes huge ranking changes.
 
It sometimes happens in particular tracks like [[Black Forest]], [[XR591]] or [[Hacienda]] that one misses a checkline because he was going off-road too much (not intentionally). For example, in Hacienda, the checkline at the very start is not long enough, so if you drive too much at the side, you won't validate the checkline and your lap won't count. Because of checkline problems on [[Ranked]], there are sometimes huge ranking changes.
  
A problem with offroad can actually change the flow of race. For example, on Hacienda a player can move along the right side of the track until around Turn 1, which will have a lap counted, but a few seconds after the actual lap line was crossed. This allows making faster fake laps than normal laps. This can also save the leader from a basket ball or parachute, with basket ball being able to hit the actual second place.
+
A problem with offroad can actually change the flow of race. For example, on Hacienda a player can move along the right side of the track until around Turn 1, which will have a lap counted, but a few seconds after the actual lap line was crossed. This allows making faster fake laps than normal laps. This can also save the leader from a [[Powerups#Basket_ball|basket ball]] or [[Powerups#Parachute|parachute]], with basket ball being able to hit the actual second place.
  
 
There are also problems with ranking karts on the track on most reverse official tracks and [[Oliver's Math Class]] which can also affect the race. Basket balls can still hit someone not in the lead, and a player going off can be rescued way behind his mistake spot.  
 
There are also problems with ranking karts on the track on most reverse official tracks and [[Oliver's Math Class]] which can also affect the race. Basket balls can still hit someone not in the lead, and a player going off can be rescued way behind his mistake spot.  
Line 28: Line 34:
  
 
You need to enable [[Artist Debug Mode]] and [[Command-line STK|run STK with parameter]] <code>--check-debug</code>.
 
You need to enable [[Artist Debug Mode]] and [[Command-line STK|run STK with parameter]] <code>--check-debug</code>.
 +
 +
== Future changes ==
 +
According to issue [https://github.com/supertuxkart/stk-code/issues/5062 5062] and comments to it, it's planned to allow custom heights for checklines, and with more effort, they could be transformed into objects with any geometry, so that no matter how complex the area around is, the lap could be counted properly.
 +
 +
== Links ==
 +
* [https://stk.kimden.online/checklines/ Tracks with checkline issues] as of 2024
 +
 +
== Videos ==
 +
How to exploit the track with one checkline
 +
 +
<youtube width="300" height="180">Yjup6E1aORU</youtube>
 +
 +
(Almost) All tracks with exploits as of 2024
 +
 +
<youtube width="300" height="180">TI4Ys0B0Nm0</youtube>

Latest revision as of 23:16, 25 May 2024

A checkline in STK is a virtual line preventing unintended shortcuts.

A checkline in Mars Park

Explanation

Every track should have a few checklines. In the very basic case, a player should ride through all the checklines in the order of their appearance on the track, otherwise the lap is not counted. Of course, checklines should be set so that players have to stay on the road and cannot cut an important part of the track.

If checklines are set wrongly by track creators or even are missing, exploits are possible. In STK 0.9.3, a lot of tracks included unintended shortcuts because of this.

Technical details

Only the red checkline is waiting for the player
Several checklines grouped to make a vertical one

Right now, a checkline is considered to be a rectangle of height 5, constructed by extruding a segment between two points on the same height in the upwards direction. This means a tilted checkline, or a checkline that has a bigger height, are only possible if several checklines are combined.

A lap line is a special checkline which doesn't require any coordinates, a track creator needs to make some other things to the driveline to make a lap line. A checkline can either be inactive (crossing it gives nothing) or waiting for the player (crossing the checkline makes it inactive and makes one or more other checklines waiting for the player).

Initially, the lap line is waiting for the player, and all other checklines are inactive. For each checkline, the track creator can specify which checklines begin to wait after this particular checkline is crossed. Checklines are usually organized into cycle (i.e. one checkline makes exactly one other checkline active), but if the track has several drivelines, checklines can be grouped, so that checklines in one group make the same set of checklines waiting, and usually these checklines in a group are located on different paths.


Problems and hacks

However, there can also be problems with checklines if they are not placed, or placed incorrectly.

If a track has no checklines except the lap line (like on these tracks), a player can cross the lap line multiple times without completing a lap which leads to weird lap times. If there is only one or two extra checklines, there still could be some kind of unintended shortcut.

It sometimes happens in particular tracks like Black Forest, XR591 or Hacienda that one misses a checkline because he was going off-road too much (not intentionally). For example, in Hacienda, the checkline at the very start is not long enough, so if you drive too much at the side, you won't validate the checkline and your lap won't count. Because of checkline problems on Ranked, there are sometimes huge ranking changes.

A problem with offroad can actually change the flow of race. For example, on Hacienda a player can move along the right side of the track until around Turn 1, which will have a lap counted, but a few seconds after the actual lap line was crossed. This allows making faster fake laps than normal laps. This can also save the leader from a basket ball or parachute, with basket ball being able to hit the actual second place.

There are also problems with ranking karts on the track on most reverse official tracks and Oliver's Math Class which can also affect the race. Basket balls can still hit someone not in the lead, and a player going off can be rescued way behind his mistake spot.

Finally, you should note that some tracks explicitly mark checklines with objects like powerups to make intended cuts. Good examples of those tracks are USC74, USC70 and USC19.

How to see them

You need to enable Artist Debug Mode and run STK with parameter --check-debug.

Future changes

According to issue 5062 and comments to it, it's planned to allow custom heights for checklines, and with more effort, they could be transformed into objects with any geometry, so that no matter how complex the area around is, the lap could be counted properly.

Links

Videos

How to exploit the track with one checkline

(Almost) All tracks with exploits as of 2024