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

Implement alternative, more efficient backend for map data #107

Draft
wants to merge 41 commits into
base: master
Choose a base branch
from

Conversation

magicus
Copy link
Contributor

@magicus magicus commented Nov 10, 2021

This is a new, from scratch, implementation of the newly abstracted map data API. The goal for this implementation is to be maximally efficient. That means that map data should only be recalculated when needed. This implementation is event-driven, so when Minecraft tells us a chunk needs updating, we update it, but only what is minimally required. This is in contrast to the classic implementation, which is timer-driven, i.e. it recalculates all map data on a regular basis.

This PR is a work in process. Currently a lot of functionality is missing. I do think that this approach is very promising, and that it is fully possible to re-add missing functionality without sacrificing the underlying efficiency.

A (probably incomplete) list of missing functionality:

  • Map shading (i.e. support for topology)
  • Support for different "top" layers (e.g. hide water, hide plants)
  • Saving map data to disk
  • Caves support
  • Proper multiworld support

Despite this patch being a WIP and far from ready to merge, I wanted to open this draft PR to show what I'm thinking and where I'm heading.

@Bulldog83 I have not received any feedback on my other PRs. Have you given up on developing JustMap, or are you just currently bogged down with real-life work? It would be helpful for me to know if it is ever realistic that these changes could be merged into JustMap, or if I am in practice creating a new JustMap fork for 1.17 and higher efficiency.

@Bulldog83
Copy link
Owner

Hello! I want to continue work with mod, but, as you say, bogged down with real-life. If you want, you can create your own version of mod. I don't know at this moment, when I'll can return to mod dev. I'll merge all yours pull-requests.

@magicus
Copy link
Contributor Author

magicus commented Nov 10, 2021

@Bulldog83 Thanks for letting me know. I'll probably go a bit harder on with the refactorings, then. I'll continue calling it JustMap for now, but if you (or I) think it diverges too much, I'll rebrand it as a new and derived mod. If you ever want (or can get the time for it) to get back to working on the mod, I'll be happy to work together. (Just want to make clear I'm not trying to do a hostile fork.)

Technically, the previous PRs should perhaps not have been merged into the 1.16.2-master branch, since they contained 1.17.1 stuff, but I could not suggest creating a new branch within the Github framework, and I could not see a version-independent master branch. :-( Sorry for the mess.

@Bulldog83
Copy link
Owner

Bulldog83 commented Nov 10, 2021

Anyway, if I'll return to work under the mod, I'll make update to the actual Minecraft version. And the version of the code for 1.16.2 will still be saved in the 'unlimited' branch, so it's okay that requests go to the 1.16.2 branch, although not entirely correct.

@magicus magicus force-pushed the efficient-map-backend branch 11 times, most recently from d68911e to 20f1d62 Compare November 14, 2021 20:09
@magicus magicus force-pushed the efficient-map-backend branch 2 times, most recently from 4d17563 to 5df150e Compare November 23, 2021 23:10
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.

2 participants