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 a prismarine-world web visualizer #17

Closed
rom1504 opened this issue Dec 14, 2015 · 17 comments
Closed

Implement a prismarine-world web visualizer #17

rom1504 opened this issue Dec 14, 2015 · 17 comments

Comments

@rom1504
Copy link
Member

rom1504 commented Dec 14, 2015

It would be cool to be able to see stuff generated in a World instance without having to start minecraft.

Maybe @creeplays or @dcbartlett already have a part of that ?

Also see https://github.com/vogonistic/mineflayer-voxel

@rom1504
Copy link
Member Author

rom1504 commented Dec 14, 2015

@rom1504
Copy link
Member Author

rom1504 commented Dec 14, 2015

annoying that the voxeljs api is sync https://github.com/maxogden/voxel-engine#requirevoxel-engineoptions

Way to go around that:

@rom1504
Copy link
Member Author

rom1504 commented Dec 14, 2015

@rom1504
Copy link
Member Author

rom1504 commented Jan 5, 2016

Would be interesting to take some of the code of one of these and tranform it in a prismarine-world visualizer (that will then be usable along with flying-squid and mineflayer (once mineflayer use prismarine-world), and other more simple application (for example I'd like to display a portal in a web page))

@rom1504
Copy link
Member Author

rom1504 commented Jan 6, 2016

https://github.com/vogonistic/mineflayer-voxel/blob/master/app.js#L258 is a good way to get around voxel sync api

@rom1504
Copy link
Member Author

rom1504 commented Jan 7, 2016

this is pretty cool http://cloud.thomas-edwards.me/mc_test/backup.html

see the page source for more info

@rom1504
Copy link
Member Author

rom1504 commented Jan 7, 2016

(on the browser visualization theme, this is interesting https://www.spigotmc.org/resources/thinkmap.413/, even though the java code won't be usable here ofc)

@rom1504
Copy link
Member Author

rom1504 commented Jan 7, 2016

about a "doesn't take the whole page" visualizer:

13:26 < Fudgie> rom1504 yes, its tied to a canvas
13:26 < Fudgie> Just resize the canvas element like any old div

@deathcap
Copy link
Member

deathcap commented Jan 9, 2016

annoying that the voxeljs api is sync https://github.com/maxogden/voxel-engine#requirevoxel-engineoptions

If by sync you mean the generate (or generateVoxelChunk) options, the alternative is to listen for missingChunk events then call showChunk() once they are generated, async example: https://github.com/voxel/voxel-land/blob/ee6e1283c606f6c31917ce999de2382058ddcefd/land.js#L122-L133 - this (superior, imho) method is the only one that works in the newer voxel-engine-stackgl currently (a port of voxel-engine using stack.gl instead of threejs, and solves some inherent problems with the three.js approach, but does not yet have all the features of voxel-engine).

If there are other parts of the API that are sync and making integration difficult, would be happy to change them to async in voxel-engine-stackgl :) let me know

(on the browser visualization theme, this is interesting https://www.spigotmc.org/resources/thinkmap.413/, even though the java code won't be usable here ofc)

ThinkMap is pretty interesting, I contributed some bugfixes a while back, but development has stalled for a while. The server is written in Java, and the client also written in Java but compiles to JavaScript using GWT.

I think vogonistic/mineflayer-voxel#1 is currently the most promising. @vogonistic @rom1504 what do you about moving mineflayer-voxel into the https://github.com/PrismarineJS organization like https://github.com/PrismarineJS/mineflayer to maintain and develop it there? Would be awesome to get it up and running, actively developed again (it was before my time, I've never tried it until now).

The approach taken by mineflayer-voxel has some advantages over https://github.com/deathcap/voxel-clientmc - which is more ambitious in that it aims to implement an MC client as the web app itself, whereas mineflayer-voxel runs the "client" (via mineflayer) on a server and uses a simplified custom protocol for communication between the web app and client server. voxel-clientmc is further away from updating to get working again, currently blocked need to update wsmc first.

@rom1504
Copy link
Member Author

rom1504 commented Jan 9, 2016

Okay thanks, I'll try the missingChunk then showChunk() approach.

I'm okay with putting mineflayer-voxel in PrismarineJS . vogonistic/mineflayer-voxel#1 only starts to fix things though. I never tested mineflayer-voxel when it was fully working, but I believe there are still things broken in vogonistic/mineflayer-voxel#1 though.

My idea with having a prismarine-world voxel visualizer is that once it's done, it will be possible to use it along with a client (with mineflayer), or with a server directly (with flying-squid), or just load a world and use it without dealing with network problems.
Now it's pretty much WIP because prismarine-world isn't used in mineflayer yet (PrismarineJS/mineflayer#334) and the visualizer is not done at all, so it makes sense to try things in parallel with mineflayer-voxel / voxel-clientmc/... , the more working code the easier it get !

@rom1504
Copy link
Member Author

rom1504 commented Jan 18, 2016

http://cubical.xyz/ is pretty interesting (nothing on github afaik but the source is available (view source))

@rom1504
Copy link
Member Author

rom1504 commented Jan 19, 2016

I stumbled upon http://voxmc.com/vox-populi-web-map/# which is pretty cool too. I wonder if there are any easy to use tiling/map npm module that could be used to display a prismarine-world.

@rom1504
Copy link
Member Author

rom1504 commented Jan 19, 2016

I started some work with voxel+prismarine-world there https://github.com/rom1504/voxel-prismarine-world
It successfully display one chunk in bedrock/air. Currently stuck by voxel/voxel-example#9

@rom1504
Copy link
Member Author

rom1504 commented Jan 19, 2016

on the map theme : https://overviewer.org/ is cool but apparently coded in python and build with a static point of view : 1) read world 2) generate html/js 3) view

@rom1504
Copy link
Member Author

rom1504 commented Jan 20, 2016

would be interesting to provide a tile server for prismarine-world and then use http://leafletjs.com/reference.html#tilelayer to display these tiles.
Not exactly sure how to generate these tiles though.

edit: maybe https://github.com/derrickpelletier/maptile

@rom1504
Copy link
Member Author

rom1504 commented May 3, 2020

@rom1504 rom1504 changed the title Implement a prismarine-world visualizer using voxel.js Implement a prismarine-world web visualizer May 9, 2020
@rom1504 rom1504 moved this from To Do to In progress in Big Prismarine Projects Jun 28, 2020
@rom1504
Copy link
Member Author

rom1504 commented Jul 13, 2020

https://github.com/PrismarineJS/prismarine-viewer I'd say this issue is done
More work will get done there

@rom1504 rom1504 closed this as completed Jul 13, 2020
Big Prismarine Projects automation moved this from In progress to Done Jul 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

No branches or pull requests

2 participants