Jump to content

  • Log In with Google      Sign In   
  • Create Account


How powerful is Java?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
48 replies to this topic

#1 Dahamonnah   Members   -  Reputation: 171

Like
0Likes
Like

Posted 02 November 2012 - 11:48 AM

Hi, I'm just wondering about the power of Java compared to other languages (in game development), I'm just starting out on Java and I wanna know how powerful is it and what kind of games it's capable of running.

Thank you.
- Manny.

Sponsor:

#2 Arthur Souza   Members   -  Reputation: 1416

Like
0Likes
Like

Posted 02 November 2012 - 12:04 PM

"what kind of games it's capable of running."

Anything. Really, anything.

Most language differences are regarding things that only affect the process of development. The final result will be possible with the use of most of the tools.

Edited by Arthur Souza, 02 November 2012 - 12:06 PM.

A.

Lotus - Action RPG In development http://www.gamedev.n...die-rpg-engine/ |
Personal blog In Portuguese: lotuzgames.wordpress.com |


#3 Alpha_ProgDes   Crossbones+   -  Reputation: 4680

Like
5Likes
Like

Posted 02 November 2012 - 12:17 PM

It's capable of running any game that .NET, C#, or XNA can run.
  • Games you see on tablets. It can do that.
  • Games you see on the Nintendo 3DS. It can do that.
  • Games you see on the PSP and Vita. It can do that.
  • Games that have been made using XNA (Zune, Windows Phone 7.5, and Xbox360). It can do that.
  • Games of the last generation (PS2, Xbox, Gamecube, Wii). It can do that.

Edited by Alpha_ProgDes, 02 November 2012 - 05:55 PM.

Beginner in Game Development? Read here.
 
Super Mario Bros clone tutorial written in XNA 4.0 [MonoGame, ANX, and MonoXNA] by Scott Haley
 
If you have found any of the posts helpful, please show your appreciation by clicking the up arrow on those posts Posted Image
 
Spoiler

#4 ic0de   Members   -  Reputation: 808

Like
0Likes
Like

Posted 02 November 2012 - 12:29 PM

There is nothing technically limiting about the language of Java, there are a few minor annoyances such as the lack of operator overloading but its not a huge issue. However the implementation of java will almost always be in a virtual machine so you can expect some performance penalty.

Edited by ic0de, 02 November 2012 - 12:29 PM.

you know you program too much when you start ending sentences with semicolons;


#5 vladmihail   Members   -  Reputation: 310

Like
-5Likes
Like

Posted 02 November 2012 - 01:49 PM

-_-

Edited by vladmihail, 19 November 2012 - 11:35 AM.


#6 Lauris Kaplinski   Members   -  Reputation: 841

Like
7Likes
Like

Posted 02 November 2012 - 02:21 PM

I'd suggest to play Minecraft and decide for yourself Posted Image

But seriously - I very much doubt that you as a hobbyist/independent developer will ever reach a point where Java is not fast or powerful enough for your game. The only place where I can see Java (and other garbage-collected languages) become problematic is console development with very limited memory.

Edited by Lauris Kaplinski, 02 November 2012 - 02:22 PM.

Lauris Kaplinski

First technology demo of my game Shinya is out: http://lauris.kaplinski.com/shinya
Khayyam 3D - a freeware poser and scene builder application: http://khayyam.kaplinski.com/

#7 slayemin   Members   -  Reputation: 2049

Like
0Likes
Like

Posted 02 November 2012 - 03:11 PM

Check out Wakfu. It's written entirely in Java. Their game can run on any platform which supports the Java Virtual Machine. (Dunno about mobile phones though). Although I use C# myself, Java would be my second language of choice.

Eric Nevala

Currently a self-employed indie game dev


#8 Dahamonnah   Members   -  Reputation: 171

Like
0Likes
Like

Posted 02 November 2012 - 05:16 PM

Thank you all for your help and support. :)

- Manny.

#9 Tebriel   Members   -  Reputation: 411

Like
2Likes
Like

Posted 02 November 2012 - 05:31 PM

I wouldn't say the JVM (Java Virtual Machine) is a particular weakness for Java. If Java has a weakness it'd probably be related to OS or hardware integration--it is a bit detached from the lower level access that C++ has. Although, modern libs have significantly mitigated that detachment.
For non-professional game development this isn't really a factor IMO.

In fact I think Java is a better candidate (than C++) for a casual development team. I used C++ for years, but throwing away the productivity Java brings to the table just because "games are supposed to be done in C++" is just asking to make things more difficult for yourself, unless you have a large team and quite a bit of money & time.
I'd have to have a very good reason to use C++ over Java. Game dev used to be one of those, but not anymore.

Edited by Tebriel, 02 November 2012 - 05:31 PM.


#10 SimonForsman   Crossbones+   -  Reputation: 5770

Like
0Likes
Like

Posted 02 November 2012 - 06:23 PM

It's capable of running any game that .NET, C#, or XNA can run.

  • Games you see on tablets. It can do that.
  • Games you see on the Nintendo 3DS. It can do that.
  • Games you see on the PSP and Vita. It can do that.
  • Games that have been made using XNA (Zune, Windows Phone 7.5, and Xbox360). It can do that.
  • Games of the last generation (PS2, Xbox, Gamecube, Wii). It can do that.


You can add Games of the current console generation to that list as well (There are good native libraries for most performance critical tasks) The higher system requirements can reduce your customerbase quite a bit though.
I don't suffer from insanity, I'm enjoying every minute of it.
The voices in my head may not be real, but they have some good ideas!

#11 jbadams   Senior Staff   -  Reputation: 17247

Like
4Likes
Like

Posted 02 November 2012 - 06:56 PM

I shared some thoughts on this recently in a post titled "MYTH: Java not suitable for games". Some notable Java-based games include Minecraft, Runescape, Puzzle Pirates, Wurm Online, Spiral Knights, WAKFU, and Maker's Tale (still in development, but making great progress). Although it wouldn't be my personal choice of language -- I dislike some of the conventions and design decisions -- it's more than capable of creating good quality video-games, and the limiting factor (if there is any) will be your programming capabilities rather than any deficiency in the language or platform, and although slightly lower-level languages have their advantages you may even find the experience easier than using a language like C++ where you have to manually manage your memory.

Note that in those cases where the example games listed above -- or the example games for the engines and libraries listed below -- have simpler or more primitive looking art this is usually a stylistic choice or a result of cheaper/simpler art assets rather than a limitation of the language and platform. A lot of beginners fall into the (somewhat understandable) trap of thinking that because some of the games have what they consider to be poorer graphics that the language or engine must be to blame, but it's very rare that this is the case.

I think it's a good choice for anyone comfortable with the language, and there are some good library and engine choices available including jMonkeyEngine, lwjgl, and Slick, amongst others. The Android SDK is also in Java, and although they do also provide an "NDK" for C and C++ developers they state that "using native code on Android does not result in a noticeable performance improvement".


You can proceed and be happy with your choice of Java for games development.

Hope that helps! Posted Image

#12 TheChubu   Crossbones+   -  Reputation: 3705

Like
-3Likes
Like

Posted 02 November 2012 - 07:05 PM

EDIT: No lol around here it seems Posted Image

Edited by TheChubu, 05 November 2012 - 05:53 PM.

"I AM ZE EMPRAH OPENGL 3.3 THE CORE, I DEMAND FROM THEE ZE SHADERZ AND MATRIXEZ"

 

My journals: dustArtemis ECS framework and Making a Terrain Generator


#13 Telcontar   Members   -  Reputation: 864

Like
2Likes
Like

Posted 02 November 2012 - 10:03 PM

It is Turing-complete.

I Create Games to Help Tell Stories | Writing Blog


#14 alnite   Crossbones+   -  Reputation: 2052

Like
5Likes
Like

Posted 02 November 2012 - 11:46 PM

Over 9000

#15 jbadams   Senior Staff   -  Reputation: 17247

Like
1Likes
Like

Posted 03 November 2012 - 12:18 AM

It is Turing-complete.

So is brainfuck, but that doesn't make it suitable for games.


Please try to stay on-topic/helpful guys. Posted Image

#16 shadowomf   Members   -  Reputation: 315

Like
-2Likes
Like

Posted 03 November 2012 - 01:06 AM

If you want 2D or targeting mobile platforms it's probably okay, for 3d I can't recommend it.
I tried various OpenGL bindings and on some PC's it starts to stutter. It was totally random, even the demo applications that where provided by the Libraries sometimes worked and sometimes didn't.

Besides it's a big dependency and I would stay away from that. Yes, .Net and XNA is the same, which is why I wouldn't recommend it either.
It might seem very simple, but especially when you're targeting causual gamers, you can't expect anything technical. Even installing the proper graphics drivers and DirectX is often asked to much.
And I doubt that you can ship Java with your Installer, as you can do with .Net and XNA.

#17 jbadams   Senior Staff   -  Reputation: 17247

Like
5Likes
Like

Posted 03 November 2012 - 01:27 AM

for 3d I can't recommend it
[...]
on some PC's it starts to stutter

Spiral Knights, RuneScape, and Minecraft don't have those problems. Posted Image

When did you last try Java? It used to have pretty serious problems, but it's been perfectly fine for quite a long time. There is a lot of badly written Java software which exhibits problems, but this isn't indicative of the capabilities of the platform.

And I doubt that you can ship Java with your Installer

Redistribution of the Java runtime is allowed.

it's a big dependency

This is a genuine concern that is worth taking into consideration -- end-users will need to either already have Java, get Java, or you will need to include the Java runtime in your installer, which can potentially bloat installer size. Note however that programs developed in C, C++ and other languages also often have similar requirements -- support libraries, runtime distributables, etc. -- anyway.



Full disclosure: I wouldn't choose Java myself, as I'm not a big fan of the language and libraries. I think most of the commonly presented objections to Java are misleading though, and I think it's a fine choice for those that are comfortable with it.

#18 Bacterius   Crossbones+   -  Reputation: 8162

Like
4Likes
Like

Posted 03 November 2012 - 02:52 AM

Well from a graphics point of view, everything is abstracted through driver calls at this point, so the choice of language will have essentially zero impact on rendering speed. There are some considerations when it comes to logic code (data structures, memory footprint, etc...) but in most cases, even if a C/C++ coder might give you grief for not caring as much about efficiency and doing things elegantly, in general it does not matter as long as the game runs well enough and the code is maintainable.

As for general development quality of life, I would say it is satisfactory. It's not my favorite language but with a good IDE a good Java coder can create games just as well as any other coder. There are certainly situations where using Java may simply be the wrong choice, but I do not believe game development to be one of those. In fact, it may be a better choice overall, because the JVM takes care of a lot of low-level portability issues that other, more low-level languages may still be struggling with.

Edited by Bacterius, 03 November 2012 - 02:52 AM.

The slowsort algorithm is a perfect illustration of the multiply and surrender paradigm, which is perhaps the single most important paradigm in the development of reluctant algorithms. The basic multiply and surrender strategy consists in replacing the problem at hand by two or more subproblems, each slightly simpler than the original, and continue multiplying subproblems and subsubproblems recursively in this fashion as long as possible. At some point the subproblems will all become so simple that their solution can no longer be postponed, and we will have to surrender. Experience shows that, in most cases, by the time this point is reached the total work will be substantially higher than what could have been wasted by a more direct approach.

 

- Pessimal Algorithms and Simplexity Analysis


#19 shadowomf   Members   -  Reputation: 315

Like
1Likes
Like

Posted 03 November 2012 - 05:21 AM

When did you last try Java? It used to have pretty serious problems, but it's been perfectly fine for quite a long time. There is a lot of badly written Java software which exhibits problems, but this isn't indicative of the capabilities of the platform.

It must have been less than three years, it was defenetly on my current machine. By the way, it's not just bad software that is sometimes exhibiting such strange behaviour. For example Quake Live didn't work correctly either while Minecraft doesn't give me any problems.

View Postshadowomf, on 03 November 2012 - 02:06 AM, said:
it's a big dependency
This is a genuine concern that is worth taking into consideration -- end-users will need to either already have Java, get Java, or you will need to include the Java runtime in your installer, which can potentially bloat installer size. Note however that programs developed in C, C++ and other languages also often have similar requirements -- support libraries, runtime distributables, etc. -- anyway.


Sure it's true, with C/C++ you do often add additional dependencies, as with any other language. I do even know some commercial software that is written in multiple languages (C++, Visual Basic, Tcl, ...) and that has a dependency package that is multiple gigabytes in size (which is bigger than the application itself).

But if you're trying to be reasonable with your dependencies you can built pretty small applications in C++, that are simply installed and don't require additional setup steps for the Runtime and other libraries. This can be important if you're planning to use digital distribution or want to offer a demo that doesn't take long to download. Another thing is, that these additional installation steps, can confuse some users (What is .Net? Why do I need this Runtime-Whatever? Where do I have to put this <fancy marketing name for a library>?) and are always annoying even if you know what they are doing.

even if a C/C++ coder might give you grief for not caring as much about efficiency and doing things elegantly, in general it does not matter as long as the game runs well enough and the code is maintainable.

Sure, you can always ignore the performance of your application and expect the user to buy new hardware. But with C/C++ the minimum system requirement is probably lower and you might sell more.
Always assuming that:
- the developer knows what he/she is doing, no matter if it's a C/C++ or Java developer
- the developer doesn't have to learn C/C++, in that case it is just not feasable to let him start on a game using C/C++ and will probably result in something worse than what he/she could have done with Java

#20 Bacterius   Crossbones+   -  Reputation: 8162

Like
1Likes
Like

Posted 03 November 2012 - 06:44 AM

Sure, you can always ignore the performance of your application and expect the user to buy new hardware. But with C/C++ the minimum system requirement is probably lower and you might sell more.

My hypothetical Java coder would not be "ignoring performance" (it's not like he's using bubble sort) he would simply not care as much about squeezing every possible ounce of performance out of the target system. The minimum system requirements would be low enough, and he will benefit from fast development time and will meet his deadlines without worrying about his code becoming more and more arcane as more performance hacks are thrown in (yes, just because you code in C++ doesn't mean the CPU automatically clocks twice as fast, you just have more optimization freedom)

Besides, we are talking about games here, not some high performance computing application. Most people who care about high framerates already have monster rigs, those who don't implicitly accept that some games may run slower by nature. Following your train of thought, every game should be developed under its own real time operating system, in raw assembly, and coded on-demand for every customer hardware configuration. By an assembly guru. Well, I just don't think that's cost effective, that's all.

And yes, I certainly do expect the user to buy new hardware, so that I can implement bigger and better features in my game instead of worrying about how fast it will run on October 4 2012 at 1:44 AM on current technology. Computers only get faster. Think in more than one dimension.

The slowsort algorithm is a perfect illustration of the multiply and surrender paradigm, which is perhaps the single most important paradigm in the development of reluctant algorithms. The basic multiply and surrender strategy consists in replacing the problem at hand by two or more subproblems, each slightly simpler than the original, and continue multiplying subproblems and subsubproblems recursively in this fashion as long as possible. At some point the subproblems will all become so simple that their solution can no longer be postponed, and we will have to surrender. Experience shows that, in most cases, by the time this point is reached the total work will be substantially higher than what could have been wasted by a more direct approach.

 

- Pessimal Algorithms and Simplexity Analysis





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS