I'm looking to create a game in Java and would like it to work on Windows, Linux, and Mac. I'm pretty sure C# is a bad choice for this, and I don't have enough experience in C or C++. I want to stay away from Flash. Therefore, is Java a good choice for me? Mostly, I use C#, and think that Java is similar, so I assume it won't be that hard to learn. But is it fast enough? Is there a language more suited for my needs than Java?
Java is extremely suitable for writing cross-platform games. Main advantages:
The main decision you will have to take is what GUI framework you are going to use. There are quite a few different options but the most prominent ones are:
The main disadvantages for Java for gaming are really around the "edge cases" that probably won't affect you but are relevant for some classes of game:
Note that there are also a few deployment options to consider:
Finally, it's also worth considering some of the other JVM languages - these have all the benefits of the Java platform listed above, but some consider them to be better languages than Java itself. Scala, Clojure and Groovy would be the most prominent ones, and they can all make use of the Java tools and libraries listed above.
|show 3 more comments|
Minecraft and Blocks that Matter are both built in Java, so yes it's plenty good for making games. The main issue you're going to run into while using Java is porting to mobile platforms if you choose to go that route and write a native app. Android is a kind of frankensteined Java SE with a separate library. RIM's Blackberry uses Java ME. iOS can in theory be programmed with Java though Objective-C would likely be a better choice for that platform.
Java is quite similar to C#. I often find C# code understandable despite only knowing Java. They do have a different design philosophy but as far as being widely deployable with minimal hassle both fit the bill. C# isn't a terrible choice for games by any stretch either though your mobile deployment will be harder and deploying to non-windows platforms will be more time consuming or difficult depending on what specific external libraries and so forth you wind up using.
Advantage :- You will need zero configuration for making your game run on various platforms and devices.
NOTE:- I have seen few games that are build using the above said technologies but they were smaller in stature. But, I suppose if one can make butter out of milk then cheese is not impossible
With Pattern Design and UML2, you can also secure code with OCL, all is in Topcased.org .
Mastering those tools take time, but they are the Java's background, the base which will push you at the top.
Short answer: no.
Java do not generates a binary executable but only bytecode as C# does ( CLI ), and this is not a good thing for serious business in "opened environments" for two main reasons:
Of course every language has its own libraries but due to the great amount of them for each and every language this is not a real problem and i don't think is the purpose of this topic.
Maybe at a professional level you can find something that can break the rule like a dev-Kit that can translate all C# statements into assembly code for a real world machine, but if this kind of approach it's not in the cards you are pratically forced to consider only the C and the C++ for your development when you aim to sell your product in an open environment.
The things are a little bit different for the mobile devices because they are "closed environment" even Android is pratically closed considering the fact that the source of the real world ROMs are not usually available to the public, Android may be considered opensource but the 99% of the ROMs on actuals devices aren't. In this cases you can't argue too much, everything is already set for you and every platform has its own language like everybody knows.
In the end if you are going to sell this products in an opened environments i can only suggest languages that can produce compiled and binary/assembly code, in closed environments the decision is tipically more easy to do for different reasons.
|show 12 more comments|