Is Java the right way for me to go?

I’m only a young programmer, and Java is the first language I have encountered (I am now one year in and relatively proficient), yet that hasn’t stopped me from being ambitious! I am tired of sitting around dealing with toy problems, making silly applications in both the console and in graphics which take me no where. I’ve decided I want to plunge into the deep end of the pool, seeing as that’s the way I find I learn best as an individual. Therefore I’ve spent a long time rigorously designing an online (browser based) social MMO game.

This project is going to sap a whole lot of my time, and I would love to go ahead with it, yet this worries me, seeing as it will not be much more than a year before I head to university, and I do not want to lead myself down a rabbit hole if Java won’t provide me with the tools I require (I will not be able to learn another language over this year). From what I have gathered from my research and experience in the language, Java’s diversity, high-level complexity, power, object oriented nature and class libraries such as LWGL (which I don’t know how to use) will perfectly set me up for a project such as this. However, there is too much questioning these days as to how powerful Java is compared to other industrial standard game scripting languages such as C++, many seem to disregard it out of what is almost concern over it’s true power, and this seems unlikely to be resolved in the near future seeing as people seem settled in their ways.

Any thoughts out there? ???

Regards, K.

Start with good game. Then create small multiplayer game. After that repeat process about 5 years and then you realize that MMO:s are hard. Not only coding but also content creation. Java isn’t the show stopper the first M at word MMO is. Massive means bigger that big its not something that you can pull of without good experience.

Java is great for doing almoust everyhing but MMO are not something that one man can do.(minecraft isn’t MMO)

I found that online things always require networking-code (surpise?) that is horrible always! :cranky:
Especially when doing servers for games where lots of players needs to connect and play. It’s nowhere near as fun as you might think, because the content creation is… not really happening alot! I’m having a lot better time when making something that’s completely single-player, and I only have to worry about gameplay and content, and nothing else.

When you read the arguments about C++ vs. Java for games, etc, it is mostly a religious war. Java has the downside of not being available on consoles, which gets some people to choose C#. For AAA games that demand 99% of a system, most developers want to have exact control over what is happening (and may very well need it if they are good at their jobs). Then all the other C++ fanboys think that to make a game you need to use C++ even though they don’t have the resources to make the content that will strain anyone’s machine.

If you hadn’t noticed, I’m definitely on the side of Java. There are a lot of unfounded or stale arguments to not use, a lot of recent fears about its direction that I personally don’t care about because it’s all politics. Java gives you the best performance with some of the best libraries (built-in and open source), with easily the best development tools so I think its a win, especially for someone with a year of experience.

Programming is so much more than syntax and writing code. By learning the thinking of a programmer you’re learning to be a programmer, no matter what language you use. Don’t think that you’re stuck with Java for all eternity, as you will be able to learn other languages a LOT easier if you know Java.
I agree with Ihkbob on all his points. Performance is obviously important, but Java is easier for newbies as well as pros. Like Notch, the creator of Minecraft said, you will be more productive compared to C++ and that will keep you motivated by the results and you will… well, be more productive. xd
I’ve been using Java for 6-7 years now I think. Basically thought myself with game programming books. I breezed through my high school class in Java, and impressed my C++ teacher a lot. In the last year of high school I took an university class for C. I’ll never forget that teacher’s statement: “C is so fast compared to Java that you don’t have to have a fast solution.” We were talking pathfinding. What the hell?! A good (fast) solution to a problem in Java is gonna beat a bad, slow solution in C any day. Use Java, learn how to solve problems better than the C/C++ guys and prove them wrong.

the Server JVM is even faster after warmup than C++ code in many instances.
Speed argument come from Java 1.0-1.2 times.
Today Java and C++ have technically equal speed.

I can hardly think of any reason to use C++ anymore. The only reason its still gaming industry standard is that standards are just so hard to break.
Same reason why windows OS’ and microsoft IE’s are still used so much: old old standards, used ofr a long time now; change is difficult =P

Obviously, please don’t start with a MMORPG.

I’m all for ambition and dislike minigames most of the time; just try a decent RPG first then.

Useful and interesting post:
http://www.java-gaming.org/index.php/topic,24411.msg205121.html#msg205121

And FWIW, please please PLEASE (please?) don’t start with an MMO as your first big online project.

Consoles are still big reason also.

i started what is basically a space invaders clone at the beginning of the year… still not done…Given i didn’t work on it constantly but i got stuck for weeks on stupid stuff too.

Anyway, i get the wanting to be ambitious, but it’s pretty nice having a finished project to show off too. And when you finish your game you can force all your friends and family to sit down and play it. so that’s always fun.

You’ve all pretty much reassured me that Java is the right way to go! Maybe I shouldn’t have addressed it as an MMO, it will start off as merely a 6 player lobby game, so i think I’ll forget the future plans currently as that certainly is too ambitious. However it is merely a 2D platformer, employing networking, so I think although slightly ambitious, it’s probably suitable consider the fact I have already made an asteroids/pong clone, a basic platformer and physics simulation program using a spring based engine. Yet if I am looking to create a 2D game, is it recommended I look into libraries such as LWJGL or JOGL? I understand there is debate over which is “best”, and I think LWJGL would be the way to go for me, however they seem to be geared towards 3D games?

Thanks again, K.

For the best performance use LWJGL. However it’s much easier to use a game engine like Slick which is based on LWJGL. That way you get a lot better performance compared to Java2D and you won’t have to mess so much directly with OpenGL, which as you said is primarily meant for 3D graphics. The main reason would as I said be performance. OpenGL is in some cases several hundred times faster than Java2D, even with the small overhead of a game engine.
I haven’t personally used Slick though, so I don’t know if it supports networking and physics etc, but I would be surprised if it didn’t…

Just use use libgdx or slick2d. There is very little reasons to not to use for 2d game.

  • Go with slick2d or libGDX (if you want an Android option in the end)
  • Make this a solid single-player platformer first
  • Make some test applications for client-server communication
  • Stress-test and profile them. Generate > 50 clients and let them massively throw requests at the server and evaluate the results for correctness, consistent response times and ensure that the server is free of deadlocks and can handle concurrent modifications of your gameworld.
  • Add the network code to the platformer, but be aware that this might require some major rewrites

@OP:
I will be the devils advocate and ask you: what do you want to do?
If you want to focus on front-end development, you could go several different paths. C/C++, Java, Flash, etc.
Each has it’s merits and pros/cons.

For back-end development, imho you should go for Java.

Oh and one final word, don’t think that choosing one over the other will limit you. One of the most valuable assets for any good programmer is the ability to dig into anything.
Once you can expand your horizons, you can pick up any language or tool-set and use it.
The biggest problem many beginners have is the first step barrier (doing this stuff for the first time). Once you have mounted that step, the rest come a lot easier, as they are often the same thing, just different.
Think of it like an instrument. Once you learned how to play one instrument, learning another or a different style of music becomes easier.

I lol’d, in a That-is-so-contradicting-but-I-know-exactly-what-you-mean-way. Your last sentence is a perfect comparison.

Hi

I would rather write “For the best performance, use any reliable Java binding(s) of OpenGL(-ES)” as the performances of both LWJGL and JogAmp (JOGL, JOCL, JOAL) are quite very close.

Kappers, I’m happy to see that you realize that it is too early to start developping a MMO. Rather start a much more rudimentary project, for example an offline 2D platformer. After that, maybe you will be able to add an online mode. Do it step by step. If you try to do too much things without having even a working blue print, you will get discouraged.

[quote=""]
If you mean ‘browser based’ as in ‘HTML + CSS’, then Java is an excellent choice to use for server-side programming. It is used heavily for building large websites, and I’m even thinking of switching to it myself for my own web development.

However if you mean in regards to applets, I would strongly urge you to use something else! Applets have tonnes of issues, and drawbacks, which will probably never be solved. They are blocked in Chrome, not supported on the iPhone, iPad and Android devices, take a very long time to start up, typically freeze the browser during start up (which gives a bad feel), have odd rendering bugs when scrolling the page and during start up (which looks sloppy), have various bugs in browsers on Mac OS, and can notoriously get caching wrong on random occasions (which will cause your applet to crash). Browser games are also moving away from plug-ins; Flash is pretty much the only one able to survive this due to it’s epic amount of usage.

Applets were ahead of their time, 15 years ago. Since then they have (mostly) remained unchanged, leaving them with a buggy and out-dated experience.

[quote=“Kappers,post:1,topic:37082”]
It is not that people question Java as a language, or the speed, it is that they mainly question the ecosystem for building games around Java. Compared to C++, C# or JavaScript; it is microscopic. There are very few Java game communities online, and most are based around Java ME (the mobile version).

Personally I would recommend using Java for the server, and HTML/CSS/JavaScript for the front end. You could also take a look at the excellent GWT, which would allow you to write the whole of the client and server in Java, as one big app (the front-end is compiled into HTML/CSS/JavaScript). If your project fails, then at least you will have lots of website building experience, which is far more valuable then Java game writing experience. For 3D you can also use WebGL with JavaScript, or the new 3D support in Flash (I think it’s still in beta).

Contrary to what others say, I see no issue with your first project being an MMO, and the complexity depends on what sort of MMO. If you making the next World of Warcraft, or just something as big as Ragnarok Online, then it will take you years and years. But if you are building one which would be mostly static, then it is possible to have it built within 6 months. I’d aim for the latter, so you have the core game built quickly, and then add more interactive components in the future.

It’s also a matter of what you plan to do with the technology you learn later on. You want to make a game now, is that a stepping stone to something else (motivation to learn?), or do you aim to work as a game developer? Do you plan to work with web technology, server technology, gui design&development ?

For most options, Java is a safe bet. It’s a language that you will benefit from learning in most scenarios. It doesn’t have the cleanest API, it doesn’t have the most modern language features, - hell GUI design in Java sucks, but it so well-adopted to the point that google will help you solve most problems you face. It’s also very similar in many ways to C#, which in many business scenarios is the “other side of the coin” in technology choice. Transition from Java to C# is luckily easy.

If I was to learn my first language now, it would definitely be either Java or C#. Business value, vast knowledge-base, both languages let you do “everything”. There are tons of other languages that I’d die to have time to learn well, but there are few others that I can see that I would use for everyday problems.

Given that C# has far more game libraries, frameworks, tutorials, communities, support from big companies for game development (namely Microsoft), and even an app store which anyone can publish to (XBox Live Indie Games channel); I think it easily out performs Java as a choice for game development.

The languages themselves are just a minor detail.

Like, how many game libraries do you need? Java + LWJGL + Slick is better than XNA I’d say by quite a long shot, and it gets you all the desktop platforms in one go.
XNA is also not quite as portable between XBox and desktop as you might think: the VM on XBox is almost hilariously slow, slower than the slowest Java 1.1 incarnations from over a decade ago - you can kiss goodbye to OOP, using interfaces, getters, setters, polymorphism, etc. if you want reasonable performance.

Cas :slight_smile: