HN2new | past | comments | ask | show | jobs | submitlogin
Bringing Minecraft-style games to the Open Web (maxogden.com)
84 points by maxogden on Jan 26, 2013 | hide | past | favorite | 15 comments


    I was disappointed to find out that not only is Minecraft 
    closed-source but it also hasn't shipped an official API 
There is currently a plan for this to be added to the game, there's no public time-line but they are working on an API. There are also some really amazing community projects that have built this sort of thing, server side there is bukkit and client side there is forge.

http://dev.minecraft.net/blog/ https://github.com/Mojang/Minecraft-API http://bukkit.org http://www.minecraftforge.net/forum/


You can poke inside it a bit though using JD-GUI:

http://java.decompiler.free.fr/?q=jdgui

Illegal or not? I don't really care. Reverse engineering for compatibility is legal here :)


You may be interested in the Minecraft Coder Pack from Ocean Labs - they include the Fernflower decompiler, producing very high quality output (certainly better than jad, tbh not sure how it compares with JD-GUI). But even better, MCP includes a comprehensive set of "mappings", providing informative names for each class, and most important field and method names.

Running a decompiler (JD-GUI or otherwise) on Minecraft by itself will produce obfuscated source, so having this deobfuscation step is very useful as a modder. If a symbol is not deobfuscated, you can submit a proposed name on IRC to MCPBot, or even provide a description for the Javadoc.

The end result of running MCP on Minecraft is a fairly readable source base, which one can easily make changes to and recompile. This is how modding frameworks such as FML and Minecraft Forge are built (although CraftBukkit uses a different approach - they don't use MCP but their own, less comprehensive and incompatible mappings, one reason why Forge mods and Bukkit plugins cannot easily be used together, a problem being solved with the merged Forge/Bukkit "MCPC+" server from MC Port Central).


And on the server side, Bukkit[1] is pretty much the official API since the team behing the project got hired by Mojang[2].

[1]: http://bukkit.org/

[2]: http://www.mojang.com/2012/02/minecraft-team-strengthened/


Although Mojang did hire the core Bukkit team, the mod API they are working on is planned to be a new API designed from the ground up, rather than Bukkit [1]. Bukkit was designed within constraints appropriate at the time for the environment it arose in (for example, it is layered as: the Bukkit API itself, on top of the CraftBukkit server implementation, which is itself a mod on the "vanilla" Minecraft server jar from Mojang -- abstractions to help insulate Bukkit plugins from the volatile nature of Minecraft internals). They did design a fairly good API, the most successful in the Minecraft modding community no doubt, but having a new official API built into the game has a number of advantages and is their ultimate goal. Although there may be a Bukkit compatibility layer or a documentation on porting from Bukkit to the official mod API.

It isn't clear what will happen to Bukkit after the official API is released. The founder of Bukkit has said they intend to phase it out. But Bukkit is an open source project, LGPL, with many active contributors and a thriving community of plugin developers. Will be interesting to see what happens, although IMHO a proper, well-designed official Minecraft API can only be for the better.

[1] Source: Minecon 2012 API panel


This project is very interesting for a number of reasons, I'm surprised it hasn't received more attention. If I were Mojang I'd be quaking in my boots right now.

No single factor has been exclusively responsible for Minecraft's runaway success, but an undeniable essential contributor has been the extensive modding community which has formed around the game. The nature of the game as a sandbox makes it highly amenable to modding, and by writing it in Java -- a language easily decompiled and recompiled, for modding -- Notch (perhaps inadvertently) allowed this modding to take off, launching Minecraft into the stratosphere.

Countless clones of Minecraft have been attempted, yet none gaining any traction comparable to the original. Part is this phenomena can be chalked up to the first mover effect (though arguably Infiniminer was first), sure, but I'd argue the mod-ability of Minecraft is an even more important reason for its continued success. Mojang believes this too: jeb_, the current lead developer, has said he strongly believes a modding API is crucial for Minecraft's future, and its his #1 priority.

Seriously, if you've never played Minecraft before, the difference between "vanilla" Minecraft and Minecraft mods collectively (as in modpacks such as Feed the Beast) is like night in day. Many "mods" can be better considered as completely different games. We're not talking about minor tweaks and modifications, but brand new and compelling gameplay content.

Mojang is working very hard on cleaning up and refactoring and optimizing the code (never originally intended for modding) in preparation for an official mod API, anticipated by players and modders everywhere. But here's the kicker: what if someone else beats them to it?

For this reason, Voxel.js's focus from on developing a modular engine with plugin-able modules from day one is pure genius. Climbing over the wreckage of abandoned one-off clones, they sought to build something better, something sustainable. And it is working: even after only a month of hacking, Voxel.js already has several fairly impressive third party addons. Tree generation, solar cycles, terrain gen, multiplayer.. Not bad at all. And someone is even working on bringing in WorldEdit-ish functionality!

Yet modularity on its own is not enough. Several Minecraft clones already have plugin support, but nonetheless lack the player base of the original. In order to attract developers, modders, and players not only must the platform be architecturally attractive but accessible as well. Voxel.js fits the bill even better than Minecraft -- nothing to install, just go to a website in your browser, and begin to play. (Minecraft, as a Java app, could be played within a browser I believe, but especially with Oracle phasing out applets, I wouldn't consider it on the same level as modern JavaScript web apps).

So there you have it: the inherently attractive nature of an open world sandbox voxel game, an open and modular design built for the ground up specifically intended to be reusable, on top of the low-friction easily accessible platform of the web. As more modders begin to take note, I expect the snowball effect to kick in, and Voxel.js (or its derivatives, or its own clones!) could take off and become even bigger than Minecraft.

The why hasn't it? In fact, I attempted to develop a project a while back almost exactly like Voxel.js. JavaScript+WebGL+websockets+voxels+sandbox (an enticing combination if their is one). The technology just wasn't there at the time. The pointer lock API is mandatory for these kinds of games, and I'm pleased it has been implemented in Chrome by now (an other browsers soon) -- this demo works amazing well. Could use a little polish, but I could see myself playing this for real.

Perhaps my involvement with Minecraft modding and abundant familiarity with its limitations (as the author of this article brought up: decompiling...yeah) has led me to be overly optimistic of viable alter alernative platform. After all, Minecraft is more of a platform for games than a game in itself. There's no reason why someone couldn't build a better platform draw gamers and modders from Minecraft. Who knows, maybe Voxel.js is that platform.


"There are a few out there, but quite frankly they all reeked of Java and were limited by the nature of decompiling as a workaround to Minecrafts lack of an API."

What does Java smell like?

Seriously though, is it really the language that's the problem here? Honestly, this guy is a JavaScript developer. If there ever was code that had potential to "reek" it would be JavaScript. However, it would be ignorant to discredit an entire language and toolset because of that. Don't judge every line of Java code out there because Minecraft, of all things, doesn't have any kind of public API or because it's closed source. Especially since Java has such a thriving Open Source community.

The article was however really interesting, and I'm glad the author wrote about his experiences. I've been playing around with Minecraft and thought it would be fun to write a clone of my own.


Sorry about the tone, I definitely could have said that part more nicely. To me Java smells like too many abstract interfaces, lots of boilerplate and hard to use build tools. Java was the first language I learned so I may very well be scarred from the experience.


Most people developing Java voxel games/voxel game engines/anything to do with the Minecraft community are brand new developers who don't know what they are doing.... yet (not this guy though, in general Minecraft).

However I love game servers like this as it brings new talent into programming, and gets younger people interested. I remember a couple of years ago when private servers were more popular with games like World of Warcraft, Maplestory and a lot of other games that brought more people into programming.


I too found the article to be interesting. The main takeaway for me was the importance of community support -- give people the tools and the means to build upon and improve your work and they will do just that. Opensource software has this feature baked in, as does Minecraft to some extent through decompiling the java bytecode.

I too am working on my own voxel game and this article reinforces my thoughts on providing a server-side scripting API.


Another open source voxel engine worth checking out is PolyVox (which powers Voxeliens, among other things).

http://www.volumesoffun.com/polyvox-about/


As a side project I've been contributing to a remake of voxel FPS Ace of Spades based on a C/Lua stack: http://github.com/iamgreaser/buldthensnip

It's already a playable game at this point, but I have some interest in following the progress of a JS engine for the kinds of reasons outlined in this blog - code reuse tends to be a lot better within the browser.


Have a look at this, exactly what you are looking for: http://badassjs.com/post/40691367335/voxel-js-a-minecraft-li...


Did... did you read the post? Or look at who wrote it?


oops, sorry yes, I realised later.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: