News for hackers. Stuff that matters.
Re:Microsoft's forthcoming Minecraft Education Edition is wr... by pnathan on Tuesday January 26, 2016 @01:28PM (#10974953)
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.
Re:Microsoft's forthcoming Minecraft Education Edition is wr... by Macha on Tuesday January 26, 2016 @01:36PM (#10975004)
It was a one-man hobby project turned into one of the biggest video games. I doubt many codebases would work well after growing so far past their original aspirations.
Re:Microsoft's forthcoming Minecraft Education Edition is wr... by TazeTSchnitzel on Tuesday January 26, 2016 @08:57PM (#10977707)
It was never well-written, though. It was good enough to work, but it was never good code.
Re:Microsoft's forthcoming Minecraft Education Edition is wr... by JustSomeNobody on Wednesday January 27, 2016 @01:20AM (#10978566)
But it got the job done. That means way more than whether he used a factory or not.
Re:Microsoft's forthcoming Minecraft Education Edition is wr... by squeaky-clean on Tuesday January 26, 2016 @04:09PM (#10976093)
I remember when I played it, there were many mods that optimized the game, usually offering over a 10x speedup with no noticeable difference in graphics or detail.

I definitely think that most of the speed increase is coming from the fact that Minecraft is being rewritten, and not which language it's being rewritten in.

Re:Microsoft's forthcoming Minecraft Education Edition is wr... by looki on Tuesday January 26, 2016 @01:35PM (#10974990)
I remember reading a blog post where somebody talked about how they severely decreased Minecraft's performance after refactoring and replacing function calls with separate X, Y and Z parameters to using a single Position object, which would of course in many instances have to be allocated on the fly. I can't seem to find it anymore, though.
Re:Microsoft's forthcoming Minecraft Education Edition is wr... by wtallis on Tuesday January 26, 2016 @03:53PM (#10975971)
Yes, something that should have at a minimum caused no harm to performance (and possibly helped, such as by allowing for SIMD) and been a win for code readability instead introduced an extra layer of pointer chasing and heap allocation, because Java doesn't have structs. See https://news.ycombinator.com/item?id=8485180
Re:Microsoft's forthcoming Minecraft Education Edition is wr... by mike_hearn on Wednesday January 27, 2016 @10:04AM (#10980312)
Indeed. They are adding value types though. It'll take years but once done, this kind of problem shouldn't crop up again. They've also been doing work on better escape analysis.

The JVM can do a lot of optimisations C++ apps don't benefit from, but I think the loss from not having value types more than drowns them out.

Re:Microsoft's forthcoming Minecraft Education Edition is wr... by looki on Wednesday January 27, 2016 @10:51AM (#10980652)
That's the one, thank you.
Re:Microsoft's forthcoming Minecraft Education Edition is wr... by JustSomeNobody on Wednesday January 27, 2016 @01:18AM (#10978561)
Sometimes you just have to get things done. The world probably wouldn't have Minecraft if the author had worried about "the proper way to architecture java code" that he read on some ranty blog somewhere.
Re:Microsoft's forthcoming Minecraft Education Edition is wr... by Teckla on Tuesday January 26, 2016 @04:53PM (#10976426)
Version 1.0 is always more sloppy than version 2.0, because with version 2.0, you have the luxury of 20/20 hindsight.