Somewhat related to Is Java viable for serious game development?

I have decided to make a browser based mmo game. But the only programming language I know is Java.

So I would like to know how good is java as language for browser based game development especially in terms of performance and speed compared to popular languages like PHP ? Is there any studies on this subject based on performance and speed of programming languages on browser based games ?

  • 1
    \$\begingroup\$ Are you talking about using Java on the server side only and use HTML/JavaScript for the client-side? \$\endgroup\$ – msell Jun 12 '13 at 18:00
  • 4
    \$\begingroup\$ Hi there. These kinds of highly subjective and "which tech" to use questions are considered inappropriate for GDSE, see the FAQ page. \$\endgroup\$ – Sean Middleditch Jun 12 '13 at 18:07
  • 1
    \$\begingroup\$ A Browser based game is more similar to a web app than a real-time game. Go with what language you personally like to program in, since Java and PHP are both mature, tested technology stacks that are perfectly capable of serving websites like Ebay(Java) or Facebook(PHP) with thousands of times more volume than you're likely to face. If you have performance issues, it will not be because of the language you chose. \$\endgroup\$ – Jimmy Jun 12 '13 at 18:30
  • 1
    \$\begingroup\$ From the comment about comparing to PHP it sounds like you mean Java for the server side component of your game. That is a completely different matter from the client side of the game, so you should specify what you mean. \$\endgroup\$ – jhocking Jun 12 '13 at 19:12
  • 1
    \$\begingroup\$ I mean, this question is a bad fit here anyway because "which tech to use", but you should specify that in (better) future questions. \$\endgroup\$ – jhocking Jun 12 '13 at 19:15

There is one thing that bothered me about your question:

"..But the only programming language I know is Java."

So learn another one!

Anyway, Java as a client in the browser fails on many, many fronts.

For one, Java 7 (and most likely Java 8) doesn't even work in Chrome on Mac OS X because the Java people decided to stop supporting 32-bit, and Chrome is a 32-bit browser. To me this speaks volumes about Sun/Oracle's attitude towards supporting "every system" like they have claimed in the past. So right off the bat you have these compatibility problems with Macs and older systems, requiring workaround. So much for "write once, run anywhere".

I really think you're better off either building a native client, or using HTML 5 (if it will be a simple browser-based game) or using Flash instead. Flash is much more proven as a multiplatform, in-browser tech that works. Realm of the Mad God was programmed using Flash, as well as oodles of newgrounds entries.

Here's to not seeing that godforsaken java cup on any new games

enter image description here

  • \$\begingroup\$ There are lots of reasons why java is the perfect Language to build the Backend for a browser based MMO. But you are right you should never ever try to do anything whith java-applets anywhere. \$\endgroup\$ – HaBaLeS Nov 7 '13 at 16:36

There are no good or bad programming languages. You can program the same thing in any turing-complete language. It is more about your personal feelings. If you like the syntax, if you like existing compilers / interpreters / SDKs etc.

For me: I don't like Java syntax, I don't like Eclipse, I don't like Java VM from Oracle, I don't like Oracle's attitude to Java, so the answer is NO! :)

  • \$\begingroup\$ You should choose the right tool for the right problem. There are trade-offs that are made because of the language choice. Comparing languages based on turing completeness is only relevant if you don't care about space and time complexities. \$\endgroup\$ – David Young Jun 12 '13 at 19:25
  • \$\begingroup\$ Actually, I know people who write some common algorithms in "exotic" languages much faster, than me in Java. Time and memory complexity is not dependent on language. And if by "time" you mean the real time of code execution, it is not the problem of language, but of compiler / interpreter / SDK. But I think OP really does not want to know that :-D \$\endgroup\$ – Ivan Kuckir Jun 12 '13 at 23:16

Not the answer you're looking for? Browse other questions tagged or ask your own question.