Jump to content

  • Log In with Google      Sign In   
  • Create Account


Java for game development?


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
44 replies to this topic

#21 Promit   Moderators   -  Reputation: 6329

Like
0Likes
Like

Posted 02 May 2006 - 09:16 PM

Quote:
Original post by Mike2343
I do believe their Physics engine is now free if you include support for their hardware:
http://physx.ageia.com/developers.html
The conditions are free for non-commercial and free for commercial as long as you support the PPU (which most of the time they also give to you.) I also gave the example of PhysFS, which is free. Still, the situation is bad for APIs and worse for C++ ones, and the sheer frustration of JNI is mind boggling.

Sponsor:

#22 Anonymous Poster_Anonymous Poster_*   Guests   -  Reputation:

0Likes

Posted 03 May 2006 - 02:29 AM

I would just like to state I currently in the industry as a Java programmer and there are many frustrating days I just wished Java was not invented. It would make things so much easier if I were programming in C++ or C# instead of doing some of these "reduculous" hacks to get things working in Java.

Java sucks!!

#23 Anonymous Poster_Anonymous Poster_*   Guests   -  Reputation:

0Likes

Posted 03 May 2006 - 03:12 AM

AP: learn to spell "ridiculous." also, obvioulsy, how to program in java.

Promit: JNI is not that difficult. first of all, within 5 seconds of searching for the jni tutorial on java.sun.com i got

http://java.sun.com/j2se/1.4.2/docs/guide/jni/
http://java.sun.com/docs/books/jni/
http://java.sun.com/docs/books/tutorial/information/download.html
http://java.sun.com/j2se/1.5.0/docs/guide/jni/spec/jniTOC.html

second, there are a lot of great automated tools out there that will just read header files and spit out the requisite JNI resources. the one that lwjgl uses, i believe, is gluegen; JOGL just switched to it as well.

while youre right that theres more trouble when dealing with C++, its still not that bad. in the case of physx you would probably take the same approach, writing a c++ scene graph with a jni interface. no "voodoo" required.

a paper like this one
http://www.cs.technion.ac.il/~gabr/papers/cuj_jni.pdf
is a good introduction. just search for something like "jni c++". a little googling work goes a long way!

#24 killingdjef   Members   -  Reputation: 122

Like
0Likes
Like

Posted 04 May 2006 - 09:24 AM

Interesting replies!
Thanks!

Basically I can conclude that when you start with indie game development you already have alot on your mind designing the game. Learning a complete new language with it would make it harder.

Still, some people say that AAA-games are unachievable when making a game in Java and that you should use C++. I am curious what makes a AAA-game then. If you see a AAA-game as a game which had a dedicated team of 60 employees working on it for 4 years then I agree that it is not achievable. Having such a large development team would naturally mean you'd use the best of the best.

But given that a smaller team of hobbyists work on a game engine and create a game, would it be possible for them to make a living out of it? There is a difference between selling millions of copies world wide of selling one thousand.. or maybe 10 thousand but with lower development costs I don't see why it is necicarilly wrong (I get this impression) if you want to make a game but can't fit the "AAA-quality game"-standard.

#25 Aldacron   GDNet+   -  Reputation: 3095

Like
0Likes
Like

Posted 04 May 2006 - 05:51 PM

Quote:
Original post by killingdjef
Still, some people say that AAA-games are unachievable when making a game in Java and that you should use C++. I am curious what makes a AAA-game then. If you see a AAA-game as a game which had a dedicated team of 60 employees working on it for 4 years then I agree that it is not achievable. Having such a large development team would naturally mean you'd use the best of the best.


This is the biggest misconception there is. There is no inherent problem in Java that prevents a AAA game company from using it to make games. I've already linked above to a blog by a Java developer who was hired by NCSoft recently to start work on an unannounced project. It may never see the light of day, but they are exploring it. There have been a handful of AAA games that used Java in one capacity or another. Even the Star Wars Galaxies servers use Java.

The reasons you don't see more of Java in the AAA space are: the lack of JVM availability on consoles, a lack of third party Java tools (most companies license game engines and rendering components these days to save dev time), and to some extent the myth that Java is slow continues to persist. For most established shops it's just not a good investment.

Sun is working to solve some of the problem. Project DarkStar (aka the Sun Game Server) is a MMOG server technology Sun is developing to get more big shops using Java on the server side. It supports both Java and C++ clients to help make it more attractive. They've already are in talks with some companies, though it's going to be a while yet before we hear who they are.

Promit also makes a good point above about language bindings. There's a lot of stuff you might want to use for which bindings don't exist. Several open source projects have sprung up to give direct, cross-platform access to OpenGL, OpenAL, native input, DevIL, FMOD, and so on. There are loaders for all sorts of file formats, including ogg/vorbis. Someone even started a binding to the ODE physics library, but now someone is also porting ODE to Java. There's a lot of stuff out there that people are creating to help make games with Java, but many tools you might want to use aren't available yet. You would have to create your own bindings to use them. Though, JNI isn't near the beast he makes it out to be.

It took the game industry a very long time to adopt C++. This article at Gamasutra, from 1999, has an interesting passage in it. These days, C++ is all the rage in the games industry and most people will raise their eyebrows if you suggest using C, or if you reject std::string or other STL constructs, or, more and more, any of the Boost libraries. But just 7 years ago, the author of that article felt the need to defend his choice of C++ for his math data structures. This line is most telling:

Quote:
It is a common misconception that C++ produces slow, bulky code and is therefore unsuitable for game programming.


There, a C++ programmer defending the performance of C++ against the misconception C programmers propagated. Sound familiar?

Seven years from now people will most likely be arguing about the performance of some other language. I have no idea whether Java or C# will gain any ground in the game industry in the next few years. But there will be companies starting from scratch who choose new technologies. They will develop game engines in languages other than C++. Alternatives will become available. Emergent isn't going to suddenly rewrite Gamebryo in Java or any other language, but you will see companies with competing technologies that aren't in C++. The industry gradually evolved from assembly, to C, to C++. It will evolve again, though C++ isn't going to disappear (even assembly hung on for a long while, as RollerCoaster Tycoon demonstrates).

Quote:
But given that a smaller team of hobbyists work on a game engine and create a game, would it be possible for them to make a living out of it? There is a difference between selling millions of copies world wide of selling one thousand.. or maybe 10 thousand but with lower development costs I don't see why it is necicarilly wrong (I get this impression) if you want to make a game but can't fit the "AAA-quality game"-standard.


It's very possible to make a living at developing games even as a solo developer. Look at these indie sales stats at GameProducer.net. Some of those games come from small teams, some come from solo developers. Cliff Harris at Positech Games, whose game Democracy (a C++ game) has stats in the list, left LionHead Studios last year to go full time indie. oddlabs, whose game Tribal Trouble (a Java game) also has stats available there, developed TT while they were in college. They are now working on game dev full time just from the TT profits.

When deciding which technologies to use, one thing to keep in mind is your ultimate goal. Aiming to get into the AAA industry with a big studio is a world apart from aiming to develop your own downloadable games. In the former case, the skillset you need is very specific - C++, Python, Lua, perhaps a specialzation in one of the fields of graphics, AI, networking, UI, tools development, and so on. In the latter case, the skillset you need is determined entirely by you, your target platforms, and your target market.

Arguments that the AAA industry doesn't use Java or C# just have no meaning in the context of the downloadable games industry. In that space, people use everything from C++, to Java, to BlitzBasic, to Shockwave, and everything in between. All of the companies in those links have had some level of success in the downloadable games space, regardless of the language they used.

People on these forums tend to give advice from a AAA perspective (particularly those who aren't actually developing any games, AAA or otherwise). So always keep your goals in mind when getting advice and take all advice you get in large communities like this (even mine) with a grain of salt.

#26 smitty1276   Members   -  Reputation: 560

Like
0Likes
Like

Posted 04 May 2006 - 05:57 PM

Aldacron, that may be the best post ever written on GameDev. Just sayin'.


#27 DaBookshah   Members   -  Reputation: 174

Like
0Likes
Like

Posted 04 May 2006 - 07:39 PM

I started off fiddling with java and moved to c++/assembly.

I would never look back. I have absolutely no idea why you would want to write something 3d in java. There is just no compensation for not having direct access to memory, apis, etc. And i found the JNI help to be particularly pathetic.

Not that java isn't nice, and an excellent choice for anything that isn't going to need to run REALLY fast. By the way, java IS slow, but only in the same way that everything is slow compared to c++/assembly.

They used assembly in Roller coaster tycoon? Wtf??

#28 Aldacron   GDNet+   -  Reputation: 3095

Like
0Likes
Like

Posted 04 May 2006 - 11:37 PM

Quote:
Original post by DaBookshah
I have absolutely no idea why you would want to write something 3d in java.


There are a lot of reasons to use Java. Which one is most important depends on who you talk to. Cas at PuppyGames has posted many times that he chose Java for the increased productivity it brings him. That's not going to hold true for someone who isn't experienced, though, so that's not a blanket reason. The guys at Oddlabs have mentioned Java's portability. When you use cross-platform bindings like LWJGL, JOGL, JOAL and so on, your Java app works out of the box on Windows, Mac and Linux. If you don't need access to OpenGL, you can use Java's 2D API without needing any JNI bindings (like Three Rings did with PuzzlePirates.

Quote:
There is just no compensation for not having direct access to memory, apis, etc. And i found the JNI help to be particularly pathetic.


Java has had access to native memory (i.e. memory outside of the VM managed heap) since Java 1.4 with ByteBuffers. That's what makes the OpenGL bindings usable. Anywhere a C API takes a pointer to an array of floats, ints, or what have you, you can use a ByteBuffer. As to JNI, I don't understand the problem C programmers have with it. It's C, after all. It's a well defined API that isn't that difficult to get up and running with. Besides, with the automation tools available these days you can autogenerate most of what you need.

Quote:
Not that java isn't nice, and an excellent choice for anything that isn't going to need to run REALLY fast. By the way, java IS slow, but only in the same way that everything is slow compared to c++/assembly.


This really is a tired old horse now, but once again, Java is NOT slow. Either way, I refer you to my post above. There are vastly different requirements between the AAA game industry and the downloadable games space. Java's performance does not preclude it from either space, but other factors do. People are writing 3D java apps all of the time that get hundreds of frames per second. You can find some of them at javagaming.org.

Look at the topics around these forums, or the Game Programming Gems Books, or books like Code Complete. You will find topics relating to buffer overlow prevention, memory management, garbage collection, and a lot of mundane plumbing work that game programmers implement again, and again, and again, and again ad infinitum. They worry about compiler optimizations for specific processors and porting their code to multiple platforms. All of that costs in terms of time and maintenance. Sometime it's the only answer. But when there is an alternative that handles all of that for you (including runtime optimization for the current user's processor), is available on your target platform, and might cost you a few frames, doesn't it make sense to use it? That's why some people prefer Java or C# for their games. It's not a panacea, it's not always the best choice (I prefer D most of the time to anything else, really), but those who know how to get the most out of it (i.e. Java programmers who program Java and not C++ programmers who use Java like they use C++) will use it.

But enough with the Java is slow stuff, already! Try out Tribal Trouble or Puzzle Pirates (linked above) and let me know how slow they are.

Quote:
They used assembly in Roller coaster tycoon? Wtf??


Actually, not they but he. Chris Sawyer independently developed RCT (the first one) and used assembly for 99% of the game.

#29 CaptainJester   Members   -  Reputation: 523

Like
0Likes
Like

Posted 05 May 2006 - 01:04 AM

Aldacron, your the man(woman?) :) All your posts in this thread were awesome.

killingdjef, you really picked the wrong board to ask this question on. As most people on these boards program in C/C++, you will get a lot of biased answers against Java, or any other language for that matter. Most people here do not work in the games industry, but are just hobbyists, so you can their opinions very lightly. As a hobbyist, you should choose the langauge that works for you, not one that works for other people. As other people have said, since you already know Java, why complicate things further by trying to learn another language at the same time. Just write a few games in Java, then go learn C++ and write a few games in C++, or just rewrite the same ones in C++, then you can make your own comparison of the pros and cons of each.

Lots of people say that you can't do things in Java that you can do in C++, or have to write in a hack way to do it. Well I am supprised these people learned to program at all. Anytime you learn a new language, you also have to try and learn to think in that new language. Most people moving from C++ to Java on their own try to write like a C++ programmer using Java instead of a Java programmer using Java. That's what bites them in the a@@. I have never had a problem doing anything I wanted to acheive with Java. Program the way the langauge is meant to be programmed in and you do not have to write hacks to get it to work.

I am not saying that Java is the perfect choice either, but to get real answers to game programming with Java, head over to JavaGaming.org: http://www.javagaming.org/forums/index.php.

As most level headed people say, choose the best tool for the job you are trying to do. Part of making that choice is determining what you know and what you have time to learn, as well as what you are trying to make. And unless you are make Doom 4 or Halo 3, use Java until it doesn't solve the problem you are trying to solve. Or at least until you want to give C++ a try, just to see what is like.

"None of us learn in a vacuum; we all stand on the shoulders of giants such as Wirth and Knuth and thousands of others. Lend your shoulders to building the future!" - Michael Abrash[JavaGaming.org][The Java Tutorial][Slick][LWJGL][LWJGL Tutorials for NeHe][LWJGL Wiki][jMonkey Engine]

#30 DaBookshah   Members   -  Reputation: 174

Like
0Likes
Like

Posted 05 May 2006 - 03:20 AM

*sigh*. I'm going to be ranked down for this, I just know it(Lost 11 points already). But It's bugging me that I might be wrong.

Logic:
<Insert Language Here> - has overhead/inefficiencies, whatever
Assembly - No overhead.

So: Assembly is faster than <Insert Language Here>. Which is all I meant when I said java was relatively slower, obviously. Might mean next to nothing in practical terms(Seriously, who writes in assembly these days), but doesnt stop it from being true.

I hope that's right.

[Edited by - DaBookshah on May 5, 2006 9:20:50 AM]

#31 Anonymous Poster_Anonymous Poster_*   Guests   -  Reputation:

0Likes

Posted 05 May 2006 - 03:29 AM

Quote:
Original post by jwalsh
Additionally, there is a performance difference between Java and C# (C# is 2 to 6 times faster )and especially between Java and C++ (C++ is generally 10 times faster).


C sharpers are geeting worse and worse everyday! hahahahahahahhahahaha
Are on drugs or something?

Quote:
Original post by jwalsh
Its a managed language and has all the benefits of Java, in addition to which it has really nice reflection, which can be useful for dynamic coding (a replacement for scripting).


Java HAS REFLECTION since day one. You know nothing about Java, could you please study a little, at least to know what you are talking about?



#32 ecirbs   Members   -  Reputation: 122

Like
0Likes
Like

Posted 05 May 2006 - 04:42 AM

I agree all Aldacron said
and some games (one at least) use what he said :
Quote:
Original post by Aldacron
Java has had access to native memory (i.e. memory outside of the VM managed heap) since Java 1.4 with ByteBuffers. That's what makes the OpenGL bindings usable. Anywhere a C API takes a pointer to an array of floats, ints, or what have you, you can use a ByteBuffer. As to JNI, I don't understand the problem C programmers have with it. It's C, after all. It's a well defined API that isn't that difficult to get up and running with. Besides, with the automation tools available these days you can autogenerate most of what you need.


This game, www.astronoid.net, uses Nebula Device (an native 3d engine)
and all network and game programmings are in Java,
And the game is good, really.

Just use language you need and you really know :
Some C++ application are worse than Java ones and vice versa and this is not language-dependant.

#33 killingdjef   Members   -  Reputation: 122

Like
0Likes
Like

Posted 05 May 2006 - 06:53 AM

Thanks for that -excelent- post, Aldacron! It cleared up everything for me. You should make an articale out of it.

Looking at this from the bigger perspective I think Aldacron really did hit the nail on the head. It's not about language X versus language Y but its more what you're capable of doing with it.

@ CaptainJester
I don't entirely agree with you, this being the wrong board. The huge amount of replies and points of view give me alot of insight. Posting this on javagaming will bring me biased oppinions in favor of Java. On this board it apparantly gave me biased oppinions in favor of C++/C# but i'd rather hear false statements getting un-myth'ed by users such as Aldacron than to hear its an excelent choice and that I couldn't have picked a better language; something i'd image I would've got at javagaming.


#34 smc   Members   -  Reputation: 292

Like
0Likes
Like

Posted 05 May 2006 - 07:58 AM

Aldacron... excelent! When I first saw this thread I was thinking... ahhh flame war here we go.


In the spirit of a flame war...
English is slow and only good for simple tasks. You should use french because it is much faster. But if you want blazing speed use Latin.

(btw english is my primary language and gets the job done)

#35 smitty1276   Members   -  Reputation: 560

Like
0Likes
Like

Posted 05 May 2006 - 08:01 AM

For what its worth... based purely on the number of "Java for Game Development?" threads over the last week, Java is soon going to claim its title as King of Game Development.

#36 smc   Members   -  Reputation: 292

Like
0Likes
Like

Posted 05 May 2006 - 08:12 AM

Quote:
Original post by smitty1276
For what its worth... based purely on the number of "Java for Game Development?" threads over the last week, Java is soon going to claim its title as King of Game Development.


[lol]

Im just glad to see a (somewhat) civilized discussion on the matter. At the first job I had my boss showed me a program he had written when he was in his 20s. The opcodes were written on paper. He used a hex editor to 'compile' the program.

#37 Promit   Moderators   -  Reputation: 6329

Like
0Likes
Like

Posted 05 May 2006 - 08:23 AM

Quote:
Original post by smitty1276
For what its worth... based purely on the number of "Java for Game Development?" threads over the last week, Java is soon going to claim its title as King of Game Development.
I've lost count, but I'm fairly certain I have seen no less than 5 and perhaps as many as 10 threads over the past week discussing Java or C# for game development.

#38 JWalsh   Moderators   -  Reputation: 462

Like
0Likes
Like

Posted 05 May 2006 - 08:26 AM

Greetings All,

I feel obligated to post one final time on this topic. First of all, Aldacron made a great post. He indeed hit the nail on the head, and for that he gets a rating++ from me. But be careful about dismissing what other people have posted on here. All is relevant, just not posted as eloquently as Aldacron, perhaps.

killingdjef: I'm not fully aware of your background, or your goals for the future, but as Aldacron pointed out, if you're interested in becoming a hobbyist game programmer then definitely use whatever language you're most comfortable using. Indeed, Java is a great language to learn on, and there are many shareware, indie, and commercial (not as much retail) games made in java.

But if your goal is to "get into the industry," then as I posted earlier, do yourself a favor and learn C++. Regardless of who says what about which language, the simple fact of the matter is game companies are not currently hiring Java programmers. They are, however, hiring C++ and C# programmers. This is not a "guess"...this is information obtained by reviewing Gamasutra, Gamedev, Monster, and Gamejobs job postings. Again, if you just want to be a hobbyist, then this is a non-issue.

As Aldacron pointed out, this is largely just a trend. Ten years ago people were not hiring C++ programmers either. Over the next 10 years we're likely to see a shift from C++ to some other language - what that is, no one can say. But if you're interested in getting into the industry "today"...then you'll need to know C++.

And the C++ bias which you've encountered on this forum is not local to this forum. The bias you are experiencing is a pervasive reflection of the culture for which you're getting involved. Similarly, when you go to France you *expect* a bias towards French. Does this mean there are not English, Chinese, Spanish, Italian..etc...speakers in France? No. There are a vast number of languages spoken in France, but as French is the defacto language in France, there is an acceptable and obvious bias towards French.

Another way to look at this is this: You wanted to know "how does java compare to languages like C# and C++ with regards to game development and how widely is it used?" That's like going to France and asking how French compares to Spanish. You will get biased answers because you're IN France.

What's my whole point? You've come to THE #1 resource for game development on the Internet and there's a bias towards C++. That should tell you something in and of itself. Game developers speak C++. Just like the French speak French. You can still get around just fine as an indy or hobbyist developer, but the majority of people in this industry speak C++.

As for Aldacron's comment: "People on these forums tend to give advice from a AAA perspective (particularly those who aren't actually developing any games, AAA or otherwise)."

Be very careful with comments like these. Do not discount people's opinions just because they're "lofty." We get a lot of people on this forum who are going to "...make the next big MMO that will rival World of Warcraft." And they're planning to do it by themselves or with a few friends after school. ;)

But the point is, both people "who aren't actually developing any games" as well as those who ARE actually developing games are both entitled to lofty opinions. So when someone says "If you want to get into the industry, and work for Blizzard you must know C++," don’t assume they're saying that because they DONT work for Blizzard. Every once in a while you'll hear that from someone who IS from Blizzard. And since its impossible to tell without notice who IS from Blizzard and who ISNT, take everyone's advice seriously.

Cheers and good luck!
Jeromy Walsh

#39 Promit   Moderators   -  Reputation: 6329

Like
0Likes
Like

Posted 05 May 2006 - 08:36 AM

I broke down and hunted down all of the threads, just to verify that I'm not losing it.
Java for game development? (that's this thread)
Java----C/C++
c++ or c#
Question about Java Vs. C# Vs. C++
Java Games?
Java is fast?
Secondary Language:VB or Java?

Note that all of these threads have been active in the last week or so.

#40 CaptainJester   Members   -  Reputation: 523

Like
0Likes
Like

Posted 05 May 2006 - 09:37 AM

Quote:
Original post by killingdjef
@ CaptainJester
I don't entirely agree with you, this being the wrong board. The huge amount of replies and points of view give me alot of insight. Posting this on javagaming will bring me biased oppinions in favor of Java. On this board it apparantly gave me biased oppinions in favor of C++/C# but i'd rather hear false statements getting un-myth'ed by users such as Aldacron than to hear its an excelent choice and that I couldn't have picked a better language; something i'd image I would've got at javagaming.


You do have a point, but I find there is less bias there than there is here.

Quote:
Original post by jwalsh
But if your goal is to "get into the industry," then as I posted earlier, do yourself a favor and learn C++. Regardless of who says what about which language, the simple fact of the matter is game companies are not currently hiring Java programmers. They are, however, hiring C++ and C# programmers. This is not a "guess"...this is information obtained by reviewing Gamasutra, Gamedev, Monster, and Gamejobs job postings. Again, if you just want to be a hobbyist, then this is a non-issue.


You are correct. However if you have a portfolio of games in several different languages, you would be a more attractive prospect.

"None of us learn in a vacuum; we all stand on the shoulders of giants such as Wirth and Knuth and thousands of others. Lend your shoulders to building the future!" - Michael Abrash[JavaGaming.org][The Java Tutorial][Slick][LWJGL][LWJGL Tutorials for NeHe][LWJGL Wiki][jMonkey Engine]




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