News for hackers. Stuff that matters.
Re:Minecraft arrives on the Nintendo Switch by bananicorn on Friday May 12, 2017 @11:10AM (#14324641)
>or up to four can play together in a split-screen view on the TV from a single console

I didn't even expect that, honestly.

Also I wonder if minecraft still runs java underneath - probably yes, but you never know.

Re:Minecraft arrives on the Nintendo Switch by LeifCarrotson on Friday May 12, 2017 @11:27AM (#14324824)
This is almost certainly not the PC version of the game, which does run Java. The Switch would probably not be capable of running 4 instances of the at 720p 60fps.

There's a Windows 10 edition of the game, written in C++, a from-scratch rewrite of the original Java. There's Minecraft Pocket for Android/iOS. And there's Console Edition, which runs on XBox 360 and WiiU, and now Switch Edition.

They are aiming for feature parity between the various versions. The Pocket/10/Console versions are all intercompatible - you can log in on a server with one platform simultaneously playing with someone on another platform. I don't know how much code they share.

But the original Java edition is still where all the YouTubers, mod authors, wiki activity, and really the core user base is at. Pocket and console are more used by the younger and more casual users. Feature parity like world generation is possible, but it won't be possible to make various Redstone (programmable machine) contraptions, build aesthetics, and farms compatible.

It will be interesting to see how it plays out.

Re:Minecraft arrives on the Nintendo Switch by TazeTSchnitzel on Friday May 12, 2017 @02:11PM (#14326346)
> This is almost certainly not the PC version of the game, which does run Java. The Switch would probably not be capable of running 4 instances of the at 720p 60fps.

Though I might just be misreading you, the PC version probably isn't slow because it's Java, it's just poorly written.

Re:Minecraft arrives on the Nintendo Switch by andrepd on Friday May 12, 2017 @03:02PM (#14326852)
It has been acquired for 2 billion dollars, it has had 8 years in which to clean up and optimize that code. Either the all the people working in it are very incompetent or it's actually Java to blame :^)
Re:Minecraft arrives on the Nintendo Switch by tuxracer on Saturday May 13, 2017 @10:33PM (#14333954)
2 billion dollars and 8 years hasn't even gone into such an effort though. The complete rewrite which serves as the codebase for the xbox, iOS, etc.. version is where the majority of that time, money, and effort has been spent. The mobile and console markets were apparently seen as as a much more lucrative use of time and effort vs optimizing the legacy desktop-only Java version which the author himself agrees was poorly written.
Re:Minecraft arrives on the Nintendo Switch by LeifCarrotson on Friday May 12, 2017 @02:54PM (#14326776)
Only a little. I was going to write that it was a different version because the updated versions have been frequently ported to new platforms, but that's not proof, they might have changed their pattern. And while the new codebase seems more portable and flexible, there's no reason the Switch couldn't be made to run Java.

The proof is that while the Java version runs acceptably on a modern PC - which is all it needs to do - a PC with the performance of the Switch would not be capable of this performance level. Instead, the Pocket edition running on phones would be closer to this performance.

(Also, you might be misreading me because I forgot "PC version" between "the" and "at 720p".)

Re:Minecraft arrives on the Nintendo Switch by oneweekwonder on Friday May 12, 2017 @03:25PM (#14327076)
> the PC version probably isn't slow because it's Java, it's just poorly written.

Maybe the initial java code base, but like someone said they had 8 years and enough resources to rectify the issue.

Do you have any recent info to back your claim?

Re:Minecraft arrives on the Nintendo Switch by khedoros1 on Friday May 12, 2017 @06:28PM (#14328437)
I've got a slow-ish machine running Windows 10 (4GB RAM, Intel GPU, Atom-descended quad-core Celeron). The Java version of Minecraft runs at maybe 2-5 FPS. I wouldn't call the Windows Store version "smooth", but it's probably closer to 10-20 FPS, with the same distance settings. For the sake of argument, I'd be willing to assume that Java code is slower than (say) the equivalent natively-compiled code, but probably not anything close to 5x slower.

Maybe there are some different features that make one slower than the other? I don't know. I just know that the Java version is slower, and that the difference in language probably isn't enough to account for it. Difference in features and difference in quality of implementation are the two possibilities that stick out in my mind as culprits for the difference in performance.

Re:Minecraft arrives on the Nintendo Switch by pythonaut_16 on Friday May 12, 2017 @12:30PM (#14325401)
If they can put out a stable mod API and reach feature parity (but not necessarily compatibility) the C++ version will quickly replace the Java IMO.

The biggest things holding back the game today are poor performance and lack of a mod API and the Windows 10 version already does great things for performance.

Re:Minecraft arrives on the Nintendo Switch by Gaelan on Friday May 12, 2017 @12:35PM (#14325444)
I don't think a C++ API will ever be as flexible as the PATCH EVERYTHING that is possible with Java.
Re:Minecraft arrives on the Nintendo Switch by beamatronic on Friday May 12, 2017 @02:00PM (#14326243)
I would worry more that any of their C/C++ components would have ridiculous dependencies, such as Cortana being up and running
Re:Minecraft arrives on the Nintendo Switch by bobsam on Saturday May 13, 2017 @06:23PM (#14333311)
I don't see why this is downvoted. Microsoft has done exactly this with other products including core is stuff.
Re:Minecraft arrives on the Nintendo Switch by minimaxir on Friday May 12, 2017 @11:15AM (#14324698)
Minecraft was rewritten in C++ (EDIT: see replies for clarity) when it was acquired by Microsoft, mostly for this very reason. https://motherboard.vice.com/en_us/article/why-gamers-are-wo...
Re:Minecraft arrives on the Nintendo Switch by UnfalseDesign on Friday May 12, 2017 @11:28AM (#14324826)
Saying "Minecraft was rewritten" is a little misleading. The Pocket Edition was ported to Windows 10. It wasn't rewritten. Also, the main edition that one can purchase for Mac, Windows, or Linux is still in Java. The Pocket Edition, which was built long before Microsoft's acquisition, was not written in Java.
Re:Minecraft arrives on the Nintendo Switch by skybrian on Friday May 12, 2017 @11:26AM (#14324807)
The pocket edition was already pretty far along before the Microsoft aquisition. It seems they invested in improving that rather than the original codebase.
Re:Minecraft arrives on the Nintendo Switch by ShakataGaNai on Friday May 12, 2017 @11:15AM (#14324689)
The PC version is still Java, but the rest of the platforms run under various different code bases. They keep them the same but sometimes the non-PC platforms have actually gotten features before PC has.
Re:Minecraft arrives on the Nintendo Switch by gramstrong on Friday May 12, 2017 @11:14AM (#14324685)
I believe Microsoft re-wrote it in not-java.
Re:Minecraft arrives on the Nintendo Switch by ungzd on Friday May 12, 2017 @11:25AM (#14324805)
Why Java doesn't work on Nintendo Switch? Only for political reasons (forbidden by Nintendo)? They fear JIT or GC?
Re:Minecraft arrives on the Nintendo Switch by PhasmaFelis on Friday May 12, 2017 @02:16PM (#14326399)
Java is a horribly inefficient language for gaming. Every console and mobile port of Minecraft has been written in C++, and Microsoft is working on getting their Windows C++ version up to speed. It has nothing to do with Nintendo.
Re:Minecraft arrives on the Nintendo Switch by webkike on Friday May 12, 2017 @11:52AM (#14325049)
GC is the killer of hard real time constraints
Re:Minecraft arrives on the Nintendo Switch by BoorishBears on Friday May 12, 2017 @11:57AM (#14325087)
GC doesn't kill constraints for games. Unity3D games have been dealing with the GC for ages now, it's not that bad. Cautious use of memory allocations and calling the GC at convenient times go a long way. But on the other hand Java doesn't have value types, which is pretty terrible.
Re:Minecraft arrives on the Nintendo Switch by glenneroo on Friday May 12, 2017 @12:33PM (#14325425)
I can only speak for Kerbal Space Program, but Unity 5's GC causes stutters on many people's systems, regardless how much RAM is available. There is a wonderful plugin called MemGraph[0] which lets you view GC events and more importantly, to change the time and frequency of GC activation, which has almost completely alleviated stuttering on many systems (my own included).

[0]http://forum.kerbalspaceprogram.com/index.php?/topic/139128-...

Re:Minecraft arrives on the Nintendo Switch by BoorishBears on Friday May 12, 2017 @01:34PM (#14325963)
Working with the GC is definitely tricky, but I think it's a feature that works well for the majority of the games made with Unity and really only rears it's head in specific types of games of a specific size. Saying it kills realtime constraints for gaming is definitely a stretch. Open world games with no transitions for example, leave little room for natural GC calls, where as level based games can do things like call the GC at the start of each level and carefully budget allocations through out the level.
Re:Minecraft arrives on the Nintendo Switch by ferongr on Friday May 12, 2017 @02:04PM (#14326283)
The "majority" of games made in Unity are very constrained mechanically and developers have control over the complete experience.
Re:Minecraft arrives on the Nintendo Switch by Thaxll on Friday May 12, 2017 @12:05PM (#14325166)
Yes it kills it, there is no big AAA game running on Unity, try to do a Battlefield like game with a GC language where every ms count.
Re:Minecraft arrives on the Nintendo Switch by BoorishBears on Friday May 12, 2017 @01:30PM (#14325928)
That's actually exactly my point, "kills real time constraints" is very strong language, you end up having to look at AAA games the size of Battlefield to see where it falls short. Minecraft-like games with similar voxel rendering can, and have been, done in Unity. In fact on the internal Nintendo Wii U dev forums I recall a Minecraft-clone was deep in development in Unity, but I think a lack of demand on the platform killed it
Re:Minecraft arrives on the Nintendo Switch by ferongr on Friday May 12, 2017 @02:05PM (#14326292)
A "demo" (with all the limitations and corner-cutting that demos usually employ) is one thing, a complete product is a different beast.
Re:Minecraft arrives on the Nintendo Switch by vvanders on Friday May 12, 2017 @12:32PM (#14325413)
> Cautious use of memory allocations...

I believe you're arguing against a GC there.

Re:Minecraft arrives on the Nintendo Switch by webkike on Friday May 12, 2017 @01:20PM (#14325843)
"not that bad" is still something that "I don't want to deal with" when I'm making a game. Get rid of GC pauses and let me allocate memory.
Re:Minecraft arrives on the Nintendo Switch by BoorishBears on Friday May 12, 2017 @01:40PM (#14326029)
It's great that works for you, and there's plenty of ways to take that approach outside of Unity. Like anything technology there are trade offs, having a GC while minimizing allocations can save a lot of time and effort upfront. I see it as Python vs Java, or NoSQL vs SQL, or a host of other similar comparisons that rage on in programming.
Re:Minecraft arrives on the Nintendo Switch by devrandomguy on Friday May 12, 2017 @03:09PM (#14326919)
What memory management paradigm would you recommend, for an application like this? Let's say, a 1 hour game session generates ~100 GB of transient data, but only 100 MB is needed for what is currently within the camera's view at any one time. How do you keep track of which data is still important, and when do you release memory?
Re:Minecraft arrives on the Nintendo Switch by webkike on Friday May 12, 2017 @08:16PM (#14328931)
Probably spatial partitioning, although who knows. These things are suitable for theoretics. One must find the best solution.
Re:Minecraft arrives on the Nintendo Switch by pkulak on Friday May 12, 2017 @01:57PM (#14326212)
That's true, but no game is hard real time.
Re:Minecraft arrives on the Nintendo Switch by ungzd on Friday May 12, 2017 @12:03PM (#14325151)
Why then Minecraft works perfectly on PC (even worked perfectly in 2009)?
Re:Minecraft arrives on the Nintendo Switch by jamesgeck0 on Friday May 12, 2017 @02:12PM (#14326352)
Java Minecraft definitely used to have lots of issues with large worlds on my 2009 laptop. Low framerates with freezes every time a new region was loaded, even with draw distance on the lowest setting.
Re:Minecraft arrives on the Nintendo Switch by skybrian on Friday May 12, 2017 @01:38PM (#14326008)
On my Mac back when I used to play a couple years ago, I saw random slowdowns. I tried various voodoo Java VM parameter tweaking and it didn't entirely fix it. Based on my searches I'm not alone.

Maybe it worked perfectly on your boxes, but there's something rather fragile and machine-dependent about Minecraft performance.

Re:Minecraft arrives on the Nintendo Switch by PhasmaFelis on Friday May 12, 2017 @02:12PM (#14326350)
It certainly didn't work perfectly in 2009. I had to turn off transparent blocks and greatly reduce the draw distance to get decent framerates on my laptop at the time. Maybe you had a better PC then I did. Java Minecraft still requires at least 10x more processing power than it would in a more suitable language.
Re:Minecraft arrives on the Nintendo Switch by khedoros1 on Friday May 12, 2017 @06:38PM (#14328501)
Did you ever look at the framerate graph and see the stutter caused by GC? Every time the "allocated memory" counter jumps down, you've got a few frames worth of pause in the graphics, and a big red latency line in the graph.
Re:Minecraft arrives on the Nintendo Switch by webkike on Friday May 12, 2017 @01:19PM (#14325826)
I personally never checked the fps when playing Minecraft but Minecraft was not extremely computationally intensive. Despite that they still needed to port it to a non GC language to get it running on phones
Re:Minecraft arrives on the Nintendo Switch by favorited on Friday May 12, 2017 @05:31PM (#14328110)
Beyond just getting it running on phones, C++ is the industry standard for cross-platform games.
Re:Minecraft arrives on the Nintendo Switch by tdb7893 on Friday May 12, 2017 @12:09PM (#14325202)
Is there a jvm for the switch?