RetroAchievements / RAIntegration

The DLL responsible to integrate emulators with RetroAchievements.org
https://retroachievements.org
MIT License
98 stars 23 forks source link

Condition flag for progress #4

Closed meleu closed 5 years ago

meleu commented 6 years ago

From @Jamiras on March 21, 2018 14:51

As a developer, I'd like to mark a HitCount condition as a progress indicator for providing feedback to the user.

Many achievements fall into the category of do something N times, but the user doesn't necessary know how may times he's done it. This feature would enable specific achievements to report progress using the leaderboard UI.

Conceptually, as each achievement is processed, any active achievements with a Progress condition and a non-zero HitCount would calculate their progress percentage. Whichever was closest to completion would show up in the corner like a leaderboard.

For example, if there are achievements for killing 100 enemies and 1000 enemies, both would have a HitCount of 50. 50/100 = 50% and 50/1000=5%, so only the 50/100 would be displayed.

I'm not sure the best way to indicate what the progress is measuring. The best idea I've had is to show a leaderboard startup popup "Challenge available - kill 100 enemies" when the HitCount changes to 1, but if the user is working towards multiple goals at the same time, one might jump ahead of the other and suddenly the progress changes from "50/100" to "5/8" and the user may not remember what he's supposed to be doing 8 times.

By using the Flag field, this logic can be applied to a single condition or a series of AddSource or AddHits conditions. It also eliminates the need to change the UI.

Copied from original issue: RetroAchievements/RASuite#57

meleu commented 6 years ago

From @Jamiras on March 21, 2018 14:56

Additionally, a "failed" message could be displayed if the Progress HitCount was reset back to 0.

kdecks commented 6 years ago

I would think the best approach would to use the overlay to give some on screen data for these cases.

I've jimmy rigged a few achievements to give a on screen failure state in the past.

http://retroachievements.org/Achievement/46001

... I guess you've said exactly that...

kdecks commented 6 years ago

@Jamiras @GameDragon2k was mentioning something about a sever call related to this, care to describe?

Jamiras commented 6 years ago

This shouldn't require a server call. I believe @GameDragon2k was referring to a situation where the progress is maintained between sessions. If you only kill 50/100 and then quit, you currently (and with this approach) have to start back over at 0.

Jamiras commented 5 years ago

I'm going to mark this as closed. The progress meter has been added to the overlay, but there is no on-screen indicator at this time. In most cases, having a marker on-screen - especially if it isn't updated frequently, or changes as different progressions update - is a distraction. A player interested in their progress can access the overlay.