WIP : Attempt to change zoom level of the minimap#13
Draft
vadim-soude wants to merge 1 commit intoJNNGL:mainfrom
Draft
WIP : Attempt to change zoom level of the minimap#13vadim-soude wants to merge 1 commit intoJNNGL:mainfrom
vadim-soude wants to merge 1 commit intoJNNGL:mainfrom
Conversation
Author
|
The key issue here is that the scroll speed of the minimap is still tied to the 1:1 ratio, but you’ve zoomed it out to a 1:2 ratio, so the player movement on the map is no longer aligned with their actual movement in the world. When the minimap is scaled down, you have to adjust the player’s position relative to the new zoom level. You could try mapping the player’s real-world position to the minimap's scaled position. Here’s the rough idea:
I don't know if this is very clear but this is the idea |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

I want to change the zoom level of the minimap (like the vanilla way) meaning each pixel don't represent one block but, for example, four.
For now, I changed the way the flat render work, the minimap is scaled down the way I want, but I have an issue with player movement.
The minimap scrolling still goes at the same speed as the player, when it's a 1:1 ratio it's not an issue, but now it's a 1:2 ratio and it glitches out. When I go to the end of a 1:1 classic section of the world (a 128x128 zone) the visual snap to the beginning of the section and everything end-up is misaligned.
I hope someone can figure out how to fix the move part, I tried a lot of things, but everything broke 😞
Known issue : Since we are pulling blocks from a 256 by 256 zone (16*16 chunks) instead of 128 by 128 zone (8 by 8 chunks) everything is slower and the performances are way worst but it "normal"