Quote:Original post by Mike2343The 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.
I do believe their Physics engine is now free if you include support for their hardware:
http://physx.ageia.com/developers.html
Java for game development?
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!!
Java sucks!!
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!
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!
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.
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.
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.
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??
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??
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.
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.
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.
*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]
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]
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement