1. Summary
  2. Files
  3. Support
  4. Report Spam
  5. Create account
  6. Log in

Ticket #398 (closed defect: fixed)

Opened 21 months ago

Last modified 20 months ago

Reset feature works to unpredictable and sometimes wrong

Reported by: stefanpmuc Owned by:
Priority: normal Milestone: 0.7.3
Component: SuperTuxKart Version: 0.7.2
Keywords: Cc:

Description

The reset feature that is triggered when you are off-track is way to unpredictable.

On some tracks you only have to drive against a wall and you are reset because your kart is "shaking" strongly (on some of the snow tracks, I think Snow Hill, this can be seen very good). I'm not exactly sure, but sometimes it seems to me that it is triggered if the kart is "in the wall" (so, on a clipping error). So it would not be a problem with the shaking of the kart, but a problem with its position. In this case the reset trigger code should make clear, if the kart is really off-track or if it's just "behind a wall" because of a graphics error.

But on other tracks you have to fall down quite a large distance before the event is triggered (for example on XR591).

On XR591 I also noticed that it resets the player to a wrong position sometimes. This seems to happen if the tracks cross each other. I was then resetted to a place that was far behind my current position (and lost the race because of that).

Change History

Changed 20 months ago by auria

For the record, my idea of a fix.

1) at race start there is a loop going through all quads, and for each quad marks the required checkline (e.g. the first quads will have "lap", then some quads will have "checkline1"+"lap", then later quads will have "checkline1"+"checkline2"+"lap"). This part may be a little tricky
2) during race we keep some history of quads that have been driven on (could be limited to the latest quad driven on before the next checkline)
3) On rescue, check the required checkline of the quad we are on; if this checkline has not been activated for the current player, go back in history and take the player back to the previous quad he drove on where he had all off the needed checklines

If we find a way to do point 1 the rest should be straightforward and fix all issues I can think of

Changed 20 months ago by auria

Work started in r9805 - now each quad is properly assigned of pre-requisite checklines when the code is enabled (in my commit it's disabled).

Main issue now is that the current system only keeps one latest checkline, and not a list of checklines enabled up to now. That's sort of problematic since when assigning prerequisite checklines to each quad I'd rather not have to sort the checkline graph to figure out which is the latest one. But we can most likely find an easy solution for this

Changed 20 months ago by auria

Ok I completed implementation of "smart reset" in r9807 :)

please note though that this depends on checklines so tracks like XR591 that have a single checkline aren't going to work just yet. So I think in places where this can happen we need to add checklines

Changed 20 months ago by auria

And more work in r9808, r9809 and r9810.

Now it seems to work pretty well to me :)

Changed 20 months ago by auria

  • status changed from new to closed
  • resolution set to fixed

XR591 should now be OK as of r9859.

Thanks for the report, if you find more places that need fixes please reopen this ticket. Maybe as well we could open a ticket about auto-rescue being triggered too easily when hitting a wall

Note: See TracTickets for help on using tickets.