Git Product home page Git Product logo

Comments (10)

FrozenCow avatar FrozenCow commented on August 23, 2024

The problem with this approach is that Dynmap needs to check whether the tile-file exists every player-move (this is somewhere around 30 times per second). When the world is already fully generated, this 'tile-checking' would be all for nothing and will only cost diskio. I could add this as an option in configuration.txt, but I won't enable it by default.

The plan I had was to support CHUNK_GENERATE event from Bukkit. This makes it possible for Dynmap to render chunks that were just generated in the world. After a full-render with Dynmap, all generated chunks are rendered. When a player walks to a new area, new chunks will be generated and thereby will also be rendered.

from dynmap.

boblehest avatar boblehest commented on August 23, 2024

So Bukkit has a CHUCK_GENERATE event? Problem solved then? :)
What (I think) Nima304 meant was of course to render chunks when they are created, not necessarily when you touch them for the first time.

Edit: And sorry for the -1 vote, that's a github bug :)

from dynmap.

Nima304 avatar Nima304 commented on August 23, 2024

Frozen, what about searching in the background for unrendered chunks? Is there any way to be able to do that? I tried a full render a few days ago, and I found that although it did render large parts of the map, a few parts were left unrendered.

from dynmap.

FrozenCow avatar FrozenCow commented on August 23, 2024

Well, I could also hook CHUNK_LOADED or something. That's being called when a chunk is loaded (or loaded after being generated). Maybe just make a list of hooks in the configuration where you can enable/disable all the different hooks. When you have no hooks enabled in the list, you have disabled runtime-rendering altogether.

from dynmap.

Nima304 avatar Nima304 commented on August 23, 2024

That would be great, actually. Making it more configurable is always better. Probably better to have them disabled on default, though, unless you're going to change the priority of the processes to low.

from dynmap.

pwood avatar pwood commented on August 23, 2024

I upvoted but not sure GitHub took it. But I too would love this, rendering on load or generation seems to fit the bill.

from dynmap.

boblehest avatar boblehest commented on August 23, 2024

Nima304: That would be a waste of resources imo. If you just render chunks the first time they're created, and then update them whenever they're changed, it shouldn't be necessary to keep searching for unrendered chunks.

from dynmap.

FrozenCow avatar FrozenCow commented on August 23, 2024

Yes, for most things it is a waste of resources once CHUNK_GENERATED is implemented. Though there are some cases where you want to have the option. When there is a forest fire, some people want to keep that up-to-date all the time. Others don't want to overload their server for things like that. That's why I'm still allowing people to choose their render-triggers... (it's also handy for me, because PLAYER_MOVE trigger is a nice way to test heavy rendering).

from dynmap.

mikeprimm avatar mikeprimm commented on August 23, 2024

We've finally gotten a good CHUNK_GENERATED hook from Bukkit, and we've provided the corresponding render triggers, as of 0.19 (along with optional triggers for other block-altering events, like leaves fading, snow/ice forming, and the like). The new default triggers should do a good job of organically growing a map, without requiring fullrenders for maintenance.

from dynmap.

mikeprimm avatar mikeprimm commented on August 23, 2024

This is completed, per our intentions - please reopen if there are more comments or items to discuss

from dynmap.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.