Voxel-clientmc: A web-based Minecraft client using the WSMC WebSocket-Minecraft proxy

Have you ever wanted to play Minecraft in your web browser for some reason? If so, this plugin is for you:

voxel-clientmc aims to be a fully-functional Minecraft-compatible client built on JavaScript, WebSockets, and WebGL running in modern web browsers. Warning: this project is in early development, expect many bugs and missing features (bug reports and pull requests always welcome).

An integrated WebSocket-Minecraft proxy server (WSMC) for voxel-clientmc is included. To install, simply drop the .jar into the mods folder of your Sponge server, and it will start an HTTP and WS server serving the voxel.js-based mineflayer-based web client connecting back to your Minecraft server. Forge client handshake support is implemented, so it works on SpongeForge servers with mods installed as well.

For downloads, documentation, source code, and issues, see the GitHub project page:

5 Likes

Reminds me of the days when you could play Minecraft via minecraft.net. I think that was axed when they went to the new, yet uglier client.

I think one day you should be able to play Minecraft Java version on Android devices.

Ah, with Java applets presumably? Before my time… RIP Java Applets, 1990s – 2016 (or at least Oracle is deprecating them starting with the release of Java 9), hardly knew ye.

But it is interesting how we’re almost coming full circle, with JavaScript in the browser surpassing Java, and WebAssembly on the horizon to run richer client-side web apps. Java applets had a number of problems, but the modern web environment is evolving learning from the mistakes of the past. As they say hindsight is twenty-twenty.

One of the features I’m most excited about, present in web-based JavaScript browser webapps but not desktop Java apps (barring the Java security manager, and we all know how well Java applet security turned out), is the ability to run remote code safely. The player only has to visit a web server hosting voxel-clientmc (such as through my Sponge plugin which includes a web and WebSocket-Minecraft server proxy for convenience, but it can be hosted independently as well, all you need is a website and a wsmc server), and then the server sends the client all of the code it needs to load and execute the game. Douglas Crockford calls this “load and go delivery”.

There have been efforts to do something similar with modded Minecraft, custom launchers to download code of modification packs from various servers to connect to the modified server, but the trust model limits how well this design can scale. You might not want to download and run Java code from any old random server out there, for example. But you would be fine with visiting random websites (notwithstanding malware or phishing sites) and having them run JavaScript on your computer. Or at least most people do, in practice. Having a JavaScript-based Minecraft-compatible web client could open up a whole new world of possibilities in accessible modded Minecraft.

Interestingly, many ARM processors include Java support (such as the ARM926EJ-S, with “Jazelle® technology” on ARM9). Oracle developed several editions of Java: J2EE (enterprise), J2SE (standard), and… J2ME (micro edition). Supposedly J2ME is available for Android. But J2ME last I checked is quite limited, stuck on the 1.3 class file format (47, current modded Minecraft uses around Java 1.7 (51), plus or minus), porting it would be no trivial effort, but not to say it isn’t impossible. Another challenge is porting the graphics library from OpenGL to OpenGL ES / lwjgl. ES is much more limited.

Although, the WebGL 1.0 API which I am using in voxel-clientmc is actually based on OpenGL ES 2.0 (and there is an upcoming WebGL 2.0 based on OpenGL ES 3.0, but it is not yet widely supported), so it should be possible in principle.

If someone does succeed in modding MCPC to run on J2ME / OpenGL ES, I’ll give them mad props for the significant technical feat, but personally I’m more interested in developing on the web platform for the reasons mentioned above (or using web technologies in a desktop app using something like electron, but I haven’t looked into that yet). Another benefit is voxel-clientmc is completely open source, so in theory it should be easier to enhance and extend and do whatever you want with than modifying the official Minecraft client, but of course the downside is it is much buggier and feature-incomplete at the moment.

And the JavaScript language is slightly more dynamic — not that Java isn’t dynamic, granted it is more dynamic than say C++, much to the modding community’s benefit, but JavaScript takes dynamism to a new level (for better or worse). In fact I originally started this project 100% in JavaScript, including the WebSocket-Minecraft proxy (built on Node.js, runs JavaScript sever-side), but ported the proxy to Java so it could run inside Bukkit and now Sponge servers.

2 Likes

There actually is a sort of J2ME version, it’s called Comcraft http://comcraft-game.blogspot.com/ I even made a mod loader for it GitHub - simon816/ComcraftModLoader: Comcraft Mod Loader is a mod to Comcraft that allows multiple mods to be installed at once

But yeah excellent work on your project thus far.

This is really awesome! Seems like this project and simon816 could work together. The difference between ComCraft and Voxel-clientmc is that you can actually connect to a MC Server with Voxel-clientmc. So it’s more then a minecraft clone, but a client for all regardless of platform. That’s awesome.

1 Like

You actually can, its a launcher called Bordwalk! It works fairly well! (If you dont mind 5fps)

https://play.google.com/store/apps/details?id=net.zhuoweizhang.boardwalk&hl=en

NOTE: it doesn’t work on some versions of android!

1 Like