1

Why java?

hornetjumper's Avatar hornetjumper8/14/13 2:22 am
1 emeralds 1.1k 9
8/14/2013 3:56 am
MemoryLeak21's Avatar MemoryLeak21
Most of us all know minecraft runs on java, but why? They aren't many other games that run/support java at all. That's why the aspect of minecraft is so limited. They're are only so much you can do with Javascript. Please, take a look at other popular games and tell me they run through java, most of them do not. I'm not sure if this would be possible, but minecraft should switch to another program. But like I said, minecraft was developed in java, so that may not be possible.
Tell me what your guys thoughts are.
Posted by hornetjumper's Avatar
hornetjumper
Level 7 : Apprentice Ranger
1

Create an account or sign in to comment.

9

1
08/14/2013 3:55 am
Level 84 : Elite Programmer
Arcaniax
Arcaniax's Avatar
confused
1
08/14/2013 3:48 am
Level 35 : Artisan Architect
xer0
xer0's Avatar
Okay, you seem a bit misguided about these technologies, let's see if I can bring you up-to-speed in a clear and concise manner.
Java is an interpreted (meaning it's converted to machine language as it's being used, not prior, like other languages such as C/C++) programming language that runs off of a virtual machine. This makes Java inherently slower than the other languages, for reasons you'll come to understand later on in this reply. The Java Virtual Machine (JVM) is (simply put) a piece of software that converts Java code to native machine code, and executes it. This allows Java to run on all the platforms that support the machine's architecture (currently 6+ BILLION devices are compatible with the JVM.) This means that if I write an Java application on my Windows computer, I can run it on my Linux computer, and even my Macintosh, whenever I wish, without editing the code base. If i used C/C++ or any other native language (must be compiled for each device architecture that I wish to run it on), then I'd have to write a Windows version that supports Windows GUI APi's (Application Programming Interface), then I'd have to write a version for Macintosh that supports its GUI API, (The Cocoa framework) and then I'd have to write another version for Linux/Unix systems that support THEIR GUI APi's (Qt and GTK). All this could take weeks, and if Notch had written Minecraft this way, it could takes weeks or months just to get the Mac version of 1.6.2 after it was released for Windows.

Next up, Java and JavaScript are NOT the same language.
Java is a byte-code interpreted language running on a virtual machine
JavaSCRIPT is a client-side scripting language for the World Wide Web (and more recently, Windows 8 Apps, and some other platforms, as well.)

Lastly, Notch wrote Minecraft in Java because he is very familiar with the language. He had no idea that the game would end up generating millions in revenue,while gathering a cult-following, and becoming the most successful Indie game ever developed. And besides, even if he did, he would still have chosen Java for it's ease-of-use, portability, and the fact that with current processing power, only the really low-end machines would even have a problem with performance.
1
08/14/2013 3:56 am
Level 11 : Journeyman Blacksmith
MemoryLeak21
MemoryLeak21's Avatar
1
08/14/2013 3:36 am
Level 40 : Master Pixel Painter
insomniac_lemon
insomniac_lemon's Avatar
Java =/= Javascript.

Minecraft was started and is still being developed in Java.

There's also no real reason to re-write/port the PC version of Minecraft to another language, because any "speed issues" are there because of poorly-written and un-optimized code (one of the reasons performance changes dramatically even between post-release versions), using another language would not help much, if at all (in fact, might be worse if Mojang tries developing for a language they are inexperienced with).

Not only that: Minecraft is cross platform. It works on any desktop OS that can run Java, and without much need for more effort besides OS-specific issues (mostly with OS X from what I've seen). It would be hard to replicate this in a language that is fast, not to mention most people even recommending not using Java would say just to develop it in C, which would result in Mojang either only supporting Windows, using some crappy port, or needing to make specific clients for each OS. Maybe they could use GIT somehow, but I still doubt it would be better than now.


Anyways: there's no real reason, Minecraft just needs more work and speeding up, it's not Java's fault. Java is better than it once was and is still getting better. Switching languages at this point does not make sense at all, would take more work than fixing Minecraft now, and is a whole other project in itself. If you want it in another language, try MC:PE or MC360 instead (hint: they're pretty much in "beta" mode like what the PC version had).
1
08/14/2013 3:31 am
Level 23 : Expert Taco
SplatMC
SplatMC's Avatar
Javascript and Java are two totally different things.
Java is a game programming language.
Javascript is a web coding language.
1
08/14/2013 3:26 am
Level 33 : Artisan Narwhal
Gnarusly
Gnarusly's Avatar
hornetjumperThere are only so much you can do with Javascript.


That's interesting. Might've been a valid point, except that Minecraft isn't coded in Javascript.
1
08/14/2013 2:37 am
Level 40 : Master Cake
aman207
aman207's Avatar
It is going to take forever to port to another programming language. So that isn't going to happen.
1
08/14/2013 2:34 am
Level 52 : Grandmaster Modder
MadeBySix
MadeBySix's Avatar
Yeah, I think you're mistaken about a few things. There are plenty of popular games running java, Runescape being a prime example, and Java is certainly not limited. On the contrary, Java is an incredibly powerful language. The issues with Java are not what it is capable of, it is its technical limitations.

As for why, it's because Notch likes making things in Java. Everything he does is Java. Clearly it's just his weapon of choice.
1
08/14/2013 2:32 am
Level 32 : Artisan Architect
Jdsgames
Jdsgames's Avatar
Runescape is run off java
and many popular games are
And it is one of the easiest coding scripts to learn and use
with the most features
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome