Slashdot is powered by your submissions, so send in your scoop

 



Forgot your password?
typodupeerror
×
PC Games (Games) Portables (Games) Entertainment Games

Sun Pushes Java For Games Market 76

mysterious_mark writes "Sun has a new initiative promoting Java for game development, according to a story at CNET News." Interestingly, the company is trying to convince game makers that you can make state-of-the-art titles in Java as easily as simpler browser or phone games: "Java also has been used to build a number of simple online PC games, such as card games, but the language can be used to create sophisticated graphics for A-list games, Melissinos said. 'Some people may have the misconception that Java can't do great, high-performance graphics, and that's absolutely not true.'"
This discussion has been archived. No new comments can be posted.

Sun Pushes Java For Games Market

Comments Filter:
  • Java can be used to make these A-list games, but the hardware doesn't exist to run them at any reasonably acceptable speed.
    • by Kethinov ( 636034 ) on Wednesday June 04, 2003 @01:04AM (#6112553) Homepage Journal
      hardware doesn't exist to run them at any reasonably acceptable speed.
      You forget that not all games are first person shooters. A good game of chess online can be done just as fast in Java as it can be in C++ if you're running a reasonably modern computer. Take it a step further and consider empire building games such as Civilization. Those are also easy on the system. Java can handle it quite nicely. Java was built with crossplatform compatability in mind. It's slowness is minimal and a wonderful tradeoff for the fact that I can run a java app in Windows, Mac, Linux, Unix, or any other major OS.
      • Sure the cross platform implications are great, but lets be serious now, what A+ title could be programmed to run at a playable speed in Java? Even the civ builder games like Civ3 have fairly complex 3D Terrain systems now.

        If Sun wants to push towards game development, all the more power to them, but Java is not ready to make any A+ titles in its current state.
    • by Golthar ( 162696 ) on Wednesday June 04, 2003 @01:49AM (#6112734)
      Obviously trolling.

      When you are creating a full feature game in Java, you will steer well clear from things like Swing/AWT and libs that will slow down a lot.

      Also, as you can't manipulate hardware from Java, you will always need a library which can do some of the really high speed work for you.

      Java3d can be used, but recently a very popular lib named LWJGL" [sourceforge.net] has come out to deliver direct bindings to OpenGL/AL
      • by p2sam ( 139950 ) on Wednesday June 04, 2003 @04:12AM (#6113176)
        Nitpicking...

        As you mentioned Java3d, you must know that Java3d can either use software or Direct3D or OpenGL, therefore your assertion that Java can't manipulate hardware is only true in the sense that ANSI C can't manipulate hardware.

        Also see gl4java at http://www.jausoft.com/gl4java.html
        • Yes, but at the lowest level Java or OpenGL4Java still use C.

          Actualy one of my earlier posts in this thread also points to a more direct binding to OpenGL
          • More nitpicking ...

            Yes, but at a even lower loevel, Java, C and OpenGL still use machine code.
            • Uhm, no shit einstein..

              Sorry but this is heading nowhere.
              Yes ofcourse eventualy its machine code, im talking Native code (C) as oposed to Java (interpeted)
              • There is nothing magical about the C language (or the Java language). C uses a compiler to translate into machine executable code, which will be loaded by the OS, and executed by the HW.

                Java interprets Java bytecode and JIT them into machine executable code, and executed by the HW.

                It is not necessary the case that the same algorithm implemented in C always run faster than Java, and vice versa.

                There are all kinds of run-time optimizations available to Java because the VM knows a heck of a lot more about
    • Yes, that's right.
      For instance, the incredible flight sim IL-2 Sturmovik [il2sturmovik.com] (which is 90% written in Java) only PRETENDS to run at 60+ fps on my Coppermine system. Go back and hide under your bridge, troll.
  • TO the metal (Score:5, Interesting)

    by adamy ( 78406 ) on Wednesday June 04, 2003 @12:51AM (#6112499) Homepage Journal
    It seems lately that most games are using a combination of C to the metal for the heavy ligfting, and Python or some other scripting language for lighter stuff. It seems to me that Java might be a good replacement for the scripting side. Take a game engine that is already portade (Unreal. Doom, Quake) and allow it to be customized using Java may make sense.

    Heavy lifting highly optimized code/ OTOH would still be in C or something else that goes to the metal.
    • Re:TO the metal (Score:2, Informative)

      by Golthar ( 162696 )
      Yes, in fact there are some libraries available that will do the bare metal stuff for you.
      Also, a lot of the runtime code swapping capabilities will make it easier/nicer to create mods by the community.

      Try looking at the Java gaming online forum [javagaming.org]
    • Re:TO the metal (Score:3, Informative)

      by dimator ( 71399 )
      Check out this article [gamasutra.com] about "Dirty Java." (Sorry, it requires a registration at gamasutra.) It's a little dated, but I think it still applies.

    • As Java is strongly typed and needs to be compiled, I think that it is not as effective as a language like Python or JavaScript for scripting. JavaScript is an interesting one because there are a number of free interpreters (including the one in Mozilla) and it has a pretty familiar structure to most programmers.
    • Re:TO the metal (Score:4, Interesting)

      by gl4ss ( 559668 ) on Wednesday June 04, 2003 @03:25AM (#6113010) Homepage Journal
      with the change from dos to windows and then with the modern directx's, opengl and sdl people write less and less to the metal themselfs, if at all (afaik most modern games use c++ and then directx for the gfx, sure, 2d games still do lot of the dirty gfx manipulation themselfs but they shouldn't need to really).

      most of the heavy gfx work are supposed to be done by the gfx card and it's drivers, most of the heavy sound stuff are supposed to be done by the soundchip and it's drivers. they can't do game logic, loading, deciding where to look, glue and all that (though, it looks like the cards are pushing to be possible for that too) and that would be pretty fine for coding in java.
    • Java3D has native OpenGL implementations, but that is completely invisible to the developer. If you are on such a system with a native implementation (e.g. Windows) it will be used. Otherwise the pure Java implementation will be used. Completely transparent to the developer with no code changes. This also goes for some Java2D functions which can be accelerated under the covers.
  • Melissinos said. 'Some people may have the misconception that Java can't do great, high-performance graphics, and that's absolutely not true.'

    I was under the impression that it was true.

    I guess not, but then again I guess that you don't need these games to run at any where near acceptable speeds...
    • by bromba ( 538300 )
      In other news: "Melissinos redefines the meaning of the expression 'high-performance'. Gamers disagree." ;)
  • I did a little 3d JAVA programming a while back and it makes sense to make a game with it. I am certain that future PDAs/camcorders/whatever they want to be, will have both a java runtime environment and DX/OpenGL hardware, so why not code your game in it?

    As long as your JRE is peppy/smart you are golden.

  • For whatever reason, Sun haven't gotten around to making the Java3D libraries available for the Mac. This is a shame, as Java in the games industry needs all the help it can get, and cross-platform Java3D could have been a real benefit.
    • Actually Sun should spend much more time reviewing the Java3D architecture. It is much slower that for example the GL4Java bindings (which should be available for pretty many platforms). I don't know if this has changed, but this information is based on this [rolemaker.dk] report.
  • A couple of years ago a friend and I wrote a simple RTS engine in Java.

    It was a tile based 2D game. Now, we weren't experts at writing super speedy display code, but we did preload all the images into memory, double buffer the frames, and crop areas of the map which would not be shown before displaying them.

    It got a whopping 8 frames a second. With 1 moving unit on the screen. Needless to say we quickly abandoned the project.

    Machines have gotten faster. The Java display engine is undoubtedly slightly imp
    • Obligatory counter-example:
      Frag Island, a veyr impressive quake-like FPS, written in late 1997. ( so quake-like that they ripped off a bunch of quake graphics and let you play in multiplayer in an authentic quake map with an authentic rocket launcher. ID lawyers didn't like, although Carmack was reportedly impressed.)
      You would get more than usable framerates on 320x200. Keep in mind that was on way old 1.1 JIT runtimes. Things have gotten better.

      On a sad note, it seems the page/applet is still dead. I wish
      • The engine my friend and I wrote was completely 2D, using AWT only. Apples + Oranges.

        That said, I've actually played with Java 3D also, and it's reasonably fast, though not as fast as OPENGL+C. (Certainly that would be expected though)

        Java 3D is closer to what a developer would need to develop a serious game in Java, but I think its still for the most part underwhelming.

        I haven't seen any reasonably advanced games written in Java 3D. Hopefully someday that will change, but without a lot better performanc
        • > Apples + Oranges

          Well, not really. Frag Island didn't use "Java 3D" or any other fancy API that didn't exist 5 years ago.
          It was doing all its rendering in software, and was drawing a plain bitmap on a plain AWT canvas, probably using a method very similar to yours (ImageProducer etc..).

          The (now rather dead and smelly) site for the applet is at: http://hem.passagen.se/carebear/fraggame.htm [passagen.se]

          Unfortunately it doesn't load as it seems to be missing some data files, but the code is there for the grabbin

    • What version of Java were you using and what kind of specs are we talking about?

      The Java Graphics was indeed crappy, which has been improved (and support for full screen exclusive mode has been added)

      How can you say it has a long way to go if you haven't tried it recently?
      • P3 450, 128MB RAM, TNT2 Ultra graphics card. Java 1.2, I believe.

        I haven't written a game in Java since then, but that doesn't mean I haven't written Java code. I have the latest Sun One development environment on my machine, and I really like it. I've actually been working on parsing XML log files for a Java project recently in my spare time, which I have very little of.

        Honestly I haven't seen enough improvements to the AWT to think it would be worth my time to pursue another graphics engine.

        If you know
    • A couple of years ago a friend and I wrote a simple RTS engine in C++.

      It was a tile based 2D game. Now, we weren't experts at writing super speedy display code, but we did preload all the images into memory, double buffer the frames, and crop areas of the map which would not be shown before displaying them.

      It got a whopping 8 frames a second. With 1 moving unit on the screen. Needless to say we quickly abandoned the project.

      Machines have gotten faster. The C++ compilers is undoubtedly slightly improved.
  • by _wintermute ( 90672 ) on Wednesday June 04, 2003 @02:03AM (#6112766) Homepage
    Although I think that it remains a very long way off before ID will be developing the 'next big 3d thing' (tm) in Java, there is perhaps room on the server side end of things, particularly as MMORPGs start to garner more attention.

    No matter what the marketeers at Sun tell you, Java will never perform as well as C/C++ and when it comes to creating realtime 3d environments, every bit of speed is crucial. That said, Java has some pretty extensive graphics APIs and hooks into OpenGL and DirectX, which can be useful. For games that are not graphics intensive (and they do exist), Java may well be useful, particularly as you get all sorts of libraries and memory management for free. With JDK 1.4, Java is actually pretty fast on the client-side these days, you mat be pleasantly surprised if your experience is with older versions of Java. Coupled with modern processors (gHz!!) you can end up with a pretty responsive system. But client-side Java was never my cup of tea and it is still not even close to your C++ 3d engine.

    However, many modern games are moving online, and the possiblities of Java are much better here. MMORPGs are interesting because you connect graphical clients with servers. The servers are essentially gigantic rule engines and state machines - client input is taken, processed, perhaps things are stored in databases (this is essentially what you do when you save your character) - . The system may have to integrate with payment engines and credit card processing facilities provided by third parties. None of this stuff is graphical at all, it is all about pure data processing and distributed computing.

    Funnily enough, this architectural model actually coincides with what the Java people call 'Enterprise Applications' and there are incredible facilities in Java to implement this type of application. And the thing is, raw system performance is only part of the story in this type of application, scalability is perhaps more important (the ability to serve a large volume of clients), amny of the limitations of such systems are actually the I/O level of the application, trasmitting through sockets, writing to disk, communicating with the RDBMS. There are also server-specific implementations of the Java Hotspot JIT compiler, with optimisations for the particular tasks required of server applications and the best thing about this is that as the application runs it gets more and more optimised (and as the server is designed to run indefinitely ...) You can purchase or download an Open Source Application Server which will give you things like clustering and failover for free (meaning that you can leverage of this system to provide multiple 'shards' or servers or such things for your game).

    DISCLAIMER:
    I am a server-side Java programmer with a loathing of swing, so I amy be a bit biased.
    • I've played some simple online-games with browser-based Java. Its good fun, and you can log in from anywhere. The problem is that now, with the JRE schism brought on by the MS/Sun lawsuit, all the online Javascript-based companies are gone under or reformatting themselves (like my favourite game, WormHole, was taken down and is being recreated for cellphones). There's also a good robo-rally clone.

      None of these games are epic, mind you, but its nice to be able to play an innovative game agains a large nu
  • More Information (Score:2, Informative)

    by halfnerd ( 553515 )
    Check out this [rolemaker.dk]

    I read it just yesteday and must day that I'm impressed with all the information in this report. Certainly a good resource on this subject.
  • by idries ( 174087 ) on Wednesday June 04, 2003 @05:22AM (#6113390) Homepage
    Java has already caught on as the dominant format for making games for mobile phones, but the language has yet to be widely used for PC-based games.

    Not so. Mobile games are still an evolving area, and J2ME is already dying out in favour of C++ SDK's for specific platforms. The limited kind of games that J2ME has given us are not products that people are willing to pay for.

    This is because *real* games need platform specific assets. Sounds that match the sound playback hardware, graphics at the right sizes and colour depths, models with the right LOD for the renderer etc.

    Once you're providing a platform specific set of assets, there's very little benefit in having platform independant code. Mobiles don't have alot of CPU or RAM, and if you're not going to have platform portability anyway, then there's really no point in using Java. You're much better off programming on the metal. Native phones like the SPV and the N-Gage already allow this, and offer C++ SDK's, which mobile game developers are using.

    SDK's like this are not available on phones without operating systems (because they don't have memory protection so you can't let 3rd party executables onto them, an issue neatly side-stepped by J2ME). However this problem will be overcome by implementations like BREW or by just adding memory protection. It just a matter of time.

    Having said all that, I now write PC games and I think that Java could have a bright future there. Not in games written entirely in Java, but with Hybrid games. Java will never compete for speed. It's a fact, live with it. But 90% of a games' CPU time is spent curring around 20% of the games' code (i.e. the renderer, routefinder etc.). If that 20% is written in C/C++/asm and some percentage (large)of the rest in Java, the speed issue will of little consequence.

    The real question here is why? C++ works very well thank you and the tools and API's required to create a hybrid game such as this are a real pain (when compared to just hitting F7 in VC++). No kind of marketing speak from Sun is going to make programmers go through that pain, just for the sake of 'using Java'. If the tool's were better and Sun put alot of effort into supporting this kind of deployment then game developers might well take it up. Not for platform independance, but for memory managment and the other *real* benefits of Java (simplified inheiretance, useful RTTI, serialisation etc.). That's were Java can be useful and that's what Sun should be talking about.

    Also, if you really want game developers to use your technology, it's got to work on X-Box and PS/2. FACT. So get to it Sun, you've got plenty to sort out before you start nagging us with your marketing hounds.
    • Now I'm no fan of Java, and I totally agree with the fact that small devices with limited hardware capabilities should not be using Java, It's a total waste. And Java will never compete in speed with C/C++, Sure won't, but C++ doesn't compete in speed with C, and C won't compete in speed with assembly, but as computers get faster, the difference becomes marginal. If you wan't the most out of it, it has to be done in assembly, but that alone doesn't mean that doing it in assembly will automatically make it f
        1. C++ doesn't compete in speed with C

          This is simply not true. There is no *conceptual* reason for the same algotithim to be any slower when implemented in C++ rather than C. The only reason that this is ever the case is if the C++ compiler is "worse" than the C compiler (i.e. it produces less efficent code, as was true of most early C++ compilers). Or if the C++ implementation uses some of the 'slow' features of C++ (templates, virtual functions etc.), but to match *exactly* an existing C algorithim these
        • Good points you have there, but I mean as time goes by, and computers get better/faster in every aspect, more and more games (I'm not talking about the high end stuff, needing every last bit) will be written in Java? I just mean that, Say my stupid little app needs 1Megs of ram, and I really don't like the VM eating as much as it does. But Let's assume I have 1024 times more memory as I have now, I suddenly don't even notice the VM part of the usage. And at the same time I can enjoy all the benefits Java br
    • Mobile games are still an evolving area, and J2ME is already dying out in favour of C++ SDK's for specific platforms.

      You're completely high, but keep spreading the word, because it keeps others from entering the market, and means more profits for us.

      Next thing you'll be saying is that the N-gage has gotten rave reviews (it hasn't) that Brew is gonna take over (sorry, been three years, and they haven't done squat), and MS phone are the next big thing (despite companies dropping it).

      Yeah, you just keep i

  • it has been done ! (Score:4, Interesting)

    by elrolas ( 648079 ) on Wednesday June 04, 2003 @06:48AM (#6113688)
    A couple of years back I played a full 3D game made in Java and using GL4Java to get hardware acceleration: Arkanae (google for it, the site is still there somewhere). It was based on a Java 3D engine named Opale.Soya, which sadly has now disappeared (the original developpers are now doing the same in Python).

    It really convinced me that real 3D games are not just a pipedream. You can really get quite impressive results! And so now a friend and I are working on our own Java 3D engine. It's been a great learning experience sofar (I can recommend it to all 3D newbies).

    Anyway, you could say I'm a believer! :-)
    • Here is a link to arkane [tuxfamily.org] I only fiddled with it for a few minutes and I was impressed with the graphics.
      Java Web Start made the installation very easy, just a couple of clicks and no mental effort required.
      I ran this on a windows machine, I would like to hear from anyone who tried it on Linux. The only thing that stops my moving totally to Linux is the lack of games, so bring on more Java games!
  • someone would make a Swing C++ Library. That would OWN.
  • by metamatic ( 202216 ) on Wednesday June 04, 2003 @09:25AM (#6114722) Homepage Journal
    Show me three good games written in 100% Pure Java.

    As of today, I've only seen one decent application written in 100% Pure Java, and that's a text editor.

    My yardstick here is that the software has to be good enough that you'd never guess it was written in Java if you didn't know.
    • As of today, I've only seen one decent application written in 100% Pure Java, and that's a text editor.

      And that text editor can get pretty funky if you add in too many plugins... Don't get me wrong, I use jedit every day, but you have to be careful how many plugins you add...

      SWT is pretty interesting. It is the AWT replacement originally from IBM that is behind the Eclipse IDE. It beats the holy crap out of swing for stability and performance. Like I said, I'm a jedit user, not an Eclipse user, but that

      • Right, and SWT isn't Java, it's a Java interface to native code, albeit one that's been ported to many platforms.

        I know C++ and Java, but if I were writing a game, I'd probably use Objective-C, and not just because I'd be writing it on the Mac... Objective-C gives you dynamic object oriented programming with pretty much the speed of raw C. Profiling my 3D screensaver code, the Objective-C overheads were invisibly small. Plus it's less painful and ugly than C++. I'd like to say I'm surprised it's not more p
        • objective C is a decent choice for games. Quake was originally written for NextStep, IIRC. John Carmack released the source for the level editor, which was for NextStep (3.3, not OpenStep).
    • while not games, there are some pretty good uml modeling tools developed in java, ArgoUML comes to mind.
      • ArgoUML is a slow broken piece of crap. How is Java ever supposed to improve with people like you advocating shit like this. Here's a really really really simple test you can do with any GUI application.
        • Grab your mouse
        • Grab a stopwatch
        • Select a menu option, and press start on your stopwatch
        • Wait for the menu option to complete
        • Press stop on your stopwatch

        Did it take more than 0.1 seconds? That's too long! To be fair, my copy of Mozilla takes significantly more than 0.1 seconds to do something trivi

    • How about this [magicosm.net]?

      Granted, it's still being worked on, but looks pretty impressive- especially for java.

  • ...is garbage collection.

    Unless they develop some new GC system that lets you give specific time slices for processing, you'll end up with the occasional random crater in your framerate.

    I notice a second or two's pause while using IntelliJ's IDEA (a java IDE built in java), when the GC system wakes up and pokes around to free up memory. This is on a DUAL 2.6ghz machine, fer crying out loud. Nothing against the IDE, I love it... lots of cool little features to make life easier.

    So even if you have the be
  • This seems like a really bad idea. I mean... Java is slow, let's admit it. And it has never been the "write once run everywhere" language that it was cracked up to be.

    Games today already require serious power. Why would a developer choose to slow it down even further by adding the heavy-weight Java on top? (Or, I guess, on the bottom.)

    However, I do have one counter-point to my own argument. A few years ago a really kickass game came out that I (and many others) really enjoyed. It wasn't until I had
    • Apparently the renderer and a bunch of other parts were all written in C++.

      A guy I used to work with told me that, I don't know if it's true or not.

  • Dear Sun Microsystems STOP

    I have chosen to send you a message in telegraph
    form STOP
    This is a reflection of the fact that the technology used in your programming language STOP
    Java STOP
    Is roughly as useful as knowing how to operate a telegraph STOP
    Despite the fact that Computers have become roughly twenty times as powerful as when you first released Java, your bulky and resource abusing language is still not useable STOP
    Therefore, please at least make a claim of having revised and improved the language befor
    • Dear Sun Microsystems STOP

      Please let us know STOP
      When you finally decide to stop scotch taping code within code STOP
      and write Java from the ground up STOP
      Finally, please make sure STOP
      that the new Java STOP
      does not have the built-in security STOP
      of swiss cheese STOP
      (full of holes) STOP
      Until then, please stop with these news releases STOP
      which only bump your stock price up one Penny (Canadian) for a day STOP
      and release a real language that isn't the STOP
      electronic form of molasses STOP

      Sincerely,

      ME

      Another

"Why should we subsidize intellectual curiosity?" -Ronald Reagan

Working...