• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.
Sign in to follow this  
Followers 0
Dahamonnah

How powerful is Java?

48 posts in this topic

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.
0

Share this post


Link to post
Share on other sites
"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
0

Share this post


Link to post
Share on other sites
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
0

Share this post


Link to post
Share on other sites
Check out [url="http://www.wakfu.com"]Wakfu[/url]. 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.
0

Share this post


Link to post
Share on other sites
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 [i]better [/i]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
2

Share this post


Link to post
Share on other sites
[quote name='Alpha_ProgDes' timestamp='1351880235' post='4996617']
It's capable of running any game that .NET, C#, or XNA can run.[list]
[*]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.
[/list]
[/quote]

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.
0

Share this post


Link to post
Share on other sites
EDIT: No lol around here it seems [img]http://public.gamedev.net//public/style_emoticons/default/unsure.png[/img] Edited by TheChubu
-3

Share this post


Link to post
Share on other sites
[quote name='Telcontar' timestamp='1351915419' post='4996755']
It is Turing-complete.
[/quote]
So is [url="http://www.muppetlabs.com/~breadbox/bf/"]brainfuck[/url], but that doesn't make it suitable for games.


Please try to stay on-topic/helpful guys. [img]http://public.gamedev.net//public/style_emoticons/default/smile.png[/img]
1

Share this post


Link to post
Share on other sites
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.
-2

Share this post


Link to post
Share on other sites
[quote name='jbadams' timestamp='1351927627' post='4996798']
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.
[/quote]
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.

[quote name='jbadams' timestamp='1351927627' post='4996798']
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.
[/quote]

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.

[quote name='Bacterius' timestamp='1351932726' post='4996801']
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.
[/quote]
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
1

Share this post


Link to post
Share on other sites
[quote name='shadowomf' timestamp='1351941697' post='4996824']
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.[/quote]
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.
1

Share this post


Link to post
Share on other sites
I fear this is to far off topic. Hopefully not.

[quote name='Bacterius' timestamp='1351946684' post='4996843']
My hypothetical Java coder would not be "ignoring performance" (it's not like he's using bubble sort)
[/quote]
As mentioned before, I was assuming the developer knows what he's doing. By the way, bubble sort can sometimes be the right tool for the job e.g. for very small data sets (1-10 or something) it's simplicity can help it outperform more advanced algorithms.

[quote name='Bacterius' timestamp='1351946684' post='4996843']
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.
[/quote]
As far as I know most gamers that I would describe as casual gamers, don't buy new computers if they don't have to. And most of the time they are using them for many years.
If you do not depend on thoose extra sales, you are free to ignore them.

Note, currently I'm working on commercial software (not games) and most of the computers that I'm installing it on, are quite old. Even if computers are new, they are usually the cheap kind. However my impression so far is that private/personal computers are updated even less often.

Of course if you're developing the next Unreal or Crysis you know there are many gamers that will buy a new rig just to play your game. (Well Crytek still targeted DX9 instead of >=DX10... with Crysis 2.)

[quote name='Bacterius' timestamp='1351946684' post='4996843']
those who don't implicitly accept that some games may run slower by nature
[/quote]
Actually they don't take responsibility for slow software. For example, if someone complains that Outlook getting slower with each version, he is making MS responsible.
And he is right, if you have features that justify a higher system requirement that's one thing. But if you waste CPU cycles and can't show anything in return, don't be surprised if the user is thinking "Oh great another upgrade required because the developer is lazy".

[quote name='Bacterius' timestamp='1351946684' post='4996843']
he will benefit from fast development time
[/quote]
Well, if he had learned C/C++ from the beginning he would probably be faster using it than Java. At least for me this is the case.
Why does everybody, think it's faster/easier to use Java? I feel terrible when I have to use it and the lack of good tools doesn't help at all.

Okay, I was trying unsuccessful to find an article I read about how Java is a bad choice for teaching programming. But couldn't find it. Anyway, sometimes that extra difficulty can help making you a better programmer.

[quote name='Bacterius' timestamp='1351946684' post='4996843']
By an assembly guru. Well, I just don't think that's cost effective, that's all.
[/quote]
You're right it's not cost effective. However the thought of it is quite pleasing. :)
Well I like toying around with assembly and I'm glad it was part of my training. Even though I was never forced to use it in production (that would probably be a maintenance hell).

Just to make one thing clear, I think Java is a perfectly valid language choice. It's just my personal preference that if given the choice, I wouldn't choose it.
0

Share this post


Link to post
Share on other sites
[quote name='vladmihail' timestamp='1351885782' post='4996642']
java its very powerfull and its better even than C and in some cases its better than C++
[/quote]

Better on what? It all depends on your target platform. Portability is easier in Java because of the virtual machine.

Java has been greatly optimized during the years, but you still get a performance hit (even small) because you have to run your code through the virtual machine. Java does use more memory than C++ because it is built upon objects. Every datatype in Java is an object, whereas in C++ native data types are not. Most C++ data types have a 1-1 correlation with assembler data types.

(C++) int - dd
(Java) int - dd + functions

The data part of the int in Java does translate to a data type in assembler, but you have functions that use memory.
To some games it may matter, to others it may not.

Last time I checked, C++ had much more mature game development tools than Java. You can even compare tools like Java 3D vs the C++ Irrlicht3D engine (both free).
1

Share this post


Link to post
Share on other sites
[quote name='Dunmord' timestamp='1351968546' post='4996939'] Every datatype in Java is an object, whereas in C++ native data types are not. Most C++ data types have a 1-1 correlation with assembler data types.

(C++) int - dd
(Java) int - dd + functions
[/quote]

This is true in [b]C#[/b], but not Java. Java's "int" type is a primitive type and basically behaves like the "int" type in C++. In C#, "int" is basically syntactic sugar for the System.Single type, which is a value-type structure that represents an int. If you want to treat integers like objects in Java, you need to use the Integer class.
1

Share this post


Link to post
Share on other sites
[quote name='Oberon_Command' timestamp='1351970212' post='4996946']
[quote name='Dunmord' timestamp='1351968546' post='4996939'] Every datatype in Java is an object, whereas in C++ native data types are not. Most C++ data types have a 1-1 correlation with assembler data types.

(C++) int - dd
(Java) int - dd + functions
[/quote]

This is true in [b]C#[/b], but not Java. Java's "int" type is a primitive type and basically behaves like the "int" type in C++. In C#, "int" is basically syntactic sugar for the System.Single type, which is a value-type structure that represents an int. If you want to treat integers like objects in Java, you need to use the Integer class.
[/quote]

True, but misleading. It seems like you are saying that the implied performance hit when treating an int as an object applies to C# but not Java, but it's the other way around. Given that a primitive (or struct) in C# behaves like automatic variables in C++ (same in Java), there is no performance penalty in C#. However, in Java it is not possible to have arrays without indirection - you can only have arrays of the Integer object, which is a reference type. So basically for most intents and purposes it's [i]more[/i] true that primitives are objects in Java than the other way around.
-1

Share this post


Link to post
Share on other sites
[quote name='CyberRascal' timestamp='1351978904' post='4996985']
[quote name='Oberon_Command' timestamp='1351970212' post='4996946']
[quote name='Dunmord' timestamp='1351968546' post='4996939'] Every datatype in Java is an object, whereas in C++ native data types are not. Most C++ data types have a 1-1 correlation with assembler data types.

(C++) int - dd
(Java) int - dd + functions
[/quote]

This is true in [b]C#[/b], but not Java. Java's "int" type is a primitive type and basically behaves like the "int" type in C++. In C#, "int" is basically syntactic sugar for the System.Single type, which is a value-type structure that represents an int. If you want to treat integers like objects in Java, you need to use the Integer class.
[/quote]

True, but misleading. It seems like you are saying that the implied performance hit when treating an int as an object applies to C# but not Java, but it's the other way around. [/quote]

I'm not saying anything of the sort. I'm pointing out facts. I'm not trying to make any implications here.

[quote]However, in Java it is not possible to have arrays without indirection - you can only have arrays of the Integer object, which is a reference type. So basically for most intents and purposes it's more true that primitives are objects in Java than the other way around.[/quote]

[i]Arrays[/i] of the primitive "int" type (as in the type "int[]") are perfectly valid in Java. Were you thinking of the collections libraries (like ArrayList, for instance), which don't support holding primitive types?
2

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0