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

Adjust and improve interface structures and GUI experience #581

Draft
wants to merge 94 commits into
base: main
Choose a base branch
from

Conversation

BenCheung0422
Copy link
Member

@BenCheung0422 BenCheung0422 commented Nov 6, 2023

This depends on #543, #610, #618, #500 and #549.
Related issue: #633
This replans all confusing displays, many menu structures, reviews all localizations, and minorly includes changes related to menus and localizations. Some standardization and generalization will be included. Such parts will be included here later.

Changes to world creation menu:

  • The size of the menu is enlarged.
  • Default world name: "New World".
  • "Create World" entry is fixed as the last entry.
  • "Enter World Name" entry is renamed to "World Name" and fixed as the first entry.
  • "Trouble with world name?" entry is removed.
  • The remaining entries are arranged as (up-to-down): "Seed", "World Size", "Theme", "Terrain Type", "Quests", "Tutorials", "Game Mode".
  • Some minor options are renamed.
  • "Create World" button is now disabled when the world name is not valid, as in the design in the repair bench.
  • All entries will be aligned centered.
  • Input entries are now rendered in white when selected and valid.
  • The input will now be resolved when there is conflicts of the world name input.
    • For duplication, the name will be incremented in format of " ()" as Windows does.
    • World name preview is placed under the input entry.

Changes to the "troublesome input" entry:

  • The entry is removed from world generation display.
    Instead, a warning popup will be displayed in the key binding settings once the user set the keys. When the user first set the keys, an information popup will be shown, also providing a prompt hotkey for a revert. When exiting the menu, a warning confirmation popup will be shown.

Addition of "How to Play" menu:

  • Contents is integrated from instructions.txt book/text and "Controls" instructive display menu.
  • The entry is placed under help menu from the title display with the old position of "instructions" menu.
  • "Controls" entry is removed from options.
  • Input instructions from menus are removed, and mostly integrated into the "How to Play" menu
  • There is now only a line of text "(Only keyboard input is supported)" to replace the instructions on the bottom of the title display.
  • There are new rules regarding the input instructions.

Changes to world selection menu:

  • There are gaps between the title, world list menu and the description box.
  • When the user is trying to loading a world (and world version is not the "current" pre-release) from a pre-release, a prompt will be shown. An option to backup the world will be provided.
  • The world list will be arranged by the time last entered from the latest to the oldest.
  • The world list will be placed just under the title. There can be at most 6 to 8 worlds shown at once in the list.
  • The world version ("Version"), mode, the time last played will be shown in a menu box for the world selected by the cursor under the list.
  • 2 lines in the box: the first line includes the time (last folder modified time; ideally should be last played time); the second line includes the mode (Red when hardcore) and followed by the version (Red "< 1.9.1" is shown when the save is before 1.9.1; red version when the version is greater than the game version; otherwise normal). If no world is selected (the list is empty), the box will be empty but not removed.
  • 6 hotkey options will be shown under the box, each line is arranged as: "Play (Selected World)" and "Return", "(Create) New (World)" and "Delete", "Rename" and "Copy". (As of the canvas size limit, the names are shortened into only one word.)
  • When there is no world selected (empty list), the menu box will be empty but not removed, and the options "Play Selected", "Rename", "Delete", "Copy" will be dimmed and non-interactable.
  • Hotkeys for world editing are reverted back to C (Copy), R (Rename) and D (Delete), i.e. removing the SHIFT modifier.
  • Worlds are now searchable in the menu.
  • For the changes to world name input:
    • Rename: when the name has no change, regarded as no change; others as same as the world creation input.
    • Copy: when the name has no change, regarded as duplicated; others as same as the world creation input.

Changes to the display tree after "Play":

  • The dedicated display to select "Load World" and "New World" will be removed.
  • Once the "Play" button is clicked, the window will directly enters the world selection menu.
  • "Create New" will be shown at the bottom of world selection menu as an option (hotkey).
  • If there is no world in the save folder when pressing "Play", world creation menu is shown instead of world selection menu. However, when the last world is deleted from the world selection menu, the display stays, so that world creation menu is not automatically directed.

Generalizations for input entry options and interactions:

  • Changes to instructional non-selectable entries (external interactions):
    • "Input instructions" for special "options" entries are kept, but merged.
    • All external interactions will be rewritten following this.
    • If there are interactive options, there are "input instructions" commented aside the options with a pair of parenthesises.
    • The wordings of "<input keys> to <action>" (guided "to-action"s) are converted directly as "<action> (<input keys>)" (instructed actions), only for non-selectable entries.
  • Changes to instructional selectable entries:
  • Generalized rules regarding entry interactions:
    • If the entry is a singleton (non-collective) informative entry (e.g. worlds, items), the interactive options (including confirmation) will be regarded as "external", requiring external actions to manipulate the objects.
    • If the entry is a collection (e.g. filters), the actions only involving inspecting the contents inside will be considered as "manipulative", manipulating the objects within the collections; other actions will be regarded as "direct", manipulating the collections.
    • Otherwise, the actions will be regarded as "direct" (e.g. links).
    • An entry will not be guaranteed to be interactable even if it is selectable when there are only external interactions allowed to the entry.
    • In simplification with the current system, (all) the actions related to manipulating the entries will be regarded as "direct" (callbacks on entry interactions).

Updates and generalizations to entry coloring schemes

  • There are totally 5 shades of gray: white, silver, light gray, gray and dark gray
    • Generally, non-selectable comment-like or informative string entries will be colored in dark gray, and selectable will be colored in white (selected) and gray (unselected).
    • Titles are colored in silver in general.
    • Always, the color or the lightness/value should be different for entries selected and unselected if the entries are selectable.
    • If a menu box always contains all strings (unselectable entries), the entries are not necessarily rendered in dark gray, but if there is no any box (usually in different background), the entries are preferentially colored in dark gray.
    • If there is an interactable entry disabled, the colors are darkened by 1 or any specific level (difference should be obvious for user-friendliness) from its color, or the color when it is unselected if it is selectable.
    • Unselected selectable entries are generally colored in light gray.
    • Non-selectable entries for external interactions will be colored in gray.
    • For input entries:
      • If there is no additional filter, the entries will be colored as same as normal selectable entries.
      • If the entries are invalid (unmatched with the filters), the entries will be colored in red, and dark red correspondingly.
      • Unless any special situation, if the entries match with the filters, the entries will be colored as same as normal selectable entries.

Changes to item description box

  • Item description lines reorganized.
  • Description box builder is implemented.

Localization update

  • LocalizationString is added to prevent reluctant inconsistent requests about localizations.
  • All rendering-related string concentrations are converted into localization strings.
  • In case of language orders, some localization strings may use the format strings of %<index>$<...>. (Partial)
  • Missing localization strings are added. (WIP)
  • The way to converting a number to a string by using string concatenation of the value with an empty string should be avoided in practice, instead, String#valueOf() should be used in place of this.
  • All #localize fields other than in LocalizationString are removed with the addition of LocalizationString.
  • Save constant localization strings in static final fields?
  • It is important to note that string hashing is still more expensive than Boolean comparison + object referencing. (A normal localization string request involves 1 to 2 string hashing operations)

Changes to update checking:

  • GameUpdateHandler is added for update handling.
  • The version checking entries are removed from the title display list, but there will be a string at the bottom-left corner.
  • The check will be performed and the status will be shown with the string. Status as following:
    • Checking: "(Checking...)" (dark gray) - not dimmed as dimmed dark gray is invisible.
    • As latest: "(Latest)" (dark gray)
    • New version available: "(New available: )" (green; blue if pre-release) - It is shortened as the screen has a limit.
  • Checking can be disabled in options:
  • "Disabled" - No checking is performed. The status at the corner is hidden.
  • "Full Release Only" - Only check for full release, i.e. pre-releases are ignored in checking.
  • "All" - The latest release is being checked regardless of being pre-release.
  • Value is saved in options (updateChecking).

Game version changed to dev6 due to changes:

  • Preferences is added updateChecking entry.

Complements to world loading messages:

  • Originally, loading message is incomplete.
  • Loading progresses for the corresponding sessions are added.
  • Each session now carries a weighting in percentage.

Changes to languages menu:

  • The entry with the language currently selected is colored in green, and dimmed green correspondingly.
  • There is a new disclaimer without parenthesis: "Language translations may not be 100% accurate" (dark gray), on the bottom.

Changes to skins menu:

  • The entry with the language currently selected is colored in green, and dimmed green correspondingly.

Changes to help display:

  • PagedDisplay is added for the most uses of BookDisplay.
  • Ideally, BookDisplay should only be used for "real" books.

Changes to key input display menu:

  • It is renamed into "Controls" (ControlsSettingsDisplay).
  • If the key mapping settings are read-only (i.e. controller mapping), they will also be displayed in the menu.
  • Key binding conflicts between moving and cursors will no longer be considered, as they are not used at the same time.
  • Key mapping conflicts are separated into 3 groups when under considerations, so meaningless conflict showing is reduced.

Player item held HUD bar is completely updated.

Changes to inventory menus:

  • Positions and sizes, i.e. dimensions are now fixed, so translations and reconstructions of menus are no longer needed.
  • As the space of the menus are limited, item entry scrollers are implemented.
    • As there are some problems for the item entries aligned right, they are now all aligned left.
    • The item sprites are fixed on the left, as usual.
  • The menu will be dimmed when it is not selected.

Changes to pause menu:

  • An option to save and quit is added when quitting world.

Some important features should be included:

  • Saving auto-save options in world-wide.
  • Saving last played time.

There might be more dependencies included along the continuous development.
Related post on Discord: https://discord.com/channels/280723930942013440/1143477245369921606

# Conflicts:
#	src/client/java/minicraft/item/Recipes.java
It is not forcing users to change the key bindings, but it is not realistic if it happens.
# Conflicts:
#	src/client/java/minicraft/gfx/Font.java
#	src/client/resources/assets/localization/en-us.json
Also, some minor text instructions are removed.
Now this indicated that the world is pre-1.9.1, as there is no version
@BenCheung0422
Copy link
Member Author

This pull request is finished, but there are 5 dependency pull requests not yet merged.

@Makkkkus
Copy link
Member

Repeating what I wrote on the Discord:
Don't use my issues in this way. I'm completely against this. The issue, as I have explained to you already, is not about the gui in general, just the status gui. But since you constantly abuse this to give yourself some sort of backing for your proposals I will close it.

The game is supposed to be minimal. Adding three different sets of gui will not only be a headache to work with, a cause for many bugs, but also make the game more complicated to use by a player. This is more fitting as a suggestion for a mod.

Please stop proposing features nobody wants, as evidently showed by the many suggestions you have opened. You're allowed to fork and create a mod for minicraft if you want to do your changes. I suggest you do that. There nobody can stop you, and you should also realise how bad the game gets if you add new features uncontrolled.

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.

None yet

2 participants