top | item 10974036

Microsoft's forthcoming Minecraft Education Edition is written in C++

319 points| ingve | 10 years ago |zdnet.com

331 comments

order
[+] sheepdestroyer|10 years ago|reply
Micro optimized by John Carmack himself who volunteered (he was like a free consultant for while) for the task because he believed that's the best that could be done to help VR. He first had to personally persuade both hierarchy at FB & MS. So bold.

From : http://venturebeat.com/2015/09/24/how-john-carmack-pestered-... :

“I was willing to do just about anything,” he said. “On the phone I said that if this doesn’t happen, I’m going to cry. This will just be so terrible. This will be the best thing that we can do for the platform. But there are some problems that compilers can’t solve.”

It turns out that the solution was to get the top executives from Facebook and Microsoft together.

“Mark [Zuckerberg] and Satya [Nadella] were able to sit down and make sure that the deal happened,” said Carmack.

[+] Analemma_|10 years ago|reply
This is amazing. John Carmack has become like the Lone Ranger of code optimization. He shows up out of nowhere, makes your game run 20 times faster, then rides off into the sunset. "Who was that masked man?" "Oh, he's John Carmack."
[+] Almaviva|10 years ago|reply
I think he may be the best refutation against people who don't believe in 10x engineers. Imagine you want to create a VR prototype and get to hire 100 average programmers with some experience in the industry, and you're up against Carmack with a month until your demo...
[+] MrZongle2|10 years ago|reply
From the linked article: "...when Facebook acquired Oculus in July 2014, Notch “blew up about it,” as Carmack puts it. Notch referred to the social media company as “creepy” and publicly stated that it wasn’t the partner he was envisioning when he backed the original Oculus Rift when it was just a Kickstarter project."

The more I read about Notch, the more I'm convinced that Microsoft's acquisition of Mojang and getting him out of the scene was the best thing for Minecraft. He strikes me as an incredibly fortunate but oddly emotional individual who was way over his head once his creation took off.

[+] redthrowaway|10 years ago|reply
Man, would I ever love to see some before and after code.
[+] anonbanker|10 years ago|reply
every worry I had about this product is now less of a worry: The man who wrote QuakeC is now on the job.
[+] ChuckMcM|10 years ago|reply
I chuckled at this: "In schools and colleges that use Office 365, students will be able to log on to Minecraft using their Office credentials." Because everyone things "how can I log into this game? Oh yeah, with my office credentials." :-)

That aaid, one of the more interesting debates I participated in at Sun was Bill Joy's insistence that interpreted Java would be "faster than C++." From what I recall of his argument, it was that understanding the semantics of the program and just in time compilation would allow the JVM to run only the code that was needed in a smaller resident set with fewer context switches. At the time I was arguing against that, saying that a compiled version of Java could be a useful systems language but the interpreted version would not.

And even with some really really amazing hotspot technology on the JIT compiler, I don't think Java was ever faster outside of a few synthetic test cases that did no useful work.

So it really doesn't surprise me that a C++ version of minecraft would out perform a Java version, but it would be much more interesting if they included a JVM for the mods, so that the core was fast and the mods were portable.

[+] jdmichal|10 years ago|reply
> I chuckled at this: "In schools and colleges that use Office 365, students will be able to log on to Minecraft using their Office credentials." Because everyone things "how can I log into this game? Oh yeah, with my office credentials." :-)

I know this was meant to be a joke, but this was more an issue in wording by Schofield (the writer) than anything else. A Microsoft account is pretty much global across all their products. So it's also their email account, their OneDrive account, their Azure account... I'm assuming he picked Office 365 simply because that's the product he thinks is most likely to be already used in the school.

As for the optimization; the JIT's main optimization from what I've researched is inlining. Which is really beneficial for Java because you tend to end up with a nest of getter method calls all to get a single field somewhere, and wouldn't it be nice if the JIT could just inline that field for you? I suspect that, especially if performance is at stake, it's less typical to end up with patterns like that in a C++ codebase.

[+] scholia|10 years ago|reply
> I chuckled at this: "In schools and colleges that use Office 365, students will be able to log on to Minecraft using their Office credentials." Because everyone things "how can I log into this game? Oh yeah, with my office credentials." :-)

If you're a teacher, it's a huge boon to be able to re-use existing accounts. You really don't want to make dozens of classes of kids set up and remember new IDs and passwords for a single application.

[+] pnathan|10 years ago|reply
To be honest, a lot of people have slammed the Minecraft codebase, claiming it's badly written and kind of a slow mess. I can't recall the citations, but based on the discussions when I read those aspects, I wouldn't put aspersions on Java alone in this case.
[+] zamalek|10 years ago|reply
The real reason for chuckling here is the implication that anyone would use O365 for personal use. I'm stupid enough to use it and have almost decided to write-off the money I paid and go elsewhere. This is what $70/yr gets you:

1. ActiveSync! This is the only reason I'm still putting up with this garbage.

2. My company also uses O365, extensively. We have a wiki of sorts in OneNote. I can't contribute to it. Logging into the corp account and clicking "open in desktop" results in an error that claims that I don't have a license. I do. On an on-premise licensed domain-joined machine. I don't on my own O365 account but I didn't log on with that.

3. No layman interface. Want to disable password expiry for your 89yr old father? You'll need to download and install a powershell plugin before you can start reading documentation.

4. Inexplicable login problems. No UI to enter my login email because I had logged into a temporary SP online site I was debugging with. Later I found a "forget this login" link under the temporary login; restoring my access to any other account.

5. "Live login? Microsoft login? We don't know, tell us every time. Oh! You can't use Live with this service anyway!" I no longer know which of the two accounts my stuff is on.

TLDR; O365 is great for corporate/business. I'd recommend it. For personal stuff stay the hell away. They really want to give O365 to kids?

[+] AaronFriel|10 years ago|reply
What the author means, and is significant for the market (Minecraft Education Edition) is that it will work with any "Azure Active Directory" credentials. Every school I've worked with either uses active directory or has another directory service that exposes endpoints (usually SAML based).

Read that line instead as:

Good news! Your teachers and their students won't need yet another password to be able to use this application.

[+] pjmlp|10 years ago|reply
I read somewhere that it was a religious issue not providing AOT compilation.

It always saddned me not to have this option in the reference JDK, only on commercial JDKs.

Whereas we already had Java like safe languages with Eiffel, Oberon and Modula-3 compiling AOT to native code, and with JIT also available before 1996.

Oh and with value types and proper generics as well.

Now maybe Java 10 will become what Java 1.0 should have been.

[+] SeanDav|10 years ago|reply
Right now many trading houses with huge IT budgets are choosing Java for their high frequency trading systems. This is an arena where microseconds matter and the fact that Java is a viable choice, says a lot about the speed and power of modern Java.
[+] kbenson|10 years ago|reply
Not that it's a fair comparison, but I wonder if you took a Java from today and compared it to a C++ compiler from then, would the optimization differences make Java faster for a larger subset of algorithms? I wonder if this was just the classic problem of assuming your competition is static, and planning to eventually surpass their current capabilities while ignoring that by that time their capabilities may have evolved as well.
[+] on_and_off|10 years ago|reply
>So it really doesn't surprise me that a C++ version of Minecraft would out perform a Java version

I am not sure it is a fair comparison. had Minecraft been written in C++ with the same dev cycle, a complete rewrite in Java would also allow to improve its perfs ...

[+] jayd16|10 years ago|reply
Compiled versions of Java libraries and apps would ruin the whole ecosystem and basically the best thing about Java. The CLR is a good compromise but in the end its not that much better.

Hindsight is always 20/20 so it really doesn't surprise me any rewrite is faster than the previous version.

[+] uxcn|10 years ago|reply
Not that I prefer Java where performance is important, but profile based optimization combined with optimizing across translation units is non-trivial. C/C++ compilers have been increasing support for these more recently. Jan Hubicka's blog has a good example [1].

I have to wonder if they plan to keep the codebase portable though. One of the major benefits of Java was that nearly everything has a JVM.

[1] http://hubicka.blogspot.com/2014/04/linktime-optimization-in...

[+] Mikeb85|10 years ago|reply
> That aaid, one of the more interesting debates I participated in at Sun was Bill Joy's insistence that interpreted Java would be "faster than C++."

Today, with JDK8, that's almost true. With JDK9 it might be.

There's no reason Java can't be faster, it just hasn't happened yet.

[+] tomcam|10 years ago|reply
Stunning that Bill Joy ever thought interpreted Java could be faster than C++. I thought he knew more than that...
[+] jdmichal|10 years ago|reply
As other people have pointed out: "Modding" in Minecraft is literally replacing the original Java bytecode with your own. This is why the idea of a Minecraft launcher took off; replacing binaries with modified versions is very dirty and very difficult to do if multiple things are touching the same file. I hope that this C++ version is the impetus needed for the forever-promised-never-delivered modding API to finally take shape. Then I don't even care what the underlying technology is.
[+] madaxe_again|10 years ago|reply
One would hope so - I predict however that many end users will be slow to adopt as modders will probably start by rioting, and then replatform (if indeed there is an API) - but there will be a substantial time lag. There's a potential for a vicious underadoption cycle there, however, and bifurcation of the community into "classic" minecraft and "new" minecraft.
[+] ergothus|10 years ago|reply
Assuming MC does move to a C++ main version:

I wonder if anyone is studying this and drawing parallels to the Python 3 or Perl 6 efforts. There seems to be a lot of similarities.

* Existing product is great, but limitations are being encountered

* Decision is made (or reality admitted, depending on your view) that you have to make a dramatic change

* Community is split, progress is slow

* ???

I'm a huge Minecraft fan (it's about the only computer game I regularly play), and while the community has lots of grump people, it's also fairly adaptable. This would be a huge shock though, and I'm more interested in what happens over, say, 6-12 months than I am in initial reactions.

[+] xd1936|10 years ago|reply
Sad for the modding community. The entire ecosystem is based on recompiling and editing/inserting Java.
[+] dawnbreez|10 years ago|reply
I sincerely hope the modding API isn't terrible. You can't do a lot worse than Forge--especially with LexManos running the show, his terrible decisions and demands for respect are killing the modding scene--but doing better would be great.
[+] webwielder2|10 years ago|reply
Y'know, they could add actual support for modding into the damned thing.
[+] cookiecaper|10 years ago|reply
I've been thinking about MC's mod community as I recently picked Minecraft back up for a couple of days, and just how impossible any of it would've been if Microsoft had owned the property from the outset. MCP would've been C&D'd in a matter of weeks and that'd've been the end of it. Today, while MS has mostly left the existing mod community alone, I'm sure they wouldn't be friendly to someone who created an intermediary server that allowed the different MC platforms to interact, especially as they enabled this feature only for Windows 10 machines<->Mobile in June.

Let's hope this becomes Minetest's time to shine.

[+] Lawtonfogle|10 years ago|reply
Honestly, if they don't add in enough modding support, the game may very well split, with the last Java editions never receiving official updates but with all modding continued to be done to them. It'll be odd since the source itself can't be split, but I don't see the modded experience dying.

Personally, modded minecraft is the only type I continue to pay. If I didn't have the choice of mods, I'd rather go with one of the better options among the infinite number of minecraft clones.

[+] coldpie|10 years ago|reply
It'll be interesting to see what they do about modding, since they absolutely MUST support it. The power of modding the Java version was that you could relatively easily replace in any part of the game. With a modding API, you're restricted to whatever the API allows you to do.

I wonder if this going to create some bizarre fork situation, with an MS-approved-and-bound C++ version and a legally questionable, community-maintained legacy Java version.

[+] monk_e_boy|10 years ago|reply
Amazing for kids who will finally be able to play minecraft at school. The current version runs at less than 10fps on crappy school computers. It's so bad.
[+] tshannon|10 years ago|reply
And for any platform that isn't windows.
[+] dspillett|10 years ago|reply
One would hope they've had the good sense to build in a good API for mods, otherwise they have missed a key point and a large chunk of the audience will be somewhere between losing interest and becoming irate.

Of course even if the plugin/mod architecture is good getting existing mods converted will be a struggle, particularly where the original coder considered them complete and is now busy working on something else new & exciting.

[+] symlinkk|10 years ago|reply
Worth mentioning to everyone who is complaining about the lack of mod support: there has been an open source C++ clone of Minecraft for a while now called "minetest", looks like their website is down right now but here's the Github repo: https://github.com/minetest/minetest
[+] ww520|10 years ago|reply
A rewrite is usually faster than the original, especially one without backward compatibility constraint. I bet a rewrite in Java will be faster than the original, too.
[+] nitrogen|10 years ago|reply
Will this C++ version run everywhere Minecraft already runs (Linux/Mac/Windows/mobile/etc.)? Can it connect to Java servers?
[+] ryanhuff|10 years ago|reply
My 11 year old son is an avid Mincraft player. His favorite aspect is playing team games on multiplayer servers.

When I told him that Microsoft bought Mincraft, he was quite upset, and was confident that Microsoft would ruin it.

Change was bound to happen. Hearing their plans to go c++ makes me wonder how it will impact the server ecosystem. Also, the "Windows 10" messaging in the article does sound like a case of a big company trying to bend a community to its own will (get people on Windows). In my son's case, if things go south, he is going to end up hating Microsoft for ruining his favorite game.

[+] mavhc|10 years ago|reply
On one hand I'll be happy to not have to keep Java on the school machines, with its terrible installer, and minecraftedu, which wants to write to the install dir (same problem with kerbaledu, but that also has the additional crapness of being licenced per machine based on mac addresses, requiring delicensing, and internet access to check licence).

On the other per year per user fees for software is a terrible trend, especially for schools. And I'd rather run my own server, and the kids love the mods.

[+] Lawtonfogle|10 years ago|reply
Well, I was wrong. I was fully expecting the rewrite to be in C# to get the Java people to switch to C#, not in C++.
[+] Kequc|10 years ago|reply
If anything needed a re-write Minecraft needed one. With the resources Microsoft has at its disposal I'm surprised to see it looks like a 1:1 remake. They didn't update the visuals or anything.

This was an opportunity to release a slightly upgraded version of the product. It isn't backwards compatible so why keep for example all of the redstone bugs and so on, in it? This product could have been greatly refined. Maybe that's only coming in Minecraft 2.

In true Microsoft fashion, there will now be Minecraft, Minecraft EE, and Minecraft 2. Instead of just two major products.

[+] Ezhik|10 years ago|reply
I still don't really get what exactly Minecraft offers for education.
[+] balls187|10 years ago|reply
How do mods work on the console versions?
[+] deepinthefall|10 years ago|reply
Noooo.. How can I run it on my old SUN SPARC server if it's not in Java?
[+] outworlder|10 years ago|reply
That's cool and all, Minecraft has always been a pig.

That said, no mod compatibility is going to kill the game. Just check youtube, it is difficult to find something about "vanilla minecraft".

[+] Animats|10 years ago|reply
C++, not C#. Why isn't Microsoft using its own language? It seems late to be doing new starts in C++.
[+] roghummal|10 years ago|reply
Down the memory hole it goes.
[+] kelvin0|10 years ago|reply
Wonder how Markus feels about that ... I would be honored!
[+] hathym|10 years ago|reply
I hope this ends the Java vs C++ performance debate.