Results 1 to 16 of 16
Like Tree5Likes
  • 4 Post By JosAH
  • 1 Post By KevinWorkman

Thread: What are the benefits of Java?

  1. #1
    TacoManStan is offline Member
    Join Date
    Sep 2011
    Posts
    50
    Rep Power
    0

    Default What are the benefits of Java?

    Now I'm not sure whether this is a question that belongs in the off-topic forum or not, but I am going to put it here because, well, I am new to Java.

    The question is, what are the advantages of using Java? I look over at the UDK, and I see an incredibly easy 3D platform. I look at Java, and see 100+ hours of work, just to set up a decent 2D engine. So, what are the advantages? Does the UDK cost money? Does using the UDK have any downsides? Does using Java have any upsides that I am missing? I know you can use the UDK with the iPhone, so why use Java when making an app and not the UDK?

    I'm sorry if I don't understand these things, but I am truly confused.

  2. #2
    popeus is offline Member
    Join Date
    Sep 2011
    Posts
    12
    Rep Power
    0

    Default Re: What are the benefits of Java?

    The way it was explained to me is that Java is good in a few areas:

    -The way the JVM works with Bitcode allows Java to be seperate from operating systems allowing one programmer to not have to change his code for each individual OS.
    -It is quite a basic straight forward language that is a good introduction to CS
    -It is a very reliable language and the API allows users to do effectively what ever they want to do with the language.
    -The language itself is designed to that its almost impossible to write malicious code. Making it trustworthy for people running applets and such.

    You said it is difficult and time consuming to write a 3D applet in Java and you are correct. One of the first things I did was write a little 2D game where you shoot a gun at a bouncing ball. That took a fair few lines of code, but one could argue that isn't not the purpose of the language. For example, you could make a 3D model of a giraffe in Java, but it would end your life doing it, where as I could easily do it in 3Ds max or Rhino. But, if I want to write a simple input output applet for a website Java is the best possible way to do that. In my opinion its not a question of what's the best language, its what's the best language for this purpose. Obviously that's going to change for each individual problem you have, but a foundation in a language such as Java will allow you to easily switch between programming languages for different purposes with little difficulty.

    </My2Cents>

  3. #3
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

    Default Re: What are the benefits of Java?

    Write once, run anywhere.
    Network-Centric programming.
    Security.

    are some of the key benefits I have seen with Java.

  4. #4
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,014
    Rep Power
    20

    Default Re: What are the benefits of Java?

    You're comparing apples to dumper trucks.

    The UDK is a game engine. It's been written as a game engine.

    Java is like the code that underlies the UDK game engine (though in the case of the UDK I'm guessing it's C).
    So for a fair comparison you should be attempting to do what you can do in UDK in C before having a go at Java for not being a 3D game engine.

    I haven't used any of the existing ones for Java, but there are 3d engines out there.

  5. #5
    kammce's Avatar
    kammce is offline Senior Member
    Join Date
    Dec 2010
    Location
    California
    Posts
    194
    Rep Power
    4

    Default Re: What are the benefits of Java?

    I agree with Tolls. I hear people doing this assumption with game engines and java all the time. The main thing is, if you just want to produce a game, get a 3D game engine. If you want to also create the engine that the 3D game runs off of (here is where the hard work comes in. Where you have to figure out the physics of everything! And I mean everything!), use Java. If you are not dedicated enough to create your own engine, and all you want is the game, then pick the game engine. If you want to go into some real programming, use Java. Java can do almost any and everything that your game engine can do, but you have to take the time to make an engine.
    My API:
    Java Code:
    cat > a.out || cat > main.class

  6. #6
    KevinWorkman's Avatar
    KevinWorkman is offline Crazy Cat Lady
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    3,963
    Rep Power
    8

    Default Re: What are the benefits of Java?

    Just echoing what other people are saying- Java is a programming language, not a game engine. There certainly are game engines built on top of Java- Minecraft is today's go-to example of what Java can do in that realm, but there are plenty of others. Then there are dozens (hundreds? thousands?) of libraries that make game programming more effective- lwjgl, slick, JMonkey (3D), tons of others. Check out the showcase board at JGO to see examples of what you can do in Java: Showcase - Java-Gaming.org

    Also, Processing is built on top of Java, and it gives you a 60 fps rendering loop as well as 3d primitives right out of the box. It also lets you port things to Android, if mobile development is your thing.

    But, sure, if you're coming in with little-to-no programming experience, you're going to hit a pretty steep learning curve. That's true of any real programming language. If you just want another cookie-cutter platformer game, then go ahead and use game maker. But if you want to actually learn how to program, then you have to check your expectations- you aren't going to have a 3D MMORPG first person shooter by christmas- you might have pong or breakout. But if you start small and work your way up, you'll eventually see that Java is an awesome language for developing games- it has cross-platform portability, tons of libraries for gaming, physics, 3d, sound, etc, plus an awesome community.
    Last edited by KevinWorkman; 09-13-2011 at 03:43 PM.
    How to Ask Questions the Smart Way
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  7. #7
    JosAH's Avatar
    JosAH is online now Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,527
    Blog Entries
    7
    Rep Power
    20

    Default Re: What are the benefits of Java?

    Above all: Java is so soft for your hands and it keeps the cats out of your garden; cats hate it (ever seen a cat eating a jvm?)

    kindest regards,

    Jos ;-)
    cenosillicaphobia: the fear for an empty beer glass

  8. #8
    Skiller is offline Member
    Join Date
    Jan 2011
    Posts
    67
    Rep Power
    0

    Default Re: What are the benefits of Java?

    I only partially agree with Tolls, comparing Java to a game engine is comparing 2 different things yes, but when you think about it Java is essentially a programming language with heaps of included libraries so you don't have to start from scratch writing every class that you want to use, and that's pretty much what a game engine is, it's a language (almost universally C/C++ for commercial engines though a few are also C# now for XNA) and a heap of libraries so you don't have to start from scratch. But as Tolls said it's not quite fair to compare them as Java was never intended to be used for 3D games and the UDK was.

    For games specifically C/C++ is a much better language as memory management and low level optimization are often very important to get a game to run at a good frame rate, and using a game engine built on it like the one for Unreal is even better as most of that hard work is already done :). However for a hobby game you can get by just fine on Java, for a novice programmer it might even be easier too, but if you know what you are doing Java just gets in the way. For games you can ignore the platform independence of Java as a consideration, all modern gaming platforms I know of use C/C++, but not even close to half have a Java Virtual Machine to run Java apps, and I'm not sure how compatible JOGL would be with them or if like Android they each have their own graphics hardware API implementation making Java's platform independence non-existant, at any rate handling the different platforms is usually only a day or so of work in C/C++ if you designed your engine architecture well (I think the UDK takes care of a lot of that) though there's usually little tweaks that need to be done here and there throughout a project.

    There is a downside to using the UDK though, if you are new to game development then the UDK is going to take a long time to understand, there's a LOT of functionality in it and it is likely to overwhelm novice game programmers, especially since it was written for other professional game developers to use which means that you won't be getting as much help for the very basics like how to draw a square or the fundamentals of 3D math. Creating your own engine is a great way to learn the fundamentals of developing a game, but it's usually not till at least the third engine you write (usually many years later) that you'll have anything that could closely match what the UDK gives you access to, but at least after your first attempt at an engine you should have a pretty good understanding of the fundamentals and be able to understand and use the UDK much better.

    As far as pricing for the UDK goes I believe it's free for non-comercial use, but if you plan to sell your game then it'll cost $100+ for a license and potentially you'll need to pay royalties too.

    Quote Originally Posted by kammce View Post
    Java can do almost any and everything that your game engine can do, but you have to take the time to make an engine.
    Java actually can't do much that a game engine does without using JNI, and if you do use JNI you need to learn C/C++ anyway so you'd be better off going with straight C/C++. But most of what it can't do is related to memory management, communicating with the hardware or low level optimization, so for simple games where frame rate won't be an issue and you aren't doing something abnormal Java should still be perfectly fine.


    In short, for games there's very few upsides to Java compared to the UDK unless you are making a simple game and you don't need to worry about memory management or performance.
    Currently developing Cave Dwellers, a Dwarf Fortress/Minecraft style game for Android.

  9. #9
    KevinWorkman's Avatar
    KevinWorkman is offline Crazy Cat Lady
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    3,963
    Rep Power
    8

    Default Re: What are the benefits of Java?

    Quote Originally Posted by Skiller View Post
    I only partially agree with Tolls, comparing Java to a game engine is comparing 2 different things yes, but when you think about it Java is essentially a programming language with heaps of included libraries so you don't have to start from scratch writing every class that you want to use, and that's pretty much what a game engine is, it's a language (almost universally C/C++ for commercial engines though a few are also C# now for XNA) and a heap of libraries so you don't have to start from scratch.
    I think this is misleading at best, but most likely just false. Saying Java has "heaps of included libraries" implies that they'll work right out of the box- when in fact, they aren't included, nor should they be. A game engine comes with things like a level editor, built-in physics and sound, rendering, lighting, etc. Where in the standard API are they included?

    Java is great for games because it gives you the freedom to use a plethora of libraries (or create your own), but to be more comparable, you'd have to compare a specific combination of Java libraries or engines to your game engine. But since you can swap out the Java libraries, or develop your own, it's still mostly apples and dump trucks.


    Quote Originally Posted by Skiller View Post
    For games specifically C/C++ is a much better language as memory management and low level optimization are often very important to get a game to run at a good frame rate, and using a game engine built on it like the one for Unreal is even better as most of that hard work is already done :).
    I disagree. It could be argued that Java is a "better language" (whatever that means) because you don't have to worry about memory management and low-level optimizations in order to get a good frame rate. Again, check out the featured JGO board.


    Quote Originally Posted by Skiller View Post
    However for a hobby game you can get by just fine on Java, for a novice programmer it might even be easier too, but if you know what you are doing Java just gets in the way.
    Wrong again. Are you trying to troll? Obviously people who know what they're doing use multiple tools- Java being one of them. Saying "Java gets in the way" is just ignorant flame-bait.

    Quote Originally Posted by Skiller View Post
    For games you can ignore the platform independence of Java as a consideration, all modern gaming platforms I know of use C/C++, but not even close to half have a Java Virtual Machine to run Java apps, and I'm not sure how compatible JOGL would be with them or if like Android they each have their own graphics hardware API implementation making Java's platform independence non-existant, at any rate handling the different platforms is usually only a day or so of work in C/C++ if you designed your engine architecture well (I think the UDK takes care of a lot of that) though there's usually little tweaks that need to be done here and there throughout a project.
    You contradict yourself a couple times here. You say you spend days dealing with getting a C game to work on multiple platforms, but also that Java's automatic platform independence can be ignored. I wouldn't ignore a few days of development time, especially on a tight schedule.

    Quote Originally Posted by Skiller View Post
    There is a downside to using the UDK though, if you are new to game development then the UDK is going to take a long time to understand, there's a LOT of functionality in it and it is likely to overwhelm novice game programmers, especially since it was written for other professional game developers to use which means that you won't be getting as much help for the very basics like how to draw a square or the fundamentals of 3D math. Creating your own engine is a great way to learn the fundamentals of developing a game, but it's usually not till at least the third engine you write (usually many years later) that you'll have anything that could closely match what the UDK gives you access to, but at least after your first attempt at an engine you should have a pretty good understanding of the fundamentals and be able to understand and use the UDK much better.
    The same thing could be said about Java- which is why I mentioned Processing.

    Quote Originally Posted by Skiller View Post
    Java actually can't do much that a game engine does without using JNI, and if you do use JNI you need to learn C/C++ anyway so you'd be better off going with straight C/C++.
    Hahaha what? Is this serious?


    Quote Originally Posted by Skiller View Post
    But most of what it can't do is related to memory management, communicating with the hardware or low level optimization, so for simple games where frame rate won't be an issue and you aren't doing something abnormal Java should still be perfectly fine.
    Again, I'm glad I don't have to worry about any of that stuff. And for 95% of games, stuff like that shouldn't be an issue. I might even argue that the other 5% wouldn't want to use a game engine, either.


    Quote Originally Posted by Skiller View Post
    In short, for games there's very few upsides to Java compared to the UDK unless you are making a simple game and you don't need to worry about memory management or performance.
    In short, this is rubbish. Java has a ton of upsides for gaming. The only downside is people who don't really know what they're talking about shouting things like "I heard Java is slow! Memory management!" contributing to the false stereotype.
    How to Ask Questions the Smart Way
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  10. #10
    TacoManStan is offline Member
    Join Date
    Sep 2011
    Posts
    50
    Rep Power
    0

    Default Re: What are the benefits of Java?

    Alright time to admit something... I'm not really a noob in Java(well, I am, but I do have 3 years under my belt), I just don't know what an "engine" is, and when I discovered the UDK, I was wondering if spending my time learning the UDK would have been better than learning Java.

    So, here is my other question. Say I want to make Pokemon. Simple 2D sprites, could be loaded easily as a JPEG or more likely PNG to form animation. That is totally possible in Java. I know this because I have done it. Oh and before I keep going, thanks to all of you. You were a huge help :D I don't want to seem like a tool or anything...

    But yeah, as I was saying, let's say I wanted to release this game. (Ignoring all Pokemon copyrights, I'm just talking about the fact that it was made in Java) I would be able to upload the applet to my website, write some code to allow players to purchase in game items, and it would cost me nothing. If I were to do the same thing in UDK, first of all it would be hard because the UDK is only 3D right? And I would have to pay $100?

    Also, how easy is it to change the functionality of the UDK. Could I edit it to say, make a 2D game if I really wanted to? Is the C/C++ code even accessible? I would think it wouldn't be, to avoid theft.

    So basically this is my question. I haven't wasted 3 years learning Java, have I? I learned it to make a game, and to eventually learn C++/C#. Was it worth it?

    Oh and one more thing. Does anyone know how code that allows you to purchase items in game work? I have looked at PayPal and it said that there is an API for it, but I didn't see anything that looked like Java. Then again I didn't really look at it that much, but I didn't see anything. Is there even a way to allow people to purchase stuff inside of Java? Well I guess I can just make another thread for that.

    EDIT: Isn't Runescape also made in Java? I have heard that it is about the max quality Java can get to before you start running into it's limits, is that true?
    Last edited by TacoManStan; 09-13-2011 at 11:36 PM.

  11. #11
    sunde887's Avatar
    sunde887 is offline Moderator
    Join Date
    Jan 2011
    Location
    Richmond, Virginia
    Posts
    3,069
    Blog Entries
    3
    Rep Power
    8

    Default Re: What are the benefits of Java?

    I don't think runescape is the maximum capability of java, I'm sure if java was more widely picked up you would see more intensive games being created. Learning java is never bad, if you are learning to program you should not limit yourself to just x, y or z, instead, try to learn x, y, and z. Different languages are designed differently; they have strengths, and weaknesses, but learning one language should make you more knowledgeable, and make it easier to transition to other languages. A game engine, as far as I know; it not actually a programming language, it is built with a language to automate things(hopefully someone will correct me if I'm wrong). You ask a lot of UDK specific questions, they may be better suited for a UDK forum. I am hesitant to say that something cannot be done in Java, Java has grown quite a bit and as far as I know, it has similar capabilities to all other languages.

  12. #12
    Skiller is offline Member
    Join Date
    Jan 2011
    Posts
    67
    Rep Power
    0

    Default Re: What are the benefits of Java?

    @KevinWorkman
    I was worried this might happen, I'm talking about the games you'd know, ones you'd seen on a shelf at a store, not so much small/simple/indie games that don't need much work to run at a decent frame rate. The OP hadn't said what kind of game he wanted to make, or what his prospects for the future were so I answered with the possibility that in the future he might want to work professionally in the games industry in which case Java is 95% of the time the wrong language to learn/use.

    Quote Originally Posted by KevinWorkman View Post
    I think this is misleading at best, but most likely just false. Saying Java has "heaps of included libraries" implies that they'll work right out of the box- when in fact, they aren't included, nor should they be. A game engine comes with things like a level editor, built-in physics and sound, rendering, lighting, etc. Where in the standard API are they included?
    Compared to what you get with C/C++ Java does have heaps, C/C++ doesn't come with any classes built in, it doesn't come with any memory management, it doesn't come with much in the way of debugging functions either so with Java's included libraries you start a fair way ahead of C/C++, Java would be a terrible language without it's included libraries. In C/C++ you do get the STL included with most compilers but it's a fair bit of work you need to do before the STL is ready to be used in games properly.
    But as you say it doesn't include stuff for a game so as I had agreed it's not a fair comparison.

    Quote Originally Posted by KevinWorkman View Post
    I disagree. It could be argued that Java is a "better language" (whatever that means) because you don't have to worry about memory management and low-level optimizations in order to get a good frame rate. Again, check out the featured JGO board.
    It's not that you don't have to it's that you can't, if your game isn't running at an acceptable frame rate in Java then compared to C/C++ there's very little you can do to improve it. Try making Crysis in Java, you wont get close to the same frame rate as you get with the C++ build there's just too much the Java language does that isn't strictly needed in C/C++. So you have to make a simpler game than you would in C/C++ so that you don't have these problems.


    Quote Originally Posted by KevinWorkman View Post
    Wrong again. Are you trying to troll? Obviously people who know what they're doing use multiple tools- Java being one of them. Saying "Java gets in the way" is just ignorant flame-bait.
    Enums are too slow to be usable in a game so you have to use static final values instead which is a pain in the ass. Every access to an array checks to see if the index is in the bounds of that array, if I'm needing to do it several hundred thousand times per frame that's a lot of wasted CPU cycles when I've written my code so that it's not possible to generate an index that could be out of bounds, and there's little I can do to stop those checks. If I need a value that goes up to 255, I need 2 bytes instead of 1, and in classes where you have hundreds of thousands of instances that's a hell of a lot of wasted data, and that's before you also factor in the over head of a class instance which bloats memory so much I've had to abandon OOP in my Java game just to fit in memory.

    Quote Originally Posted by KevinWorkman View Post
    You contradict yourself a couple times here. You say you spend days dealing with getting a C game to work on multiple platforms, but also that Java's automatic platform independence can be ignored. I wouldn't ignore a few days of development time, especially on a tight schedule.
    Like I said Java is not entirely platform independent for games, the graphics hardware is different so the APIs Java needs to use the hardware are not guaranteed to be the same or compatible between platforms just like in C/C++ so those few days would also apply to the Java game and unlike C/C++ Java isn't even available on many gaming platforms. So Java's platform independence isn't applicable to many games, however if you are making a simple game you might not need hardware acceleration in which case Java would be fine (as long as it's available on your target platform) but that's what I've always said.

    Quote Originally Posted by KevinWorkman View Post
    The same thing could be said about Java- which is why I mentioned Processing.
    I'm not familliar with Processing, so I can't comment on that.

    Quote Originally Posted by KevinWorkman View Post
    Hahaha what? Is this serious?
    Optimize your code to avoid cache misses, use the same memory at the same time as different types, recycling memory as needed without changing the memory footprint of the game, use graphics hardware, stuff like that. However I will retract my former statement anyway as technically *you* don't need to learn C/C++ if you use a library that someone else creates that does it for you, I guess I'm just too used to doing that stuff myself that I forgot to consider that ;).

    Quote Originally Posted by KevinWorkman View Post
    Again, I'm glad I don't have to worry about any of that stuff. And for 95% of games, stuff like that shouldn't be an issue. I might even argue that the other 5% wouldn't want to use a game engine, either.
    Depends on the game, any programmers wanting to create a professional quality commercial game would have to worry about it, even in Java, in fact more so in Java as you can't rely on garbage collection to have freed specific memory at a specific point in time, even though it's usually very good at doing so.
    For instance I'm working on Java game on Android, I have a maximum of 16mb-24mb of memory I can use as going over will cause the game to be terminated by the OS, I have a level that uses 14mb of memory, if I free that memory then allocate memory for a new level occasionally the GC hasn't freed the memory yet and it causes the game to be terminated. Now this happened only VERY occasionally, maybe once every 20 or so runs but to make sure my app is stable I had to write extra code to manage when I can allocate my memory by waiting until that memory is available, where as in C++ all I need to do is delete the level, then allocate the new one, knowing full well that I have that memory available again at that point without even needing to check it.

    Quote Originally Posted by KevinWorkman View Post
    In short, this is rubbish. Java has a ton of upsides for gaming. The only downside is people who don't really know what they're talking about shouting things like "I heard Java is slow! Memory management!" contributing to the false stereotype.
    I specifically said "compared to the UDK" for a reason, in general yes Java does have a ton of upsides for gaming, but most of those upsides are overshadowed by the purpose built UDK that uses a language that can be immensely beneficial to games, you really can't do much better than the UDK as far as a starting point for making a game goes even regardless of language. I must admit I believed those rumors about Java being slow, but have been pleasantly surprised by how fast it is, it certainly can compete with C++ in performance for the same functionality, the problem is you can drop a lot of the functionality in C++ to further improve performance if you know what you are doing and Java doesn't have a way to match C++ if that is done. Another thing to keep in mind is that Java it's self is slow, it's an interpreted language so it alone is not enough to get C++ like performance, the user's JVM needs a JIT compiler to achieve that and while the vast majority of JVMs have one it is not guaranteed, for instance Android versions prior to 2.2 did not have a JIT compiler so even on the same hardware my current game would be impossible in Android 2.1 which again raises the issue of just how platform independent Java is for games.

    There's a reason minecraft is pretty much the only real big Java game, and even in that it's clear to see that Java is not the right language for it, it sometimes runs out of memory even on computers with ridiculous specs and 16+gb of RAM, I couldn't see how that would be possible in C++ without doing something horrendously wrong, and even under normal conditions on modern computers it can still drop below 30fps when even games like Crysis Warhead can do better.

    In summary, for small/simple games like indie games Java is usually fine but if you want to develop more complex/professional games, or intend to work in the games industry Java is not the right language to be using. I know I sound incredibly negative about Java but I just don't want to give people the impression that they can go from making Java games to making the games they see on shelves, they'd need to almost start all over again learning C++ and a much different approach to programming than they'd be used to.





    And now back to the bigger issue of helping the OP :)
    Quote Originally Posted by TacoManStan View Post
    But yeah, as I was saying, let's say I wanted to release this game. (Ignoring all Pokemon copyrights, I'm just talking about the fact that it was made in Java) I would be able to upload the applet to my website, write some code to allow players to purchase in game items, and it would cost me nothing. If I were to do the same thing in UDK, first of all it would be hard because the UDK is only 3D right? And I would have to pay $100?
    Yep, as I understand it Java would be completely free :). All 3D game engines are also capable of doing 2D but it is a little more complicated to set up than it would be in a purpose built 2D engine but once it's going there's not much difference, and yes you would have to pay to use the UDK in that situation.

    Quote Originally Posted by TacoManStan View Post
    Also, how easy is it to change the functionality of the UDK. Could I edit it to say, make a 2D game if I really wanted to? Is the C/C++ code even accessible? I would think it wouldn't be, to avoid theft.
    If you are buying a license I believe they do give you the source code for the entire engine (you'd need to check the details to be sure though), for the non commercial free version they don't though. But it wouldn't matter as you wouldn't need to change anything in the engine to render 2D stuff, I mean think about it, menus and huds are 2D so it's got to be capable of it.

    Quote Originally Posted by TacoManStan View Post
    So basically this is my question. I haven't wasted 3 years learning Java, have I? I learned it to make a game, and to eventually learn C++/C#. Was it worth it?
    No you haven't wasted 3 years, Java and C/C++ are pretty similar, there's a few programming practices you need to learn and a few tricks too but syntactically they are pretty much the same, and most of the thought processes involved in programming in any language should be helpful in others. More importantly you shouldn't need C++ or the UDK for that kind of game anyway.

    Quote Originally Posted by TacoManStan View Post
    Oh and one more thing. Does anyone know how code that allows you to purchase items in game work? I have looked at PayPal and it said that there is an API for it, but I didn't see anything that looked like Java. Then again I didn't really look at it that much, but I didn't see anything. Is there even a way to allow people to purchase stuff inside of Java? Well I guess I can just make another thread for that.
    I'm sure someone will know of a Java API to do it, worst case is that you can just use JNI to access the PayPal API.
    Last edited by Skiller; 09-14-2011 at 08:32 AM.
    Currently developing Cave Dwellers, a Dwarf Fortress/Minecraft style game for Android.

  13. #13
    JosAH's Avatar
    JosAH is online now Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,527
    Blog Entries
    7
    Rep Power
    20

    Default Re: What are the benefits of Java?

    Quote Originally Posted by Skiller View Post
    Java does have heaps, C/C++ doesn't come with any classes built in
    Neither does Java; there are no 'built in' classes in Java. The only thing that may play tricks on you is the compiler, i.e. it treats "..." text as literal Strings (which are objects) and it does funny things with autoboxing, but there are no built in classes in Java either. It's class hierarchy is a real hierarchy though (whith the Object class as the root) while the C++ classes are a forest (i.e. not one single root), aamof it's just a bunch a DAGs because of that darn multiple inheritance of implementation. The 'library' that comes with Java is also more extensive than the stuff that comes with C++ out of the box.

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

  14. #14
    KevinWorkman's Avatar
    KevinWorkman is offline Crazy Cat Lady
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    3,963
    Rep Power
    8

    Default Re: What are the benefits of Java?

    Instead of arguing over theoretical or misperceived problems, I'll just repeat what I said earlier: check out the featured board at JGO for a good idea of what's currently possible with Java gaming. You'll find everything there from simple tower defense games to 3D multiplayer FPS games. I think you'll be surprised, and I'll mostly just let the games speak for themselves.

    But also, I think that as the trend towards mobile development continues (what is it? 60% of people on the internet or playing video games are doing it on a cell phone, something like that?), Java is going to take back the ground it lost due to its misrepresented and exaggerated "slowness". Just my theory though.

    Either way, dismissing Java for gaming is ignoring a ton of stuff, and it's a pet peeve of mine because it perpetuates the misunderstanding that "omg I heard Java was slow!" continued by people who don't really know what they're talking about. You (Skiller) seem like a smarter dude than that, but I want to provide "the other side" for the novices who might read your posts and declare "Java is slow and bad for games!" when that's simply not the case. Again, check out JGO.

    Back to the OP- Learning a programming language is never a waste of time. Even if you never use Java again, the skills you picked up will apply in almost any language- and even the weird ones that it doesn't apply in, the other skills (problem solving, debugging, etc) you picked up will definitely still apply. A game engine might make it easier to make a game, but you're sacrificing freedom for convenience (that might be a fine tradeoff). I sincerely believe that Java would be a fine tool to use to create most any game you'd want to, especially with the gaming libraries out there (which do not come included, like they might in an engine). In any case, my best advice to you is to start small- you aren't going to go from the basics to releasing a game people are willing to pay for in a matter of months. Don't worry about stuff like payments until you have a game people actually want to play.
    sunde887 likes this.
    How to Ask Questions the Smart Way
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  15. #15
    Skiller is offline Member
    Join Date
    Jan 2011
    Posts
    67
    Rep Power
    0

    Default Re: What are the benefits of Java?

    Quote Originally Posted by KevinWorkman View Post
    Either way, dismissing Java for gaming is ignoring a ton of stuff, and it's a pet peeve of mine because it perpetuates the misunderstanding that "omg I heard Java was slow!" continued by people who don't really know what they're talking about. You (Skiller) seem like a smarter dude than that, but I want to provide "the other side" for the novices who might read your posts and declare "Java is slow and bad for games!" when that's simply not the case. Again, check out JGO.
    OK just to clarify as obviously my sentiments were not conveyed clearly enough in my previous posts, when a JIT is available I do not think Java is slow, and I do not think Java is bad for games, in fact I'm surprised by just how fast Java is and it *is* good for doing games, however C/C++ is just better suited for more complex/commercial games (like the ones you'd find in a retail store) so if that's what someone ultimately is aiming to work on then C/C++ is the better language, otherwise as you've all said Java is fine for games (have I ever said otherwise?).
    Currently developing Cave Dwellers, a Dwarf Fortress/Minecraft style game for Android.

  16. #16
    JosAH's Avatar
    JosAH is online now Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,527
    Blog Entries
    7
    Rep Power
    20

    Default Re: What are the benefits of Java?

    Quote Originally Posted by Skiller View Post
    however C/C++ is just better suited for more complex/commercial games (like the ones you'd find in a retail store) so if that's what someone ultimately is aiming to work on then C/C++ is the better language
    That is just a non sequitur.

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

Similar Threads

  1. benefits of Java/postgreSQL vs other platforms
    By chedderslam in forum Advanced Java
    Replies: 0
    Last Post: 01-28-2011, 03:11 PM
  2. Replies: 0
    Last Post: 07-15-2008, 12:51 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •