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

Show "x units due" on Big Button, setting for cycling units #12814

Merged
merged 5 commits into from
Jan 18, 2025

Conversation

sulai
Copy link
Contributor

@sulai sulai commented Jan 14, 2025

This PR is an alternative approach to #12799 - we should decide for one of them to merge.

It adds a small Label below the "Next Unit" label within the Big Button, showing the number of due units.

I personally think this one got several advantages over the other:

  • no extra button required (as opposed to the "Wait" button)
  • it educates the player that the NextUnit button does (cycling or skipping a turn)

When cycling is enabled in the settings:

  • doesn't change game state, no accidental skipping of units
  • it encourages the player to use the normal unit commands
  • Easy cycling with Space on Desktop and Big Button on Android

grafik
Due units on Big Button. counting down as you give orders.

grafik
When NextTurn is disabled in the settings, the "x units due" also shows on the "Next Turn" Button. In case the user doesn't like the cycling, he still gets notified about some units being idle.

@sulai sulai marked this pull request as ready for review January 14, 2025 00:39
@itanasi
Copy link
Contributor

itanasi commented Jan 14, 2025

The biggest issue here is this goes against the poll result that players would rather a singular Big Button would mark their units as Done for the turn (due=false)
https://discord.com/channels/586194543280390151/618491418859798539/1327727351122886697

And again, you need to mention this changes Next Unit to purely a cycle action in the title.

@sulai sulai changed the title Show "x units due" on Big Button Show "x units due" on Big Button, it cycles units Jan 14, 2025
@sulai
Copy link
Contributor Author

sulai commented Jan 14, 2025

Please note that the poll is biased. The participants didn't have the chance to actually try the alternative in order to form an unbiased opinion.

It's the "oh it works much better than I thought it would" - moment that often occurs when people actually use a feature themselves. There's always a natural and understandable friction to change. We should consider that bias when doing polls.

That being said, this PR makes it very feasible to have a setting to change the button's behavior, while the 2-button-solution is problematic in that regard.

@itanasi
Copy link
Contributor

itanasi commented Jan 14, 2025

I think at minimum we should add a new Tutorial screen that pops up the first time someone presses the Next Unit button to explain that they need to give the Wait command to units to progress the game.

And considering the poll, have the option to switch functionality back to Mark as Done would be a nice to have.

@sulai
Copy link
Contributor Author

sulai commented Jan 14, 2025

You got a point, agreed 👍

I would even agree to make setting due=false the default to be as beginner-friendly as possible. You're right they're probably not aware of the Wait command and probably didn't read the tutorial. It's not the best choice for anyone else, but offering it as a setting is a compromise I can live with.

@sulai
Copy link
Contributor Author

sulai commented Jan 14, 2025

I added the setting and by default, the Big Button sets due=false to make it safe for beginners.

@najevi
Copy link

najevi commented Jan 14, 2025

Is a "due unit" what the game option "Check for idle units" refers to as an "idle unit" ?

For the two of you the simple description due=false carries meaning and is very clear but to a humble user that is code.
Same could be said 'done=true' which came up elsewhere in discussions.

Elsewhere, @itanasi pointed out to me that the Next button in the UnitInfo pane is not identical in function to the giant (Next unit) button. That has not been my experience (and I have tested with "Check for idle units" option both enabled and disabled) so it leaves me wondering why my experience of the game should be so very different.

I mention the above only to caution you that introducing the word "due" to the UI might need greater consideration. Does that word appear anywhere else in the game help 'pages' or the the game options?

Might the word "idle" mean something that a user can better relate to? A user may very well remember having set or cleared the "Check for idle units" option but not necessarily make the connection between that and the word "due".

@itanasi
Copy link
Contributor

itanasi commented Jan 14, 2025

There is a subtle difference.

Idle Units have no active Order and still have Movement Points this turn.

Due Units have been marked with due=false to indicate even if they're Idle, we don't need to cycle to check on them.

And yes this is not a term used elsewhere and is purely understood by programmers for specificity under the hood. If you'd like to suggest a better term please feel free to do so. But specifically this is not the same as Idle. These are Waiting for Orders. Or "Awaiting Orders." Would that work better? Annoyingly a lot of letters.

@najevi
Copy link

najevi commented Jan 14, 2025

Thank you, that does lend clarity and I will observe a little more carefully to see if I can now notice the difference in just which units are cycled by one button versus the other.

As for a synonym. Perhaps "Untasked". Of course, that has never been used in game either. It is one word though!
"No orders" might be more letter-frugal.

@najevi
Copy link

najevi commented Jan 14, 2025

When NextTurn is disabled in the settings, the "x units due" also shows on the "Next Turn" Button. In case the user doesn't like the cycling, he still gets notified about some units being idle.

I am glad you anticipated that. I've been using that alternate mode lately (i.e. "Check for idle units" not set and therefore there is no "Next unit" button displayed) and I wondered how unit-queue-status might be tracked in the absence of a (Next unit) button.

There is a very similar edge-case to consider: when at least one unit has been given a multiple-turn movement order. So there may be some (Move automated units) buttons that would benefit from incorporating that unit-queue-status information as shown here.

@SomeTroglodyte
Copy link
Collaborator

Good ol' "Studio mutilates my files" thing:

com.unciv.logic.TranslationTests > allTranslationsEndWithASpace STANDARD_OUT
    'Next unit' button cycles idle units = ends without a space at the end
    [amount] units due = ends without a space at the end

@sulai
Copy link
Contributor Author

sulai commented Jan 14, 2025

@SomeTroglodyte thank you for pointing this out, fixed it!

I'll officially confess that I'm obsessed with that button... since a whopping 6 years 😄

That's also when I introduced the unit.due attribute and at that time, it was only used for the big button to keep track which units the player had already checked on. As time went on, it more and more was used as an equivalent for "wait one turn". It might make sense to internally rename due=false to waiting=true.

It's not related to that text under the button though. I think due is a good word to use there. Short and to the point.

So guys, in a way, what I did 6 years ago is responsible for all the discussions we have today. My apologies 😄

Not sure how to proceed with the PR. Are we ready? Is it a step into the right direction? Is everyone happy?

@sulai sulai changed the title Show "x units due" on Big Button, it cycles units Show "x units due" on Big Button, setting to cycles units Jan 14, 2025
@itanasi
Copy link
Contributor

itanasi commented Jan 15, 2025

Personally looks good to me

@sulai
Copy link
Contributor Author

sulai commented Jan 15, 2025

@yairm210 this one is ready to merge

As a side note, just to get the terms clear both from the player's perspective (bold) and in-code (fixed width font):

  • due=false is identical to the term Waiting from the player's perspective. This has historic reasons (see my post above).
  • Idle units are all units with movement points left and no task assigned. "Waiting" counts as an assigned task. In code, unit.isIdle() and unit.due are two separate things. If we wanted to be very clean we could fix that discrepancy and rename due to waiting, because that's what it means nowadays. That'd be a rather large change though.
  • Due units from the player's perspective only exist when the Big Button is set not to cycle units, but visit them only once. Due units are units which haven't been visited yet using that big button. Due units and Idle units are the same though, because behind the scenes, the Big Button commands units to Wait one turn.

@sulai sulai changed the title Show "x units due" on Big Button, setting to cycles units Show "x units due" on Big Button, setting for cycling units Jan 16, 2025
@yairm210 yairm210 merged commit 7e3827b into yairm210:master Jan 18, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants