Stunts Forum

Stunts - the Game => Stunts Chat => Topic started by: Duplode on March 23, 2021, 02:57:35 AM

Title: Penalty oddities
Post by: Duplode on March 23, 2021, 02:57:35 AM
A while ago, GTAMan pointed out a penalty time glitch that cropped up in one of Marco's lives (here is a direct link (https://youtu.be/YRUWCEXhgT4?t=1259)). It indeed is a new one for me; AFAIK it hadn't been documented yet. Here's the glitch: if the final track element is a split (and not a rejoin) connected to the finish line through the straight path, three seconds of penalty are always given, as if the final track element had been skipped. I guess it took so long for anyone to notice it because the only non-decorative reason for having a split immediately before the finish line is if you are making a Le Stunts track, and in the case no one will actually cross the finish line during the race.

This glitch joins a list of known penalty time oddities, one in which all entries so far have to do with splits and multi-way tracks:

Then there's Nagasaki (http://forum.stunts.hu/index.php?topic=3052.0), an USC 2014 track full of splits and crossroads which featured bizarre shortcuts skipping large parts of the track. I still have no clue about what was going on there.
Title: Re: Penalty oddities
Post by: Cas on March 23, 2021, 06:58:39 AM
Oh!  I didn't know that one!  I do remember that, if you make a path that goes around the start/finish line, then sometimes you can't go past the first split because the race is over and other times, you can, but then, when you want to watch the replay, it just stops there. These two things may be related as well.
Title: Re: Penalty oddities
Post by: Duplode on November 28, 2022, 03:31:23 AM
Though it's not strictly about penalty time, the issue noticed by Erik the other day (https://forum.stunts.hu/index.php?topic=4047.0) feels related enough to be worth mentioning here. Summing it up: in at least some circumstances, choosing a broken path on a dual-way split will make it impossible to complete a lap even if you move back to a winning path. That presumably happens due to the lack of a dual-way rejoin to signal the return to the track proper. I conjecture this bug only happens when the broken path is the alternative one (that is, not the straight one) at the split, though that still has to be confirmed through additional experiments.
Title: Re: Penalty oddities
Post by: Cas on December 09, 2022, 11:47:32 PM
It looks like the bug occurs always. I have just tested with this very simple track I just made and you can see in the image. I went straight and then followed the rest of the track. It didn't give me any penalty or wrong way warnings or arrows at any time and when I went through the start/finish line, it just went on. I used the LOLA, but I don't think that makes any difference. Just mention it just in case.
Title: Re: Penalty oddities
Post by: dreadnaut on December 10, 2022, 12:24:30 AM
That's quite nice, makes for great LeStunts tracks!
Title: Re: Penalty oddities
Post by: Duplode on December 10, 2022, 04:16:30 AM
There's plenty of potential indeed! Thanks for testing that, @Cas  :)
Title: Re: Penalty oddities
Post by: Duplode on April 08, 2023, 07:27:30 PM
I have found another penalty oddity while trying out PG cuts for CCC Round 2 (deadline is tomorrow, BTW -- go there and race (https://ccc.mystunts.net/)!). If you do a three-element shortcut and rejoin the track through a bridge crossroad from below, you will get 15 seconds penalty rather than the usual 18. A demo track is attached below. The off-road paths indicated in the map cut 3, 4 and 5 elements, and give 15, 18 and 21 seconds penalty respectively. If you switch the direction of the rejoin on the north of the track, though, so the bridge with the crossroad is no longer part of the track, the penalties become 18, 18 and 21 seconds. It remains to be tested whether the same happens with regular crossroads, and if the track is rejoined through the bridge.

crossch7.png

P.S.: Cartography code for the map annotations:

Arrow @17.5 3.5 *1 ^45 >0.075 #lightpink "5" {*0.75 'S}
Arrow @19.5 2.5 *1 ^90 >0.075 #palegoldenrod "4" {*0.75 'W}
Arrow @20.5 3.5 *1 ^45 >0.075 #paleturquoise "3" {*0.75 'S}
Arrow @22.5 5 *1.25 ^45 >0.075 #yellow "Rejoin" {*0.75 'E}
Title: Re: Penalty oddities
Post by: Cas on April 11, 2023, 08:31:33 PM
Uhm... why?   WHYY?  It looks like there are many things that, until we have fully translated the core engine to high level, we won't fully understand
Title: Re: Penalty oddities
Post by: Daniel3D on April 11, 2023, 10:15:03 PM
I think that it can't tell to which path a crossing belongs. It's a schrodinger element. It belongs to 2 different track sections at the same time. So it isn't counted at all..

Maybe 🤔
Title: Re: Penalty oddities
Post by: Duplode on April 11, 2023, 11:50:59 PM
Quote from: Daniel3D on April 11, 2023, 10:15:03 PMI think that it can't tell to which path a crossing belongs. It's a schrodinger element. It belongs to 2 different track sections at the same time. So it isn't counted at all..

It's not quite as bad as that, but from what I know I think your explanation isn't too far from the mark. The path finding algorithm involves sorting the track elements in a linear order, staring with the main path and followed by the alternates (trackdatas 01, 02 and 17 (https://wiki.stunts.hu/wiki/Trackdata) are involved in that). For that to work, splits, rejoins and crossroads have to be handled specially, and I believe that makes then behave differently when it comes to the penalty time calculation.