Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update/replace checkpoint system #25

Closed
bzier opened this issue Nov 12, 2017 · 1 comment
Closed

Update/replace checkpoint system #25

bzier opened this issue Nov 12, 2017 · 1 comment

Comments

@bzier
Copy link
Owner

bzier commented Nov 12, 2017

Deficiency:

The recently introduced checkpoint system (#22) utilizes the mini-map to detect character progress. This is imprecise and challenging due to the variations in the maps for each course (overlap, crisscrossing paths, off-course driving / shortcuts, etc).

But wait...

There is an alternative HUD view in Mario Kart which presents character progress by drawing a line around the edge of the screen. This line is drawn in one of three colors that designates the current lap (see notes below).

hud_progress_t

So...

Rather than sampling the mini-map and needing to maintain checkpoint locations for each course independently, this mode can be used to provide a consistent representation of progress on all courses (including the 'unknown progress' on Yoshi Valley). Additionally, it consistently and accurately reflects progress even as the character drives off-course and/or takes shortcuts, and it un-draws the colored lines when the character drives backwards. These advantages make it a significant enhancement over the current system.

Notes:

  • C-Right (right thumbstick right on Xbox Controller) to cycle HUD views
  • Coordinates:
    • Upper left - (64, 36)
    • Lower right - (585, 445)
  • Laps:
    • 1 - Blue (0, 0, 255)
    • 2 - Yellow (255, 255, 0)
    • 3 - Red (255, 0, 0)
@bzier
Copy link
Owner Author

bzier commented Nov 17, 2017

The committed implementation is mostly complete, however there are still some changes necessary.

Still left TODO:

  • Post-race menu retry will result in racing against the best prior race's ghost, which messes up the progress detection (both the current character and the ghost draws their progress on the HUD)
    • Doing a driver/course change wipes the ghost
  • Implement some sort of backward/reverse detection & punishment
  • Update end episode detection since now we can detect immediately (partially done)

bzier added a commit that referenced this issue Dec 2, 2017
bzier added a commit that referenced this issue Dec 17, 2017
When doing a retry, the subsequent race will be against the ghost character. Doing a course 'change' rather than a retry avoids this (see #25)
bzier added a commit that referenced this issue Dec 29, 2017
* Refactor menu navigation

* Change post-race retry to avoid ghost

When doing a retry, the subsequent race will be against the ghost character. Doing a course 'change' rather than a retry avoids this (see #25)

* Improvements for PR #36
@bzier bzier closed this as completed Mar 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant