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

Split tile arrays into Chunks #727

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

Conversation

zandgall
Copy link
Contributor

@zandgall zandgall commented Dec 5, 2024

Removes tile and data arrays from Level, and disperses it among Chunks. These are managed in ChunkManager, used by Level and LevelGen in order to access Chunks and Tiles.

Removes tile and data arrays from Level, and disperses it among Chunks. These are managed in ChunkManager, used by Level and LevelGen in order to access Chunks and Tiles.
@BenCheung0422 BenCheung0422 added the On hold Issue has been put on hold for various reasons. label Dec 5, 2024
@BenCheung0422
Copy link
Member

BenCheung0422 commented Dec 5, 2024

This task in fact should be a part of the engine rewrite, so I put this on hold (at least).

@BenCheung0422 BenCheung0422 added Rejected and removed On hold Issue has been put on hold for various reasons. labels Dec 5, 2024
@Makkkkus Makkkkus reopened this Dec 5, 2024
@Makkkkus Makkkkus removed the Rejected label Dec 5, 2024
Copy link
Member

@Makkkkus Makkkkus left a comment

Choose a reason for hiding this comment

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

Neat implementation of chunks. I'm very positive this is a good implementation but I do have some comments on the object-oriented approach.

src/client/java/minicraft/level/Chunk.java Outdated Show resolved Hide resolved
src/client/java/minicraft/level/Chunk.java Outdated Show resolved Hide resolved
@Makkkkus Makkkkus linked an issue Dec 5, 2024 that may be closed by this pull request
zandgall and others added 2 commits December 5, 2024 16:26
Replaces the redundant class "Chunk" with its equivalent data structure directly in ChunkManager.
Also increases Chunk Size to 64
@zandgall
Copy link
Contributor Author

zandgall commented Dec 6, 2024

@Makkkkus I went ahead and tried having the tile data arrays directly in ChunkManager. It seems simple enough to understand, I think it works as is for now. Can be made back into its own Chunk class (or essentially a struct) depending on changes to level format or data structure.

Makkkkus
Makkkkus previously approved these changes Dec 9, 2024
Copy link
Member

@Makkkkus Makkkkus left a comment

Choose a reason for hiding this comment

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

Very good

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

Successfully merging this pull request may close these issues.

Divide levels into chunks
4 participants