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

Select from multiple available texture sets #307

Open
GrimPixel opened this issue Sep 6, 2023 · 12 comments
Open

Select from multiple available texture sets #307

GrimPixel opened this issue Sep 6, 2023 · 12 comments

Comments

@GrimPixel
Copy link

Is your feature request related to a problem? Please describe.
There are multiple available textures sets, for cards, tiles, dice, and so on. For example, different card patterns from GNOME and KDE, with different config.cfg, stack.cfg settings. As there are at least 44 available texture sets for French-suited playing cards, they are not supposed to be simply created as an asset pack, because they take too much room in the selection list.
The current solution is having subdirectories for such texture sets in the corresponding card or token directories, with one of them set to be the default and moved to its parent directory.

Describe the solution you'd like
Add an option to select a texture set from multiple ones to be loaded in game.

@GrimPixel
Copy link
Author

One thing to be added: there are multiple images for one card/tile, such as backs of playing cards and the “one of coppers” in mahjong https://commons.wikimedia.org/wiki/File:T1var.svg

@drwhut
Copy link
Owner

drwhut commented Sep 7, 2023

they are not supposed to be simply created as an asset pack, because they take too much room in the selection list.

One of my plans for v0.2.0 is to completely revamp the objects menu - if each set of cards/tokens is in a separate asset pack (as would most likely be the solution now), and the revamped menu made it easier to navigate these various sets, would that solve the issue?

Another thing that's worth pointing out is that I would like to try and keep as much backwards-compatibility when it comes to the format of asset packs as possible. One potential idea is to add a new configuration file, e.g. sets.cfg, which could define overrides for specific pieces. That way, packs from previous updates can be read properly as-is, and packs imported by older version of the game would ignore the sets.cfg file.

@GrimPixel
Copy link
Author

That means that to enable those 18 “one of coppers”, it will require 18 image sets to select from. There are other tiles that have variants, like the 14 “one of strings”, and these all belong to the image set by Cangjie6. For French-suited playing cards and other games, some image sets have multiple back patterns. It could be convenient to select a variant for a specific pattern in an image set.

The sets.cfg could be useful. The creator can define which set is to be utilised by default, and in each set, which variant is the default one for a specific pattern.

@drwhut
Copy link
Owner

drwhut commented Sep 8, 2023

The creator can define which set is to be utilised by default, and in each set, which variant is the default one for a specific pattern.

Could you describe what you mean by 'set', 'variant', and 'pattern' in this sentence?

And just to confirm, if the appearence was to change for a given object, for example, the Ace of Spades, then it would still be considered the same object internally under your proposal? Since this would rule out having multiple different asset packs for the different styles as a workaround, as each object would technically be unique to one another.

@GrimPixel
Copy link
Author

GrimPixel commented Sep 8, 2023

An asset pack is like “TabletopClub”. In an asset pack of “French-suited playing cards”, there are multiple “image sets” for cards by different authors, like Byron Knoll; in an image set, there are multiple images for one specific card, like the “ace of spades”, the original files of which are ace_of_spades.svg and ace_of_spades2.svg. In some other “image sets” for “French-suited playing cards”, there are multiple card backs to choose from. If possible, the game doesn't need to load images that are not selected.
The solution I imagined is, in the asset manager, first enable “French-suited playing cards”, then select “Byron Knoll”, then select a variant for “ace of spades”: Ace of Spades.0.png or Ace of Spades.1.png as the front of the object with the name “Ace of Spades”, so the stacks.cfg doesn't need any change.
There could be an automatic detection of “same string + dot + different numbers” at the end of the filename to determine variants.

@drwhut
Copy link
Owner

drwhut commented Sep 9, 2023

So if I understand it correctly, each asset pack can have one or more image set, and each image set can have one or more textures for each object?

I feel like that is one too many "one or more"s, personally. What does having one or more image set in an asset pack solve, as compared to having multiple different asset packs?

@GrimPixel
Copy link
Author

GrimPixel commented Sep 9, 2023

If they are different asset packs, then they will take too much room on the asset pack selection list, like the 44 French-suited playing cards. There is another problem I neglected: the boards and pieces are created by different authors, so assets from different categories like “boards” and “pieces” need to be selected separately. If they are in different asset packs, then there will be two packs: “boards” and “pieces”, like the chess, which has 32 boards and 33 card sets.
As for the variants of a card pattern, I feel that the players can have the choice, instead of letting the creator decide which texture to use and which not. Considering that the variants are few, so I feel it still acceptable to let the user rename files manually to use a specific texture, just a bit inconvenient.

@drwhut
Copy link
Owner

drwhut commented Sep 10, 2023

If they are different asset packs, then they will take too much room on the asset pack selection list, like the 44 French-suited playing cards.

That's why in my first comment I asked if a revamp of the objects menu would indirectly solve this issue, but I'm not sure if it was answered:

One of my plans for v0.2.0 is to completely revamp the objects menu - if each set of cards/tokens is in a separate asset pack (as would most likely be the solution now), and the revamped menu made it easier to navigate these various sets, would that solve the issue?

As for the variants of a card pattern, I feel that the players can have the choice, instead of letting the creator decide which texture to use and which not. Considering that the variants are few, so I feel it still acceptable to let the user rename files manually to use a specific texture, just a bit inconvenient.

This has actually given me an idea somewhat related to this issue: if players had the ability to modify the properties of an object via the details menu (i.e. giving the player the ability to modify the mass, the sound effects, the centre of mass), this could include overriding the texture paths potentially? Although I'm not sure how useful that would be in multiplayer, since the texture path would have to be under user:// for it to work on all player's instances.

@GrimPixel
Copy link
Author

GrimPixel commented Sep 10, 2023

If they are in different asset packs, it can solve another problem: selection of different assets with partially same objects.
Some asset packs are done by different authors together, like the dice, where several sets of texture exist, including Eurasian & East Asian dice faces by Mliu92 and Eurasian dice faces by Jon Harald Søby. Currently, I set the Mliu92's as the default. if I want to change the Eurasian dice faces, I have to modify config.cfg manually, which is to be avoided. With a new object menu, I can simply select from the two asset packs, where Eurasian dice face filenames are the same and the files can coexist in game.

I wonder what that menu looks like. There needs to be a search bar. Maybe icon view like the current object selection menu, with a thumbnail of an image specified in config.cfg. Then it needs to be clarified which asset pack's assets are to be spawned, like those chess boards and chess card sets.
If the textures are not shareable, the texture-override is to be banned in multiplayer, as it provides a way to cheat.

Maybe the asset packs can be placed in a subdirectory, like assets/game/author/, instead of assets/game – author/, to make it convenient to navigate in the assets/ directory.

@drwhut
Copy link
Owner

drwhut commented Sep 14, 2023

The issue there is that dice can have various UV wrappings, so each set of textures would specifically have to be made with a given model in mind.

The current plan for the new menu is for the initial screen to be a grid of icons showing the various types of objects that can be spawned (e.g. cards, dice, pieces, etc.) - once one of those is clicked, it then shows all of the asset packs that has at least one of those items, including an extra "All packs" option. Only once that is clicked, is a list of objects shown that match both the type and pack(s) that were selected. This way, not every asset is shown across multiple pages, with the player having to manually filter the results using the drop-downs. There would also be a search bar like there is currently.

@GrimPixel
Copy link
Author

GrimPixel commented Sep 14, 2023

This selection menu saves the time of seeing empty categories. This makes it difficult to see the whole asset pack, if the asset pack has objects in multiple categories. So the best practice of asset creation is then set to having only one category of assets per asset pack: one asset pack for the board, another asset pack for the pieces.

The problem of “selecting from multiple available textures” is then solved. For the variants of a pattern, it still requires manual renaming. This inconvenience is tolerable to me.

@drwhut
Copy link
Owner

drwhut commented Sep 17, 2023

This makes it difficult to see the whole asset pack, if the asset pack has objects in multiple categories.

This could be solved by having an extra option to see "All types", as well as "All packs". I want to try and avoid fragmenting asset packs if at all possible.

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

No branches or pull requests

2 participants