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

Ways to do with Power Glove #567

Open
BenCheung0422 opened this issue Aug 30, 2023 · 23 comments
Open

Ways to do with Power Glove #567

BenCheung0422 opened this issue Aug 30, 2023 · 23 comments
Labels
Help wanted An issue requiring extra attention. Improvement Ideas for changes to features or content.

Comments

@BenCheung0422
Copy link
Member

BenCheung0422 commented Aug 30, 2023

The code for the power glove has existed but considered to be removed, as described in #258. However, completely removing the item is not a way, as we need an alternative to handle furniture holding.

Suggestions

There are several plans to be done on the power glove:

Remake it as an equipable gear

The item may be renamed, but the use is similar. Player needs to equip the glove onto their hand before picking up any furniture, but without the extra hotkey. The hotkey is useful only for picking up furniture, so the usage may not be high, thus the removal is recommended (as per my previous comments elsewhere).

Based on #718, it can be made as an equipable gear, so it can be directly enabled on the HUD like the map (#568), or just staying in a slot on the hotbar instead. If it is an equipable gear, the hand must be empty to use the glove; if just staying on the hotbar, only switching to the slot is required, and even more simple. When it is used, player can just use (may along with sneaking) on a furniture. Player would still be able to put it back to inventory, but the implementation depends (on the furniture), since it may not be a good idea for a filled chest to be put into inventory as portable storage (too powerful).

Proposal A (comment):

When glove is not equipped
Player cannot pick up any furniture
When glove is equipped on hand
Player can only pick up furniture and only one capacity
When glove is equipped on hand and occupied
Player can only put it down before picking up another furniture
When glove is equipped in inventory
Player can equip the glove onto hand when hand is empty

Additional features:

  • Stamina consumption: In the current implementation, picking up does not consume stamina, but should be and just for the action (not continuous consumption as it could be troublesome)

Combine it as an integrated picking up function
Just as the removal proposal (basically #258), completely removing the item from the code. And it would be completely integrated as an interaction function besides attacking and using.
@BenCheung0422 BenCheung0422 added the Improvement Ideas for changes to features or content. label Aug 30, 2023
@BenCheung0422
Copy link
Member Author

BenCheung0422 commented Aug 30, 2023

We should also have an ability to pick up tiles like signs like torches and non-empty furniture.

@JamesTDG
Copy link

Suggestion: Player gets the power glove item upon spawning, but it functionally acts as a "grab" mode that the player can toggle. Item should despawn from inventory upon death.

@BenCheung0422
Copy link
Member Author

If understand your point, you mean let it act as an equipable tool?

@JamesTDG
Copy link

That is correct

@BenCheung0422
Copy link
Member Author

Then, Proposal A for the new system:

When glove is not equipped
Player cannot pick up any furniture
When glove is equipped on hand
Player can only pick up furniture and only one capacity
When glove is equipped on hand and occupied
Player can only put it down before picking up another furniture
When glove is equipped in inventory
Player can equip the glove onto hand when hand is empty

Hmm, maybe a new inventory system has to be done before adding this glove system.

@JamesTDG
Copy link

That may be ideal. Speaking of which, what was decided upon for the system, weight of an object (seen in Ark or Rust), the size/shape of an object (seen in Subnautica or Backpack Hero), or stack limits per dedicated slot (seen in Minecraft)

@BenCheung0422
Copy link
Member Author

Interesting ideas. Actually weights can be complicated in Minicraft, but should be something addable by mods. Size/shape may not really fit the game system. Stack limit is implemented, but not fully (scalable).

@Makkkkus
Copy link
Member

Makkkkus commented Nov 20, 2024

Why create a duplicate of #258 when this whole issue would better fit as a comment? This issue is not sustantially different, so I don't think it warrants a new thread.

I still stand for my original proposal to remove the power glove item. I don't see why it is needed, as it is currently only used internally, and removing it will be as simple as editing a couple of lines in the player code.

I did not remove it because of dependencies, but seeing as the multiplayer code has been removed and the multiplayer fork having stopped development, there is nothing stopping us from removing it. I also don't know what happened to the modding API, but it also seems to be inactive.

Using P to pick up furniture is also simply better because of three reasons:

  1. You don't need to find the item in your inventory every time you want to pick up something.
  2. We don't need to implement an item that cannot be dropped, put into chests, and otherwise be removed from the player's inventory.
  3. Simpler code when picking up (simply call a function in Player, instead of classes with interaction and etc.)

Weight can be implemented independently of using a powerglove or not.

@BenCheung0422
Copy link
Member Author

@Makkkkus based on your points, my new proposal, Proposal A for the power glove has improved such ideas. With the aid of #718, power glove (or as another item) is remade as a equipable gear. Once equipped as equipment, player can use the glove without needs to search through the inventory. It does not have to be unremovable as an ordinary item, but the point is probably that, picking up always requires the glove, and hence no reason to put it down (durability/equipment slots?). It could indeed add an element that player needs a tool to move furniture in the game.

Anyway, when the player has not equipped the glove, it is not possible to pick up furniture. It is not totally inconvenient, but able to free a hotkey from the keyboard for other uses. It is also possible to bind this action with sneaking.

Weight might be another point here. Currently, occupied chests cannot be picked up partly because of the item data. At the another point, it is an addition of element into the gameplay. I am not going to say implementing weight into the inventory, so picking up consumes stamina, including the moment of action and continuous holding for filled furniture. Still, I do not stand for implementation of weight here.

@BenCheung0422
Copy link
Member Author

I have updated the description to rewrite the suggestions more clearly.

@Makkkkus
Copy link
Member

If I wasn't clear enough in my message, I apologise.

I completely disagree with keeping the power glove item in any form, as per my earlier comment. I still stand for my original proposal to have it removed. There is absolutely no need to make something that is as easy as pressing the P-key harder.

@BenCheung0422
Copy link
Member Author

BenCheung0422 commented Nov 26, 2024

Then, I am still in opposition.

I agree to keep the item functionality and originality as equipable gear and remove the extra occupied key binding for item implementation. This would allow one more hotkey for future functionalities in addition. I am not quite comfortable with the potential conflicts of interactions by just the picking up function. Also, this makes the code structure a bit harder to standardize well.

@zandgall
Copy link
Contributor

Is there any particular reason why using space on furniture does not pick it up if you are empty handed? Playing the game, I would much rather just be able to pick furniture up without needing a special item for it. The P key works fine for me, as I have a keyboard layout that puts P where the R key is on QWERTY keyboards, but it seems a bit out of the way by default for what I would call a primary or secondary interaction.

@BenCheung0422
Copy link
Member Author

There are several reasons why I would prefer the new proposal suggested.

Main reasons:

  • Originality:
    Power Glove existed originally in the original Minicraft as an item, so as the interaction key (not by a specific hotkey like P). The original implementation was removed by this. In the proposal, it is instead kept as an item.
  • Hotkey Availability:
    Currently, 13 (or 14 if SHIFT+I counts) alphabet keys have been assigned as key bindings by default, which represents around half of all 26 the alphabet keys in gameplay. Also, while PICKUP has been assigned to both V and P, P has also been assigned to POTION-EFFECTS, which has already been a conflict in gameplay. If such key binding conflicts are resolved by using other keys, the availability of alphabet keys would even be lower, even with just these functions. It is also not a really good idea for user convenience (confusion and accident key press) if the ratio of occupied hotkeys to functions is too high.
  • Minor Interaction Hotkey:
    As a kind of interaction hotkey, both the usage frequency and scope of it are quite low compared with other interactions like attacking and inventory menu. The scope of picking up is limited to just furniture (in general), but many other functions bound can be used "universally". This renders the value of effectiveness of this function being a dedicated hotkey really low.

Minor reasons:

  • Code Quality (Organization/Standardization):
    When the interaction is based on item implementation, more diverse code would be needed to handle all the interactions while they all interact with tiles or entities in the similar way. Like I did in Explicitly separate rigidly definite player interaction actions #552, I separated picking up function from interact, but an addition of new method is added consequently, which is not quite ideal when considering their values of effectiveness.
    If it can be merged into and based on just an item implementation, it would not need to be handled like being with regard to all world objects globally. Instead, all handles are made into the item, without bothering global interactions. Thus, the item is used as like an item with the corresponding key to use it on entities (and tiles), not occupying the slot of extra function code globally on the "hotbar".
  • Extensibility/Moddability:
    As aforementioned, the hotkey availability is not quite high, the feasibility for allowing more new features or functions is limited. This may prevent the flexibility of feature additions.

In fact, though little off the topic, the old hotkeys should be simplified to just the new keys to align with the convenience of functions also the availability of hotkeys, while users can still customize such keys.

@zandgall
Copy link
Contributor

A majority of your reasons appear to be satisfied with collapsing the pickup key into one of the generic 'interact' buttons. There should be no problem checking a few conditions and either attempting to pick up furniture or attempting default interact based on them, I'm sure this sort of thing is already done in the code somewhere.

Looking at the PR you linked, you advocate a 'use' key separate from the 'attack' key, but there's still a 'crafting' key that opens furniture menus. I think the 'use' key (or menu in current state, or even attack, just any primary or secondary interaction keys) could absolutely be used to also pickup furniture.

I agree that pickup being a dedicated key is a bit of a waste, since you can only use it in the right conditions. But that makes it perfect to be one of many functions of a generic interaction hotkey.

Unless the frustration of keeping around an item and making sure you have it equipped in order to pick up a piece of furniture adds something valuable to the gameplay, it should be simple and intuitive. The 'reward' of keeping around a P-glove and swapping out items/equipping it is something that I feel should just be possible via generic interaction.

@BenCheung0422
Copy link
Member Author

The suggestions you mentioned could still violate the extensibility/moddability.

To answer your question previously:

Is there any particular reason why using space on furniture does not pick it up if you are empty handed?

We have to handle the code better to fit possible modded content, so this could highly conflict with some potential features. Again, this would limit the functionalities.

As for the pull request, I think you may have to read through the description again:

"Inventory" now only opens player inventory menus or closes some in-game menus (usually furniture-related); "attack" now only handles direct damage and tile destroys with bare hand (fists) or any item on tiles or entities; "use" is now used for interacting with furniture, placing tile and furniture, item interactions, etc.

INVENTORY only opens the inventory menu wherever in the world, regardless of world interaction used to with MENU. So, USE is used instead of furniture interactions, like opening the crafting menu from a workbench or opening the container menu from a chest.

In addition, mentioned that in the description above, there can be a combination of sneaking+glove+use to pick up furniture. I would not say these to be frustration, but can certainly reduce much potential hurdles and troubles when implementing future functions and features.

@zandgall
Copy link
Contributor

I still feel like using the P-glove is frustrating, I don't want that to be lost on anyone. Like it is obviously more cumbersome to use than a hotkey, but specifically I don't think it adds anything to the game within that cumbersomeness. It's not like working hard in order to do something special, it's just moving your crafting table a little faster than nudging it.

I also do not particularly see how it would take that much more effort to implement a multi-purpose interaction key than an item, obviously it would take more effort, but I'm not convinced that it's a significant amount of effort. Nor do I see why this would affect mod-ability, let alone why we should cater to modding functionality that doesn't even exist in the first place.

You could absolutely make this feature in a way that it is still easy to add on to. Unless you mean something else by 'extensible'. It's a simple matter of checking conditions (i.e. empty handed and looking at furniture), if those conditions are met, then run the pickup interaction. If they aren't, then move on. You can then either check a different interaction condition, or run the default interaction.

If you're really sure this would limit future functionality, what specific potential limits do you see happening with this kind (or any kind) of implementation for this feature?

@JamesTDG
Copy link

I feel like we need more mechanics surrounding the glove if we were to try and keep it, such as the ability to throw stuff (tnt use case?)

@zandgall
Copy link
Contributor

I like the idea of being able to pick up things you're not typically able to pick up using the power glove. Mobs would also be an interesting idea, (it would need a lot of discussion and consideration as to whether or not that fits the game/is a good idea), and in that case you would probably want to make the glove something you have to work for, like make it hidden in lower level dungeon chests.

@BenCheung0422
Copy link
Member Author

Like I have mentioned, keeping it as a hotkey already takes up a key space, so one less function can be bound to the key, thus the extensibility. On the other hand, if it is implemented by empty hand + use, it is even more limited to future implementations. If later there is a feature requiring using the empty hand to interact the furniture, which has already been the conflict, thus less functions can be implemented. This is why I suggest keeping it as a single item implementation without bothering the global interaction system.

We allow mods to be made on this game, even this Minicraft+. This is one of our goals, allowing more and better customization, moddability, etc. We even had discussions to whether implement a mod loader directly into the game, but a reserved idea instead.

It is not an ideal case to have a functionality being limited by certain conditions and do not work universally. It is not whether it is a simple condition check or not, though even worse if it is simple actually. It was an item, so it could be made as an item, and could work as intended.

@BenCheung0422
Copy link
Member Author

In addition, I do not see how it is a multi-purpose interaction key, but instead, I can see it as a poorly utilized hotkey for interaction. So, there is no quite a great point to make it dedicated key in the first place. Then, to reduce the barriers we may eventually come to, this proposal can work well.

At the moment, I would not discuss whether to add new features to the picking function, but just the implementation style of the interaction. I have to emphasize again that, I absolutely do not agree implementing to be just "when empty hand in front of furniture". Equipping the item could let the system know the player actually want to pick it up without normal use interactions. It is not a cumbersomeness problem, but functionalities.

@zandgall
Copy link
Contributor

Either you misunderstand or I miscommunicated, but it does not limit extensibility. The attack key attacks both tiles and entities, it is not hindered by this multi-functionality. Similarly, interact would not be hindered by interacting the way it does, and interacting with furniture by picking it up.

Is there a different feature you want to use interact on furniture with an empty hand? If there isn't, why are you arguing that there could be? (Imagine if someone said "We shouldn't add the dungeon because what if there is a better use for B4?")

Is your power glove functionality limited because we could theoretically use it for something else?
No, deciding it's functionality is something you do, and if you have a better idea in the future, you change it.

I looked at the player input code and it's already doing almost what I'm suggesting with a bunch of things. There are interactions that only happen when there is no screen open, when there's no furniture in front of the player, if the player is currently empty-handed. Adding if(input.inputPressed("use") && activeItem == null && use()) blends in perfectly, I don't see how that "bothers the global interaction system."

I frankly don't believe that it's too hard to find an elegant implementation of this. If it really seems that way, I could figure out how to implement it and make the PR myself.
Rather, what I want to know is, how is a power glove used only to pick up furniture better for the game? Not in terms of code or how easy it is to mod, because I'm thoroughly unconvinced that would be the case. But in terms of gameplay, for players.
I would, as a player, vastly prefer just hittin' interact on something pickup-able to pick it up over being required to use a specific item, or at least to keep its own dedicated hotkey, as wasteful as that may feel.

@BenCheung0422
Copy link
Member Author

It does. Let me take the workbench as an example.

Originally, I have MENU, ATTACK and PICKUP. In front of the workbench, I menu the workbench to open the workbench crafting menu. Now I close it by ESCAPE, but I can never open my inventory when I am still in front of the workbench. So, I have to leave the workbench by stepping back in order to access my inventory. I can open my inventory, and if I want to pick the workbench up, I pickup it.

With the pull request and the new proposal along with the new hotbar system, I have ATTACK, USE, INVENTORY and the lifting item. In front of the workbench, I use the workbench whether my hand is empty or not, so that I can open the crafting inventory. Now I close the menu by ESCAPE, and I can still open my inventory menu even I am still in front of the workbench. Then, I equip the lifting item from the hotbar, hold shift and use on the workbench, I get the workbench on my hand. As I have not handle the workbench yet, I cannot switch by hotbar, but I can put it into the inventory or put it down in front of me. So, the lifting item is empty and I can switch to another slot.

I think you may have misunderstood my implementation.

If I must have an item on to really use the furniture, it is not what it is intended to be. This is also one of the reasons why I really split the old attack into attack and use for interactions. So, I can either attack or use an entity or tile with just the empty hand. If you suggest occupying this functionality, I strongly oppose it.

I have to emphasize that, I often think from the point of player or user when designing such functionalities, but this time, I also consider the extensibility of features and potential areas of feature additions. When there come to be various functionalities and content, I believe what I proposed would help boosting them without much barrier. If you see from the operations, you may see that actually there are more spaces for modding, like what the player can do when holding a furniture on the lifting item.

Again, to simplify the code complexity, handling these within the item could help. In general, the hotbar can tackle with item states and slot status for advanced and more descriptive controls whilst ensure the compatibilities between functions in the hotbar by not adding sophisticated injections of function directly into it like the pickup function, messing up the organized and "standardized" (across underlying features) structure of code, the global interaction system.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Help wanted An issue requiring extra attention. Improvement Ideas for changes to features or content.
Projects
None yet
Development

No branches or pull requests

4 participants