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

Update color system and sheep coloring #445

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

Conversation

BenCheung0422
Copy link
Member

@BenCheung0422 BenCheung0422 commented Mar 4, 2023

This depends on #437 due to a fix of stackable item interaction on entities

The current color system is pretty lack in customization and content, so this pull request complements and updates these parts.

  • As sheep only has white wools, colored sheep is now available in natural spawn.
  • There is now small chance in spawning colored sheep.
  • Sheep and beds are now colorable.
  • Dyes are added.
  • 16 colors are implemented in dyes, wools, and colorable items and furniture.
  • Adds a new recipe - string * 3 -> white wool * 1
  • Adds 19 new flowers replacing original flowers.

When we have biomes supported, different biomes can have different ranges of flower variants generated.

(Discord thread: https://discordapp.com/channels/280723930942013440/1083334895763456072)

@Makkkkus Makkkkus added the Improvement Something that we can improve. label Mar 4, 2023
@Litorom
Copy link
Member

Litorom commented Mar 29, 2023

Seems incomplete, I don’t think we have all the wool colors shown.

@BenCheung0422
Copy link
Member Author

The coloring system has not been not discussed with a valid result (thread: https://discordapp.com/channels/280723930942013440/1083334895763456072). I need a decision about what colors should be implemented.

@BenCheung0422 BenCheung0422 marked this pull request as draft March 31, 2023 16:28
@BenCheung0422 BenCheung0422 changed the title Sheep coloring Update color system and sheep coloring Apr 2, 2023
@Litorom
Copy link
Member

Litorom commented Apr 5, 2023

Maybe add dyeable beds and other color related items

@BenCheung0422
Copy link
Member Author

BenCheung0422 commented Apr 15, 2023

Should we add dying in clothing, more than the current ones? There are several ways we could accomplish this:

  • Hard-coded clothing - 16 colors of clothing could be made by crafting in workbench like wools.
  • Dyeable clothing plan A - cauldron is added to make dyed water, which could dye colors on clothing interacted by player.
  • Dyeable clothing plan B - a dedicated menu (or new furniture) is added to have ability to dye clothing.

With plans on dyeable clothing, the possible number of colors could be greatly greater (the exact numbers are still being calculated) than 16 (hard-coded) colored clothes. Range: R(16~FE=233) G(1D~FF=227) B(16~FE=233); ideal theoretical possible results: 12,323,603.
Applicable algorithms on color combinations:

  • Menu combination (Plan B) - Assume that infinite times of composition can be made in menu which maximum of 100 of each color could be combined and there should be finite number of colors could be made, less than 12,323,603 of colors could be made.
  • Dilute subtractive mixing (Plan A and B) - Number of possible colors for Plan A: 4,915,376.
  • True subtractive mixing (Plan A and B) - Number of possible colors for Plan A: 329,835.
  • Average color additive mixing (Plan A and B) - E.g. direct (A+B)/2.

For subtractive algorithms, the source is: https://stackoverflow.com/a/1351485.
(Brief details is explained in the Discord thread.)

@BenCheung0422 BenCheung0422 marked this pull request as ready for review April 22, 2023 05:42
@BenCheung0422
Copy link
Member Author

The clothing update will move to another pull request, so this pull request is now ready.

@Makkkkus
Copy link
Member

This should really be added to the changelog.

@BenCheung0422 BenCheung0422 marked this pull request as ready for review December 30, 2023 18:47
# Conflicts:
#	src/client/java/minicraft/item/ClothingItem.java
#	src/client/java/minicraft/item/Recipe.java
#	src/client/java/minicraft/item/Recipes.java
#	src/client/java/minicraft/item/StackableItem.java
#	src/client/java/minicraft/level/tile/FlowerTile.java
#	src/client/java/minicraft/level/tile/Tiles.java
#	src/client/java/minicraft/saveload/Load.java
#	src/client/java/minicraft/saveload/Save.java
@BenCheung0422
Copy link
Member Author

This pull request should now be ready. I am not sure if we should implement dyeable glasses.

Copy link
Member

@Litorom Litorom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please revert the bed style to previous for the item icon, it’s too blocky and doesn’t match the game. Then let players test it, when all is good I’ll merge it.

src/client/resources/assets/textures/item/bed.png Outdated Show resolved Hide resolved
@Makkkkus
Copy link
Member

Makkkkus commented Jan 7, 2024

Looks like something weird is going on with the line endings. Perhaps check if they are commited as LF?

@BenCheung0422 BenCheung0422 mentioned this pull request Feb 25, 2024
# Conflicts:
#	src/client/java/minicraft/level/tile/WoolTile.java
Flower item tile model unmatched
Flower loading old worlds not resolved, fallen back to daisy by default
@Litorom
Copy link
Member

Litorom commented May 21, 2024

Can you fix the sprites to match the current sprites and no please artistic style changes.

@BenCheung0422
Copy link
Member Author

BenCheung0422 commented May 22, 2024

Besides your thoughts, I think several changes are quite reasonable.

  • Change to texture of bed items
    texture change for bed items
    As several color variants are being added, it is essential to make them easier to be distinguished from each other even in item entity state. Those are small when dropped, so it might not be clear to know which color of the bed is. Originally there are only 6 pixels (even not rectangle) of (changeable) colors in texture, but in the new change, a larger block of 4*6 colors pixels are used, which can be reasonably identified among others.
  • Change to texture of bed entities
    texture change for bed entities
    I would not say that the artworks is really good (border color is taken from plank), but enough to reflect the details of the color variant pixels.
  • Change to texture of wool items
    texture change for wool items
    This change relates to the elimination of unnecessary or unconformable black/dark pixels in texture. The excessive black pixels made the alike coloring tone (dull and non-color vibrant) of the texture, which should not be made to coloring-oriented elements.
  • Change to texture of wool tiles
    texture change for wool tiles
    Style of shape is made as the change, also making them more distinguishable from other tiles. Please have a notice to the texture style of some other tiles:
    classic dirt like tile textures
    From left to right, up to down, they are dirt (surface), dirt (underground), dirt (dungeon), rock, grass and hard rock.
    They all have the same shapes just with different colors, and thus similar textures, which cannot make them really identifiable among tiles. The similar can be applied to the original wool tiles. By the way, I believe that underground dirt is made as similar as rock because it might be tended to be like the ground of rocks underground. I think these textures might also have to be updated so as to have different looks.

Please note that we are improving and maintaining the game, but not necessarily just barely keeping all its elements blindly. If anyone has further suggestions, you are welcome.

@Litorom
Copy link
Member

Litorom commented May 22, 2024

The wool textures are fine, besides that I will not merge this until you follow the rules of design.

@BenCheung0422
Copy link
Member Author

Rules of design? Are you also talking about that 6 pixels of difference among color variants?

@Litorom
Copy link
Member

Litorom commented May 22, 2024

No, I’m asking you to follow the rules of the design of textures, currently you been messing with it. This WILL NOT be merged until you follow those rules. Do what I asked, in a real game company you would be in trouble to mess with the artwork that doesn’t match the aesthetic.

@BenCheung0422
Copy link
Member Author

BenCheung0422 commented May 22, 2024

I see, it is my first time to hear of the term "rules of design" of textures here.

@Litorom
Copy link
Member

Litorom commented May 22, 2024

Yes, it’s called college insight

@BenCheung0422
Copy link
Member Author

To match the original shape of the beds, I have added headboard, for both item and entity texture. As there is an addition of headboard, I have to incline the item texture so as to maintain the number of color variant pixels. Also, I have made the entity texture to match with the shape of item texture.

@Litorom
Copy link
Member

Litorom commented May 24, 2024

Not quite what I asked for but it’s definitely an improvement. I’ll leave it at that, I’ll be testing out the PR now.

@Litorom
Copy link
Member

Litorom commented Jun 25, 2024

Fix the conflict and I’ll test it more

EDIT: nvm it’s was self-explanatory fix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Improvement Something that we can improve.
Projects
Status: To do
Development

Successfully merging this pull request may close these issues.

None yet

3 participants