Tooting my own horn here, but here's my own little "Minecraft" renderer in Neja, circa 2005 ( http://www.youtube.com/watch?feature=player_detailpage&v... ). Over 4 years before Minecraft, and even then that was nothing new. It was kinda cool for JavaScript, in 2005, but all things considered, it was pretty lame compared to Ken Silverman's voxlap for instance.
The "cool" thing about this demo, was that Canvas was not widespread back then so I generated all the chunky effects on the fly as 24bits BMP image, then made a data: URI and update an IMG tag.
It was coded in C# (.Net 2) and XNA 3.0 runtime. The code was not obfuscated and someone published the code. As Infiniminer was a multiplayer game, hacks and bots destroyed the game community as well as several knock-off clients. That everyone had to download dotNet 2 and XNA 3 didn't help either. So Minecraft with its original Java browser applet won the audience by storm. The rest is history and Notch just bought the most expensive house in L.A.
The history of DirectX support on non C/C++ is a sad story of deprecated APIs:
* Visual Basic 6 with DirectX 7 support: Direct3D retained mode (COM-based scene graph API), Direct3D immediate mode and DirectDraw (2D)
* Visual Basic 6 with DirectX 8 Direct3D immediate mode (different API), no DirectDraw (2D)
* C# with XNA 1-4 (DreamSpark/MSDNAA license), supports only DirectX 9: Released in December 2006, XNA is intended to push the ease of game programming to the extreme. XNA is new wrapper around native DirectX. As development on a new version of Managed DirectX has been cancelled, XNA can be thought of as the new version of Managed DirectX. Although the code is not 100% the same, it is VERY similar. No windows event handling, built-in update and drawing loops and XBOX360 compatibility are just some of the some of the reasons why XNA will become the future of DirectX game programming.
XNA is built on top of DirectX 9 -- http://www.riemers.net/eng/Tutorials/xnacsharp.php
As someone who has tried to do make a Minecraft clone in JavaScript perhaps I can shine a light on why I tried it. I guess first and foremost I'm fond of Minecraft and I'm primarily a JS developer. So when I wanted to improve my game development and webGL/openGL capabilities it was quite a natural choice. Jumping into the actual project there's a few attempts around on the web, probably by people with similar mindsets. This means there some references on roughly how the game works. There's some quite interesting little things I learnt from it: implementing perlin noise, procedural generation techniques, triangulation of voxels, various boilerplate stuff for webGL and webGL 2, voxel optimised ray casting, deferred rendering, shadow mapping and world chunking.
All in all it was quite profitable; several of those things have come in useful for my day job since then. Of course it didn't much improve your game design skills, as I was just copying another game.
I never finished it, and looking around most of these copies are in a similar state. I'm proud of what I achieved and each problem I overcame but I can't even claim mine competes with the original or even the best clones out there. It's fairly easy to reason why most of these clones were never finished. It's a huge amount of work and the goal has already been reached by someone else. So motivation after the initial "oh hey I built something a little like Minecraft" is hard to find.
These sorts of project serve 3 purposes:
- inspire others to try something similar ( hopefully for the same reasons )
- improve your own abilities
- show appreciation to the developers of Minecraft
As for why this project is "hacker news worthy" I expect it's just because it looks more polished than most. But as I said above, most of the value of the project is to the developer, not anyone else.
Damn, I remember playing creative minecraft back in 2010, a surprisingly good experience for a java applet embedded in the browser. All running on linux with fairly smooth opengl rendering. I also remember using a wrapper/front-end called world of minecraft that allowed you to run the jar outside of the browser and even had multiplayer support...
What was the tech stack? Did they actually port Minecraft to web assembly or js, or did they use a JVM that was ported to the browser? I guess a Java applet is out of question. ;-)
I for one find this project very worthwhile, there are/were plenty of web-based clones of Minecraft but many abandoned or haven't caught on. ian13456's mc.js, which I just learned about from this post, has 1717 stars on GitHub, quite impressive.
I'm aware of a couple other attempts. voxel.js (the furthest along fork seems to be http://voxelmetaverse.com - code https://github.com/deathcap/voxelmetaverse hasn't changed since 2016, and the domain expires 2020), originally named minecraft.js, written in pure Javascript originally with three.js, then stackgl using npm and browserify.
My attempt is https://satoshinm.github.io/NetCraft/ (source code: https://github.com/satoshinm/NetCraft), but it is implemented slightly differently, in that it is actually written in C (based on fogleman's "Craft") and compiled to WebAssembly to run on the web. This avoids some of the performance pitfalls with Javascript and garbage collection. It even lets you play on a Bukkit-compatible server using a plugin.
Unfortunately I have abandoned my project as well, but C/C++/Rust compiled to WASM may be the future, although it will be interesting to see how far this pure Javascript-based client can go. I wish mc.js developers the best of luck, we had similar goals of wanting to play Minecraft on the web.
The original created Minecraft Java applet was available on the website for a long time. It looks like it's now been converted to WebGL -- I wonder if it's compiled from Java or reimplemented.
Hey DC, I found this thread very late so I guess you may not see this. I played with voxel.js for a while back in the day, but ultimately I wound up building a similar engine from scratch (I think we discussed it briefly, if this rings a bell).
Anyway, I thought you might be interested to know that Minecraft Classic seems to be built on my voxel engine, the one I modeled after voxel.js! So there's a kind of circular lineage now, from minecraft to voxel.js and later back to MC...
Yeah this is a very limited subset of what Minecraft does and arguably the implemented bits are the low hanging fruit. I wrote a "game" in my teens that covers this functionality, though in C++ not JS on a browser.
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.
When I watched it a couple months ago, I did not know that this was the Minecraft developer (I think it was before Minecraft was released). The video is and was probably the most inspiring thing on the power of creative programming I've ever seen. His ability to iterate and iterate and create something out of literally black nothingness. When you see him doing the artwork, you're like woah - he does his own graphics too!
That idea was made by an extremely competent programmer. It was called InfiniMiner and it exactly fits the mold you've provided. Minecraft was then executed on it to an astounding creative success.
As someone else pointed out, the programmer is Notch, the guy behind Minecraft, which is also written in Java, so I assume he has been neck-deep in the Java graphics APIs long enough to have enough of it memorized.
The "cool" thing about this demo, was that Canvas was not widespread back then so I generated all the chunky effects on the fly as 24bits BMP image, then made a data: URI and update an IMG tag.
reply