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

online map view #4

Open
EclecticInventor opened this issue Oct 2, 2017 · 7 comments
Open

online map view #4

EclecticInventor opened this issue Oct 2, 2017 · 7 comments

Comments

@EclecticInventor
Copy link

Would it be possible to see these maps online, like how dynmap does?

@bergerkiller
Copy link
Member

I think it would be, but it would almost certainly have the same color scheme as the map colors support. However, having complicated zooming, rotation and hud overlays requires a lot of additional web programming. I don't think Maplands should try to do better than what dynmap does, because dynmap is very well optimized for displaying maps online. It does so by efficient caching mechanics and a very well-designed online protocol. Rewriting all that for the sake of Maplands seems a bit pointless.

No reason you can't use both :)

@generrosity
Copy link

+1 to replicating dynmap. Spectifically: trigger render + export of all chunks from server.

As a mod, you are using the engine to render the blocks/textures directly correct? This is a major limitation to external programs that need block texture definitions.

Specific example - FoolCraft2 has ~149 mods, particularly earth/leaves/flowers from BiomesOPlenty and marble from AstralSourcery to name just two. Dynmap struggles to keep up with this. Other don't bother. You might have the unique ability to bypass the biggest issue, and render directly.

Does my understanding of how it handles mods work like that??

@bergerkiller
Copy link
Member

bergerkiller commented Jan 11, 2018

I wrote my own engine, so not exactly. If mods use resource packs for the models of the blocks, then yes, but I'm not sure if that is the case. When resource packs are expanded more by Mojang allowing custom blocks and models, then yes, maplands will support all of that almost automatically.

My engine can interpret the model .json format used by Minecraft client and render them in isometric perspective onto a canvas. It has some quad/triangle render primitives to do this. No OpenGL is used though.

@generrosity
Copy link

Ah - so like in 1.10 with no resource packs (just whats included inside the mod jar) wouldn't work?

@bergerkiller
Copy link
Member

Dont think so, no. Unless the mod jar has an assets subdirectory, then its possible to load it the same way it loads the Minecraft client jar's assets.

See also these files in BKCommonLib:
https://github.com/bergerhealer/BKCommonLib/blob/master/src/main/java/com/bergerkiller/bukkit/common/map/MapResourcePack.java
https://github.com/bergerhealer/BKCommonLib/blob/master/src/main/java/com/bergerkiller/bukkit/common/map/archive/MapResourcePackZipArchive.java

I support a whole lot of ways of loading model resources, even automatic downloads with hash checks, stored in a local cache.

I think a major problem might exist in the block to model name resolution though. Minecraft has no sane API server-side to retrieve the paths of the models, its mostly relying on common patterns.
https://github.com/bergerhealer/BKCommonLib/blob/master/src/main/java/com/bergerkiller/bukkit/common/map/util/ModelInfoLookup.java#L105

@generrosity
Copy link

The mods do have assets subdirectory.

I'll get it the proper acid test tho. I'm now struggling to get Sponge to work with Forge 2488 on 1.10 (no longer in support), so battling with a 1.12 or just with a vanilla/sponge world. Thanks for the tips!

@bergerkiller
Copy link
Member

Forge isnt (yet?) supported by BKCommonLib, so for that it doesn't really matter yet. They lack the Bukkit API there to have things work. Porting BKC/TC to Sponge might be doable in the long term, but it'll take a while.

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

No branches or pull requests

3 participants