Results 1 to 18 of 18
Like Tree4Likes
  • 1 Post By JosAH
  • 1 Post By KevinWorkman
  • 2 Post By masijade

Thread: What's the most frustrating thing about JAVA?

  1. #1
    conopoly is offline Member
    Join Date
    Jun 2011
    Posts
    1
    Rep Power
    0

    Default What's the most frustrating thing about JAVA?

    Just curious what people think...

  2. #2
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,730
    Blog Entries
    7
    Rep Power
    21

    Default

    Quote Originally Posted by conopoly View Post
    Just curious what people think...
    That stupid boolean type; C (and C++) had it all fixed: 0 or 0.0 or null is considered false while all the rest is considered true; it also allows for more obfuscated code but that James Gosling sissie probably couldn't read real manly man code ...

    kind regards,

    Jos
    sunde887 likes this.
    cenosillicaphobia: the fear for an empty beer glass

  3. #3
    KevinWorkman's Avatar
    KevinWorkman is offline Crazy Cat Lady
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    4,017
    Rep Power
    10

    Default

    The uneducated public's opinion about it. "Oh you're using Java to program a game, isn't that slower than flash?"
    Or the lack of any official general enthusiasm for game programming with Java, which goes hand in hand with public opinion. People think Java is for boring GUIs, and Oracle doesn't do much to correct that stigma.
    How to Ask Questions the Smart Way
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  4. #4
    Zman3359's Avatar
    Zman3359 is offline Member
    Join Date
    Jan 2011
    Posts
    42
    Rep Power
    0

    Default

    Quote Originally Posted by KevinWorkman View Post
    The uneducated public's opinion about it. "Oh you're using Java to program a game, isn't that slower than flash?"
    Or the lack of any official general enthusiasm for game programming with Java, which goes hand in hand with public opinion. People think Java is for boring GUIs, and Oracle doesn't do much to correct that stigma.
    What he said... The overall lack of support for Game Developers from Orcale is definitely my least favorite thing. As well as the assumption that Java is bad for game programming. AND the stuttering that I think is caused by drawing with Java2D (anyone else have this problem?)

  5. #5
    KevinWorkman's Avatar
    KevinWorkman is offline Crazy Cat Lady
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    4,017
    Rep Power
    10

    Default

    What stuttering? Sounds like you're doing something wrong, to be honest.

    Java is a great platform for game development, but the public doesn't realize it because there are only a few people who know how to do it right and then 99% of other people doing it wrong, giving Java a bad rep. "I always thought that Java GUIs were slow and unresponsive." No, that just means whoever wrote the program you're thinking of didn't know enough to do the work off the EDT. "I thought that Java graphics flickered." No, that just means whoever wrote that program didn't know how to paint correctly.

    There's a stigma attached to Java, and to applets, webstarts, and Jars, and the few people doing it right aren't enough to sway public opinion. That's frustrating, but that just makes it our responsibility to prove the public wrong.
    DarrylBurke 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!

  6. #6
    Zman3359's Avatar
    Zman3359 is offline Member
    Join Date
    Jan 2011
    Posts
    42
    Rep Power
    0

    Default

    There is just a slight stutter in the drawing. Maybe it has to do with the way I draw or my game loop.
    I draw by extending a Canvas, calling setBufferStrategy(2) to double buffer, then getBufferStrategy() to get the strategy and then I call getDrawGraphics() on the strategy. I also have doWhile loops checking startegy.contentsRestored() and strategy.contentsLost() like this:
    Java Code:
    do
    {
       do
       {
          Graphics2D g = (Graphics2D) strategy.getDrawGraphics();
          // Draw here
          g.dispose();
       }while(strategy.contentsRestored());
    
       strategy.show();
    }while(strategy.contentsLost());
    And my game loop is fairly simple:
    Java Code:
    long start = System.nanoTime(), curr;
    
    while(running)
    {
    	if(!paused)
    	{
    		updateGame();
    		paintGame();
    	}
    
    	while((curr = System.nanoTime() - start) < period)
    		try
    		{
    			Thread.sleep(1);
    		}catch(Exception e)
    		{}
    
    	start = System.nanoTime();
    }
    System.exit(0);
    EDIT: I am a noob game and java dev if that explains any of my programming flaws >_>

  7. #7
    masijade is offline Senior Member
    Join Date
    Jun 2008
    Posts
    2,571
    Rep Power
    9

    Default

    Quote Originally Posted by conopoly
    What's the most frustrating thing about JAVA?
    Truthfully? This question, and others like it.
    DarrylBurke and KevinWorkman like this.

  8. #8
    Dark's Avatar
    Dark is offline Senior Member
    Join Date
    Apr 2011
    Location
    Camp Lejuene, North Carolina
    Posts
    643
    Rep Power
    4

    Default

    I hate the fact that I have to write it, I mean any real language would be able to produce itself via communicating with my thoughts.

    Other than that, I guess I'll agree its the misconception of the language. Though I can't argue that C++ may have the advantage over modern gaming.
    • Use [code][/code] tags when posting code. That way people don't want to stab their eyes out when trying to help you.
    • +Rep people for helpful posts.

  9. #9
    Joel's Avatar
    Joel is offline Member
    Join Date
    May 2011
    Location
    Placerville, CA
    Posts
    86
    Rep Power
    0

    Default What's the most frustrating thing about Java?

    Other people's code and their lack of documentation. I tell you, bIsR() doesn't really do a helluva lot for me.

  10. #10
    Magmacrab is offline Member
    Join Date
    May 2011
    Location
    Belgium
    Posts
    4
    Rep Power
    0

    Default

    Quote Originally Posted by KevinWorkman View Post
    The uneducated public's opinion about it. "Oh you're using Java to program a game, isn't that slower than flash?"
    Or the lack of any official general enthusiasm for game programming with Java, which goes hand in hand with public opinion. People think Java is for boring GUIs, and Oracle doesn't do much to correct that stigma.
    what about LWGJL? a lot of developers are using this relatively new library for making games, For exemple minecraft and Project Zomboid.

  11. #11
    KevinWorkman's Avatar
    KevinWorkman is offline Crazy Cat Lady
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    4,017
    Rep Power
    10

    Default

    Quote Originally Posted by Zman3359 View Post
    There is just a slight stutter in the drawing. Maybe it has to do with the way I draw or my game loop.
    I draw by extending a Canvas, calling setBufferStrategy(2) to double buffer, then getBufferStrategy() to get the strategy and then I call getDrawGraphics() on the strategy. I also have doWhile loops checking startegy.contentsRestored() and strategy.contentsLost() like this:
    Yeah, you're making it way more complicated than it should be. I would expect to see flickering if you're doing that, because you're fighting over what's being drawn- what you're drawing, and what the Component is drawing (which is probably nothing). Instead of any of that, simply override paintComponent (why are you using AWT instead of Swing?) and do all your drawing in there.

    Recommended reading: Lesson: Performing Custom Painting (The Java™ Tutorials > Creating a GUI With JFC/Swing)

    It's these kinds of misconceptions that give Java a bad name.
    How to Ask Questions the Smart Way
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  12. #12
    KevinWorkman's Avatar
    KevinWorkman is offline Crazy Cat Lady
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    4,017
    Rep Power
    10

    Default

    Quote Originally Posted by Magmacrab View Post
    what about LWGJL? a lot of developers are using this relatively new library for making games, For exemple minecraft and Project Zomboid.
    True that. The stuff that the guys over at JGO are doing is heroic. And I'm hoping that things like that pick up more momentum and make people realize that Java isn't just for creating front ends for bank software.
    How to Ask Questions the Smart Way
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  13. #13
    Zman3359's Avatar
    Zman3359 is offline Member
    Join Date
    Jan 2011
    Posts
    42
    Rep Power
    0

    Default

    Quote Originally Posted by KevinWorkman View Post
    Yeah, you're making it way more complicated than it should be. I would expect to see flickering if you're doing that, because you're fighting over what's being drawn- what you're drawing, and what the Component is drawing (which is probably nothing). Instead of any of that, simply override paintComponent (why are you using AWT instead of Swing?) and do all your drawing in there.

    Recommended reading: Lesson: Performing Custom Painting (The Java™ Tutorials > Creating a GUI With JFC/Swing)

    It's these kinds of misconceptions that give Java a bad name.
    I just finished up two test programs. One using the painting method I detailed in an earlier post and one that extends a JComponent and overrides paintComponent(). Both programs stutter equally. Maybe your right in the long run and using the Canvas method is bad, but for simply moving a box across the screen they both stutter. Maybe it's my computers fault, but I ran the programs on my PC and my Mac and got the stuttering on both. So it's either my programming or java.

  14. #14
    Junky's Avatar
    Junky is offline Grand Poobah
    Join Date
    Jan 2011
    Location
    Dystopia
    Posts
    3,800
    Rep Power
    7

    Default

    Quote Originally Posted by masijade View Post
    This question, and others like it.
    Yeah. Ya gotta love the "Why can't Java do .... coz language .... can" whines.

  15. #15
    masijade is offline Senior Member
    Join Date
    Jun 2008
    Posts
    2,571
    Rep Power
    9

    Default

    Quote Originally Posted by Junky
    Yeah. Ya gotta love the "Why can't Java do .... coz language .... can" whines.
    Amen, brother!

  16. #16
    DarrylBurke's Avatar
    DarrylBurke is offline Forum Police
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,452
    Rep Power
    20

    Default

    Quote Originally Posted by Zman3359 View Post
    I just finished up two test programs. One using the painting method I detailed in an earlier post and one that extends a JComponent and overrides paintComponent(). Both programs stutter equally. Maybe your right in the long run and using the Canvas method is bad, but for simply moving a box across the screen they both stutter. Maybe it's my computers fault, but I ran the programs on my PC and my Mac and got the stuttering on both. So it's either my programming or java.
    It's your programming, believe me. I recommend you start a new thread in the AWT / Swing forum with a SSCCE that clearly demonstrates your problem.

    db

  17. #17
    KevinWorkman's Avatar
    KevinWorkman is offline Crazy Cat Lady
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    4,017
    Rep Power
    10

    Default

    Quote Originally Posted by Zman3359 View Post
    I just finished up two test programs. One using the painting method I detailed in an earlier post and one that extends a JComponent and overrides paintComponent(). Both programs stutter equally. Maybe your right in the long run and using the Canvas method is bad, but for simply moving a box across the screen they both stutter. Maybe it's my computers fault, but I ran the programs on my PC and my Mac and got the stuttering on both. So it's either my programming or java.
    Darryl already covered this, but I'm going to second his statements- it's definitely your programming (right now I'm working on a program that does little more than move boxes across the screen, and it renders fine at 60 fps, and Java is capable of much more complicated animations). If you post an SSCCE in a new thread, I'd like to see what you're doing. Like I said, misconceptions like this are a pet peeve of mine.
    How to Ask Questions the Smart Way
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  18. #18
    Join Date
    Apr 2011
    Posts
    17
    Rep Power
    0

Similar Threads

  1. very frustrating.. recursive
    By Yakg in forum New To Java
    Replies: 5
    Last Post: 01-06-2011, 11:25 PM
  2. get index from an array (very frustrating)
    By Yakg in forum New To Java
    Replies: 4
    Last Post: 12-06-2010, 07:26 PM
  3. Replies: 9
    Last Post: 10-04-2009, 06:45 PM
  4. Replies: 5
    Last Post: 02-25-2009, 08:14 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
  •