minicraft-plus-revived icon indicating copy to clipboard operation
minicraft-plus-revived copied to clipboard

Resource pack rework

Open BenCheung0422 opened this issue 2 years ago • 9 comments

Resolves #257 Resolves #256 Resolves #283 Made sound support. Splitted sprite sheets. Restructured resource pack. Simple screenshot function.

BenCheung0422 avatar Aug 05 '22 13:08 BenCheung0422

Getting a runtime error on my PC and Mac while running a build on this PR. ResourcePackDisplay.loadPackMetadata is complaining about ZipFile trying to use a directory.

Haven't looked into it, but just thought I'd leave the stack trace if it's of any use to anyone:

java.io.FileNotFoundException: /Users/gregcoxdev/Git/minicraft-plus-revived/build/classes/java/main (Is a directory) at java.util.zip.ZipFile.open(Native Method) at java.util.zip.ZipFile.(ZipFile.java:225) at java.util.zip.ZipFile.(ZipFile.java:155) at java.util.zip.ZipFile.(ZipFile.java:169) at minicraft.screen.ResourcePackDisplay.loadPackMetadata(ResourcePackDisplay.java:510) at minicraft.screen.ResourcePackDisplay.(ResourcePackDisplay.java:118) at minicraft.core.Renderer.initScreen(Renderer.java:98) at minicraft.core.Game.main(Game.java:81) [Crash Handler] ERROR: Error report: Cannot Load Resource Pack: Unable to load resource pack: /Users/gregcoxdev/Git/minicraft-plus-revived/build/classes/java/main/. [Crash Handler] ERROR: Application closes due to the error.

gregcoxdev avatar Aug 23 '22 07:08 gregcoxdev

It currently doesn't support IDE/Java class direct run.

BenCheung0422 avatar Aug 23 '22 07:08 BenCheung0422

I think you should separate the quest serialization and management from the QuestDisplay. Just to be more organized.

KalmeMarq avatar Aug 24 '22 08:08 KalmeMarq

All quest handling is held in QuestDisplay. Like the AchievementDisplay.

BenCheung0422 avatar Aug 24 '22 09:08 BenCheung0422

Only read what it does. I assume since makkkkus approved it, it’s good.

Please don't assume that. You need to perform your individual evaluation, and comment on everything you might find.

Makkkkus avatar Aug 24 '22 14:08 Makkkkus

Then I need to insert a pack type for directory... Or export it as zip.

BenCheung0422 avatar Aug 24 '22 14:08 BenCheung0422

Please don't copy other people's code and put it in your own pull request whey they have a pull request themselves. It is messy.

Isn’t that called plagiarism?

Litorom avatar Sep 05 '22 14:09 Litorom

Isn’t that called plagiarism?

Similar in nature, but since this is a collaborative project, so nobody really cares who gets the credit for at as long as their code makes it into the game.

Makkkkus avatar Sep 07 '22 06:09 Makkkkus

Merging #402 before this merged. When it is ready.

BenCheung0422 avatar Sep 18 '22 14:09 BenCheung0422

I will not review as much as 444 files for something as trivial as resource packs.

I cannot say much positive stuff about the code I have seen, and just the fact that the addition of a completely new library for the single purpose of loading a seed should really have raised some eyebrows. This is over-engineered to the extent that it simply cannot be accepted.

If I had the energy and will, I could have written a much longer comment addressing the problems in a much more rational and professional manner, but I simply don't have the time. I have tried to make this repository work without my involvement in everything: tried to make it autonomous; but it simply hasn't worked.

Trust me, I don't have the time to review pull requests as big as this, and I don't even think I am competent enough to understand the really peculiar code written here.

I will remove the goal of adding a new resource pack system from the roadmap -- it simply isn't important.

Edit: A major problem is the complete lack of documentation, and I will simply not accept any PR if it doesn't contain extensive documentation. I also think you misunderstood; I will not accept this.

Makkkkus avatar Oct 29 '22 21:10 Makkkkus

Actually for adding additional library for seed, I could use simply Paths.get and fixed 255 to verify instead (but not really applicable if the folder is in different driver type.

BenCheung0422 avatar Oct 30 '22 03:10 BenCheung0422

I've noticed this pull request introduces a few problems, notably with some of the tile textures.

  1. The rock tiles have been horizontally flipped. They now do not align with the game art's main light source. What they look like in this pull request: rock tiles What they should look like: proper rocks

  2. The grass tiles have also been affected. Their shadows that were re-added in #402 have been removed.

  3. Hard rock is not rendering properly. hard rock

  4. The water animations are very inconsistent. Simply standing in a different location can cause them to stop or change animation speed. https://user-images.githubusercontent.com/60508288/200569091-a0f2c426-da75-4de0-afc8-7fa0ecda793c.mp4

  5. Last but not least, I cannot create a new game with this version, I can only load old saves.

maxkratt avatar Nov 08 '22 12:11 maxkratt

The rock, hard rock, and grass tiles have been fixed ✅. Creating new worlds has also been fixed ✅. I have noticed a few other things however.

  1. The water, lava and hole textures are upside-down. Upside-down: upside down hole Right side up: right side up hole

  2. The workbench sprite was changed, visible in the first screenshot. It looks worse now to me, but that is subjective.

  3. The bottom border of water looks too flat. (Note: this border is supposed to be the top border) not pretty bottom water edge

  4. The top border of water has an ugly dark pixel showing. (Note: this border is supposed to be the bottom border.) dark pixel on water

  5. Tile animations seem to work. But only on the first world loaded/created. Any subsequent worlds have their animated textures frozen until the game is restarted (or sometimes after a seemingly random length of time? Once was 30s). https://user-images.githubusercontent.com/60508288/200889910-e2a40924-e12a-453f-9bd3-e3ef125bf536.mp4

  6. And finally, walking on sand leaves no footprints.

Hopefully I didn't miss anything else 🤔

maxkratt avatar Nov 09 '22 16:11 maxkratt

From what I can tell most problems have been fixed. There is an ugly dark pixel showing on the right water bank however. dark pixel

maxkratt avatar Nov 10 '22 16:11 maxkratt

I think you are once again doing things not related to the pr. This pr is suppose to improve resource packs and the code related. Yet you added screenshots, (debug world name) and just changed the crafting table texture. (Idk if there's more because I didn't take a deep look yet).

KalmeMarq avatar Nov 11 '22 14:11 KalmeMarq

image The sand steps have a z-index issue. They are drawn on top of the trees.

KalmeMarq avatar Nov 11 '22 14:11 KalmeMarq

I haven't noticed any further problems 👍

maxkratt avatar Nov 18 '22 08:11 maxkratt