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

Adds a Debug Panel #504

Open
wants to merge 18 commits into
base: main
Choose a base branch
from
Open

Conversation

BenCheung0422
Copy link
Member

This adds a debug panel and removes all in-world debugging key bindings. This could make the key bindings cleaner and neat. Instead, a list entry menu (triggered by F4) is used and searching is available. (No localization) This would be a way to organize all the debugging functions and features without a lot of (confusing or messy) key bindings.

@Makkkkus
Copy link
Member

Makkkkus commented Jun 20, 2023

No new debug panel is needed. The arguments I presented in #502 still apply. This is bloat, and I would prefer going back to the way it was before #454 (although not all changes are bad in that pull-request).

@Makkkkus Makkkkus closed this Jun 20, 2023
@BenCheung0422
Copy link
Member Author

BenCheung0422 commented Jun 20, 2023

However, I think there might be too many key bindings and that might make confusion.
And I prefer reducing unnecessary key bindings as not all debugging keys are always used and sometimes they bind to different modifiers .

@Makkkkus
Copy link
Member

It doesn't matter. They're only possible to use when using debug mode.

@BenCheung0422
Copy link
Member Author

BenCheung0422 commented Jun 20, 2023

It can still be a problem as sometimes looking-up for key bindings is still required if the key bindings are forgotten or not yet known.

@Makkkkus
Copy link
Member

That's why we have our wiki. Using F3 or F4 won't change that.

@BenCheung0422
Copy link
Member Author

And a in-game instant lookup. F3 only triggers the debugging information panel, but this F4 triggers an action panel.

@Makkkkus
Copy link
Member

Yeah, it's not needed.

@BenCheung0422
Copy link
Member Author

BenCheung0422 commented Jun 21, 2023

There are 23 associated debugging key bindings, if every time using the bindings requires lookup, using built-in interface with only 1 key would be better than opening up the wiki page on browser and find line by line the key bindings required. This compresses 23 key bindings into 1 key. Sometimes, if it is required to add debugging functions, new key bindings are always needed, but in the panel, it is not a hard requirement.

@Makkkkus
Copy link
Member

I'll reopen this on the condition that you readd the --debug launch argument.

@Makkkkus Makkkkus reopened this Jun 23, 2023
# Conflicts:
#	src/client/java/minicraft/screen/DebugPanelDisplay.java
@BenCheung0422
Copy link
Member Author

I have re-added Game#debug and --debug flag. The corresponding codes that was relying on that field have also recovered. I am not sure if the detailed debugging flags --debug-* should be enabled only when --debug is also enabled.

@BenCheung0422
Copy link
Member Author

BenCheung0422 commented Jul 9, 2023

There could be a function to area set tiles with using menus (inputs) and some more useful functions can be used for making maps?

@Makkkkus
Copy link
Member

Makkkkus commented Jul 9, 2023

I don't understand what you mean?

@BenCheung0422
Copy link
Member Author

When making maps, special actions to changes tiles and entities are required. Testing some features may also require large range tiles.

@Makkkkus
Copy link
Member

Makkkkus commented Jul 9, 2023

Still don't understand. Creating maps?

@BenCheung0422
Copy link
Member Author

Customizing worlds in creative mode. Although there are currently no trends in making maps and publishing maps because there is lack of this kind of functionality, testing some features is still requiring an environmental setup and that might require major change to the testing world. Having this kind of debugging or creative mode exclusive functions could reduce the work required and make convenience. Some of this kind of functions I can think of are tile setting, region filling, entity summoning, potion effect modifying, etc.

@Makkkkus
Copy link
Member

What do you want to do?

@BenCheung0422
Copy link
Member Author

Add a debug function entry in the panel and use menus to do the actions.

@Makkkkus
Copy link
Member

We already have creative mode. Don't destroy that.

@BenCheung0422
Copy link
Member Author

It also adds another function to creative mode, like Minecraft's fill command.

@Makkkkus
Copy link
Member

Okay. That's something I see the use for.

@BenCheung0422
Copy link
Member Author

BenCheung0422 commented Aug 15, 2023

We might change some of them into string commands if we need to. Also, the implementations of the commands proposed previously have been done.

@ChristofferHolmesland
Copy link
Member

I have reviewed the PR, but I don't approve of the changes as explained in Discord.

# Conflicts:
#	src/client/java/minicraft/core/Updater.java
#	src/client/java/minicraft/core/io/Localization.java
#	src/client/java/minicraft/entity/mob/Player.java
#	src/client/java/minicraft/level/tile/Tiles.java
#	src/client/java/minicraft/network/Analytics.java
#	src/client/java/minicraft/screen/Menu.java
#	src/client/java/minicraft/screen/TitleDisplay.java
# Conflicts:
#	src/client/java/minicraft/core/Updater.java
#	src/client/java/minicraft/level/tile/Tiles.java
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: To do
Development

Successfully merging this pull request may close these issues.

4 participants