The performance difference between minecraft in java vs. minecraft in a C variant (or even python) in the age of TB hard drives, dual core GPUs 6 physical core CPUS and an average of 4-6GB of RAM, is null, and not worth the effort.
Java is fine, stop whining. If your computer on ANY OS struggles to run minecraft, even on fast/tiny, you need a new computer.
It is in java for two reasons
1. Java is what notch codes in
2. It is multi platform
And if they then tried to port it to c++ or vb all development would stop.
Your first point is exactly my opinion, if someone had spent there life coding in one language they are not going to be able to make a decent game in another language.
The performance difference between minecraft in java vs. minecraft in a C variant (or even python) in the age of TB hard drives, dual core GPUs 6 physical core CPUS and an average of 4-6GB of RAM, is null, and not worth the effort.
Java is fine, stop whining. If your computer on ANY OS struggles to run minecraft, even on fast/tiny, you need a new computer.
Damn i knew there was a faster way of saying it :tongue.gif:.
Case in point about python (which is MILES slower than even java) go and take a look at the Open Graphics Rendering Engine (OGRE).
OGRE in it's C++ form and pyOGRE it's python binding, run at almost identicle frame rates, despite pythons lack of speed.
To be fair though, python works best with short scripts, but yeah. The difference is not worth even noticing.
Now if Minecraft were to be a more complicated game, maybe changing the code would warrant looking into, but as of now and the near future, there is no reason to change.
Yet another person spouting information that's at least a few years out of date.
If you're referring to Vista, you're completely correct. But both XP and Win7 are extremely nice for working with.
None of them are even near as fast and lightweight as Linux. I recommended Ubuntu to one of my friends who has T4400, 4gb of RAM and the same GMA as me, who is running Windows 7. He noticed a huge improvement in performance, unmodded Minecraft on Win7/Ubuntu, FPS: 6-9/13-22. With Optimine: 9-13/20-32.
The fun part about comparing Windows to Linux is that people on Windows whinging about performance almost ALWAYS have malware or other bloatware installed, whereas that simply doesn't exist on linux. While this is a good thing, it also is directly related to the same fact that there is a large software hole on linux.
A clean windows install vs a clean linux install running the same thing (in this case minecraft) will only be different if the drivers are drastically different, and that's a hardware compatibility issue and completely unrelated to the OS itself. (My laptop running Fedora or Ubuntu can barely play full screen movies without the right codec, and barely with it. I can run 4 of them in Win 7)
To everyone who wants Notch to port the game to some other language: If you are such an expert on why Minecraft should or must be recoded into another language, implement it yourself.
Quote from Clairvoire »
Minecraft uses Java. This baffles me.
Java uses more system resources, and is universally less stable. (Remember how Notch permanently messed up some folk's Gamma settings on their video cards? I didn't even know Java could /do/ that).
A lot of folks will say it allows faster development time, but that's not true. Small games like this require 1 minute to compile from C++, at the max. And since the executable runs faster without the Java VM slowing it down, you don't have to spend countless days 'optimizing' algorithms, which is what Notch usually says he's doing more than half the time. Optimizing code in a beta game creates bugs. Lots of bugs. Big bugs. Which are hard to find. You don't optimize until the very last phase of development, but since Notch launched in Alpha, he's had to do just that, else the game be unplayable.
So in summery, the game suffers from numerous bugs, poor performance, slow development, and this can all be attributed to it using Java.
Maybe it's time Notch and Co. trade in Eclipse for Visual Studio?
No. If someone wants to try implementing this "small game" in C++ , that is his or her own call, but to ask Mojang to change the entire program would suspend development for weeks, if not months, while they port and stabilize all of the code, especially if they decide to keep it cross platform.
Even programs in C++ and machine code need to be optimized, and the process takes as many days in those languages, sometimes more, as it does in Java. Alpha and Beta are the phases for feature additions and code optimization, though -- it's a significant part of what those testing phases are for, along with finding and fixing bugs.
I also highly doubt your estimate of compile time for this game in C++. One minute at the most? Maybe for loading the game when players open it, but the compile time might be even longer than compiling the code in Java. Ever assembled a kernel patch for Linux? Ever compiled a "simple" tic-tac-toe program? When you compile a program your processor is churning away at the task, and not every compiler fully supports multi-core processors or multi-processor computers.
It might be forgivable for you to think it's very fast to compile all C++, though, if perhaps you've never written a complex program with dozens, or maybe hundreds, of source code files. I know that when I took my early classes, I was shocked to think how long games took to compile (according to developers), since all of my homework assignments only took a few seconds to compile.
Minecraft's bugs, poor performance, and slow development have nothing to do with Java. Well, possibly the poor performance may, in part, relate to Java, which can be demanding, but the rest all falls on rushed coding that works well enough to get out the door, even if it isn't perfect. The bugs will get fixed. The code should definitely get optimized. The development pace is fine. Notch and Jeb aren't coding the game 24 hours a day, seven days a week: they have lives outside of the office, and this is fine and welcome.
Please, if you want Minecraft ported to C++, find someone who is willing to work on it, and be willing to help with the development yourself. The same applies to all the others want it ported to C++ or VB.NET or C# or Python or Ruby or whatever language floats your boat.
To answer the thread title question: Minecraft is made with Java because Java is what Notch is comfortable building it in.
Just saying though, languages are only a tool. And some tools are better suited to some tasks. Minecraft needs performance. And not just for framerate, it's about being able to do more. Imagine, the algorithms Notch could use for... say, water. You could have something akin to the water and river algorithms in Dwarf Fortress. Draining whole oceans. rivers coming down mountainsides. That's the kind of stuff he could do, without worrying about them taxing the cpu to the point of making the game unplayable.
Dwarf fortress? As awesome as that game is, I don't think the entire game freezing for 10 minutes while the ocean drains through a hole in the floor would be appreciated by most minecrafters.
Quote from Clairvoire »
Yeah, it's a 128x64x64 blocks per chunk, and there's 25 or so chunks at a time. That's about 13 million blocks, and every block is about, at most, 2 bytes, with only one byte really needed to be read unless it's an 'active' block like falling water or farmland. C++ compiled code on a weaksauce emachines 1.8 ghz computer can iterate over 13 million bytes in about .5 seconds. It takes java almost a minute to do just that.
Java is fine, stop whining. If your computer on ANY OS struggles to run minecraft, even on fast/tiny, you need a new computer.
Your first point is exactly my opinion, if someone had spent there life coding in one language they are not going to be able to make a decent game in another language.
To be fair though, python works best with short scripts, but yeah. The difference is not worth even noticing.
Now if Minecraft were to be a more complicated game, maybe changing the code would warrant looking into, but as of now and the near future, there is no reason to change.
The fun part about comparing Windows to Linux is that people on Windows whinging about performance almost ALWAYS have malware or other bloatware installed, whereas that simply doesn't exist on linux. While this is a good thing, it also is directly related to the same fact that there is a large software hole on linux.
A clean windows install vs a clean linux install running the same thing (in this case minecraft) will only be different if the drivers are drastically different, and that's a hardware compatibility issue and completely unrelated to the OS itself. (My laptop running Fedora or Ubuntu can barely play full screen movies without the right codec, and barely with it. I can run 4 of them in Win 7)
To everyone who wants Notch to port the game to some other language: If you are such an expert on why Minecraft should or must be recoded into another language, implement it yourself.
No. If someone wants to try implementing this "small game" in C++ , that is his or her own call, but to ask Mojang to change the entire program would suspend development for weeks, if not months, while they port and stabilize all of the code, especially if they decide to keep it cross platform.
Even programs in C++ and machine code need to be optimized, and the process takes as many days in those languages, sometimes more, as it does in Java. Alpha and Beta are the phases for feature additions and code optimization, though -- it's a significant part of what those testing phases are for, along with finding and fixing bugs.
I also highly doubt your estimate of compile time for this game in C++. One minute at the most? Maybe for loading the game when players open it, but the compile time might be even longer than compiling the code in Java. Ever assembled a kernel patch for Linux? Ever compiled a "simple" tic-tac-toe program? When you compile a program your processor is churning away at the task, and not every compiler fully supports multi-core processors or multi-processor computers.
It might be forgivable for you to think it's very fast to compile all C++, though, if perhaps you've never written a complex program with dozens, or maybe hundreds, of source code files. I know that when I took my early classes, I was shocked to think how long games took to compile (according to developers), since all of my homework assignments only took a few seconds to compile.
Minecraft's bugs, poor performance, and slow development have nothing to do with Java. Well, possibly the poor performance may, in part, relate to Java, which can be demanding, but the rest all falls on rushed coding that works well enough to get out the door, even if it isn't perfect. The bugs will get fixed. The code should definitely get optimized. The development pace is fine. Notch and Jeb aren't coding the game 24 hours a day, seven days a week: they have lives outside of the office, and this is fine and welcome.
Please, if you want Minecraft ported to C++, find someone who is willing to work on it, and be willing to help with the development yourself. The same applies to all the others want it ported to C++ or VB.NET or C# or Python or Ruby or whatever language floats your boat.
To answer the thread title question: Minecraft is made with Java because Java is what Notch is comfortable building it in.
Dwarf fortress? As awesome as that game is, I don't think the entire game freezing for 10 minutes while the ocean drains through a hole in the floor would be appreciated by most minecrafters.
It takes Java about 4ms to do that on my desktop.