WebSandboxMC: Web-based client providing an interactive glimpse of a part of your server using WebGL/HTML5



  • Enjoying the open source Glowstone server and want an open source client to go along with it? While not a fully-featured client, WebSandboxMC provides a limited yet interactive preview into your server to anyone with a modern web browser thanks to WebGL and HTML5.

    Source code: https://github.com/satoshinm/WebSandboxMC/

    Live demo of the client (/online to connect to a server): https://satoshinm.github.io/NetCraft/

    Downloads and more: https://www.spigotmc.org/resources/websandboxmc.39415/

    Glowstone-specific features: None yet, but WebSandboxMC is developed and tested on Glowstone 1.11.2 as the primary server platform target. Help wanted to add additional Glowstone integration such as NPC spawning while not breaking capability with other Bukkit server software, see: https://github.com/satoshinm/WebSandboxMC/issues/13

    Screenshot


  • Admin

    Wow, this is… pretty neat. I had a quick play with it, and I’m pretty impressed.

    Small suggestion: How about the ability to disable editing the map in the config?

    EDIT: It has been done. Woo!



  • @gdude2002 said in WebSandboxMC: Web-based client providing an interactive glimpse of a part of your server using WebGL/HTML5:

    Wow, this is… pretty neat. I had a quick play with it, and I’m pretty impressed.

    Thanks!

    Small suggestion: How about the ability to disable editing the map in the config?

    Good idea, just implemented this in WebSandboxMC v0.5, there are now plugin.yml options including allow_break_place_blocks and allow_signs which can be set to false to restrict the web user from interacting with the world in this way (for a more of a read-only “viewer” experience than interactive gameplay).



  • Wow, I wonder if this can be used as a teaching tool, for instance pre built worlds that a server owner keeps online. Then server fans go to the online version for minigames, contests, server tutorials, etc. Sort of like a 3D interactive forum world.
    This is really cool.



  • I did notice a bug on the live demo. When you place a block it flings your view finder back down to face the ground and seems to spin your player.



  • @Jason-Stover said in WebSandboxMC: Web-based client providing an interactive glimpse of a part of your server using WebGL/HTML5:

    Wow, I wonder if this can be used as a teaching tool, for instance pre built worlds that a server owner keeps online. Then server fans go to the online version for minigames, contests, server tutorials, etc. Sort of like a 3D interactive forum world.

    For sure, there’s a lot of possibilities with this concept I haven’t even thought of yet, will be interesting to see how servers use it in practice as it develops.

    This is really cool.

    Thanks!

    @Jason-Stover said in WebSandboxMC: Web-based client providing an interactive glimpse of a part of your server using WebGL/HTML5:

    I did notice a bug on the live demo. When you place a block it flings your view finder back down to face the ground and seems to spin your player.

    Could you retest on v0.7+ or the live demo, I believe this is now fixed (some weirdness with Firefox mouse events, for the record: https://github.com/satoshinm/NetCraft/issues/56).



  • Thanks everyone for the interest, I have some new developments to share: customized server software specialized for running WebSandboxMC efficiently on cloud infrastructure.

    I call it Glowstone Light (temporary name, suggestions welcome) for now, and it is based on Glowstone 2017.4 but with fewer features and dependencies. More details about it here: https://github.com/satoshinm/Glowstone/pull/1

    Most notably, it has no built-in networking support. How is this useful? By itself, it isn’t, but the idea is you can interact with the game only through the through plugins (or the server console) using the API – such as WebSandboxMC.

    That is, it is more of a generic server platform, to be extended by plugins using Bukkit.

    This has some pros and cons: no dependence on the protocol updates since it doesn’t support any protocol, not compatible with Minecraft clients, but it is lighter weight and more independent. It fills a (small) niche, along the lines of what I was trying to achieve by running WebSandboxMC on inexpensive/free server hosts which only allow binding one TCP port, by unbinding the 25565 port for the 4081 port for WebSocket/HTTP. Most people of course will want the full Glowstone, but if all you need is to run this plugin, then the light version can suffice.

    Which brings me to heroku-glowstone: a project to run the server on the Heroku cloud platform. This is based on heroku-minecraft, I first updated it to try to run Glowstone but it exceeded the memory limits of the free tier. Glowstone Light runs comfortably within the free limits. This means anyone can clone the project to start up their own server, here is the code: https://github.com/satoshinm/heroku-glowstone

    I have been testing this plugin on this modified Glowstone for about an hour so far, hit about 26 users total (3-4 max simultaneous, I think), it is running live here:

    http://netcraft.herokuapp.com/


  • Admin

    Interesting idea! Just to note that there’s an issue on your server - I connect, die immediately, and are stuck in a block. Wew! Also, I can’t seem to turn my view. Browser is Vivaldi.

    vivaldi_2017-05-01_10-05-17.png



  • @gdude2002 said in WebSandboxMC: Web-based client providing an interactive glimpse of a part of your server using WebGL/HTML5:

    Interesting idea! Just to note that there’s an issue on your server - I connect, die immediately,

    (You died from FALL) - this is a bug in Glowstone I’ve been meaning to fix, just submitted a pull request here: https://github.com/GlowstoneMC/Glowstone/pull/469 (also applied the fix in Glowstone Light 5 and pushed to netcraft.herokuapp.com).

    and are stuck in a block. Wew!

    For now you have to dig your way out it is an adventure :). But it seems to be a race condition or related to timing, I haven’t seen this issue locally but I do see it now, logged a bug to investigate later https://github.com/satoshinm/WebSandboxMC/issues/50.

    Also, I can’t seem to turn my view. Browser is Vivaldi.

    Testing with Vivaldi 1.9.818.44, I can replicate this problem. The issue is Vivaldi does not support the Pointer Lock API: https://forum.vivaldi.net/topic/9092/support-for-mouse-cursor-capture/2 - these browsers support it (most modern browsers): http://caniuse.com/#feat=pointerlock. Without it its not possible to reliably capture the mouse to implement mouse look / free look. However, Vivaldi browser does support the HTML5 Gamepad API so if you have a controller that works on http://html5gamepad.com you can use that, or as a last resort, the keyboard’s arrow keys can be used to move the camera.

    I have not tested much with lesser known browsers, but curiously, testing now with the Brave browser I also see it doesn’t support pointer lock either. And both these browsers are based on Chrome’s Blink layout engine, yet Chrome itself supports Pointer Lock just fine. I’ll see what I can do to better support these niche browsers but my main targets for best support are Chrome, Firefox, and Safari.


Log in to reply
 

Looks like your connection to Glowstone was lost, please wait while we try to reconnect.