why isnt java been used to write major game titles?

Discussion in 'Programming & Software Development' started by MadOnion87, Mar 30, 2006.

  1. MadOnion87

    MadOnion87 Member

    Joined:
    Jul 10, 2002
    Messages:
    3,232
    Location:
    Old Trafford, Manchester
    why isnt java been used to write major game titles like bf2 or aoe3?
    i'm learning java at uni atm and i feel that its quite a nice language to use, i think i'm not exposed to the strengths and weaknesses of java though

    [edit] typo [/edit]
     
  2. Bradzac

    Bradzac Member

    Joined:
    Aug 17, 2003
    Messages:
    1,744
    3 words

    Java Virtual Machine

    Its good for portability between operating systems, but not for performance.
     
  3. GreenBeret

    GreenBeret Member

    Joined:
    Dec 31, 2001
    Messages:
    19,370
    Location:
    Melbourne
    Yep, that's right, it's because it runs like a 3 legged dog. Haven't you done Java 3D at uni? You'll see how slow and resource intensive it is even for simple things. :p
     
  4. huckleberry

    huckleberry Member

    Joined:
    Feb 18, 2003
    Messages:
    673
    Location:
    Melbourne
    That's not true, I've played arkanoid written in Java and it seemed alright!
     
  5. OP
    OP
    MadOnion87

    MadOnion87 Member

    Joined:
    Jul 10, 2002
    Messages:
    3,232
    Location:
    Old Trafford, Manchester
    but java can be compiled to machine code cant it?
    nah i havnt done java 3D
    i've seen/played quite a bit of games on pda and mobile phones and i reckon they run alright lol
     
  6. Drnrg

    Drnrg Member

    Joined:
    Jun 29, 2002
    Messages:
    2,101
    Location:
    Sydney
    ok now imagine running bf2 on your mobile

    i think i've made my point clear :)
     
  7. Bradzac

    Bradzac Member

    Joined:
    Aug 17, 2003
    Messages:
    1,744
    Yeh i'm sure those games are as intensive as say.. oblivion or bf2 too ;) :p

    In theory Java is great, and communism works! The truth is, although it's (apparently) a great language.. It's just not -great- enough. I have heard from some senior programmers from various large corporations (2 totally unrelated people on 2 totally unrelated accounts) that they don't expect Java to be around in 5-10 years time, or at least not have as large a market share. I'd take that info with a grain of salt however, but anything is possible.

    Going off topic a little:
    In a real world situation, .NET Framework 2.0 > Anything Sun has released to date by far (apart from OS portability).... and thats a fact :). Unfortunately not many uni's teach .NET, most teach Java. This mixed with the way too many Microsoft hating fanbois out there that still think it's cool to dis anything and everything MS releases really doesn't do any favours for the .NET Framework or the industry for that matter. (they also tend to think MS ripped off Sun with the .NET Framework, this is highly debatable and normally ends in tears either way)

    .NET Programmers generally get paid more and are in higher demand (because of the large amount of Java grad's released from uni every year). In my experience, having used both Java & .NET, I absolutely refuse to touch Java anymore. I've been building a 150+ page website for the last 5-6 months in ASP.NET and find it incredible! MS really have outdone themselves with this (finally!) Now Sun have a lot of catching up to do.
     
  8. Drnrg

    Drnrg Member

    Joined:
    Jun 29, 2002
    Messages:
    2,101
    Location:
    Sydney
    brazdac while your arguments are valid it's imporant to note that sun and java based technologies are always just a step ahead of microsoft, the fundamental difference being ms are interested in profit, while java is mainly open source work resulting in a great deal of innovation taking place.
    Dont get me wrong .net is an excellent platform, especially for large scale apps, but when it comes to the absolutely bleeding edge stuff microsoft have no chance.
    a few examples:
    semantic web (jena.sourceforge.net - based on java)
    hibernate, ORM database framework (hibernate.org - although recently made for .net as well)
    struts (http://struts.apache.org/)
     
  9. Bradzac

    Bradzac Member

    Joined:
    Aug 17, 2003
    Messages:
    1,744
    Please remember I was comparing the 2 frameworks, not the 3rd party support/applications developed utilising the frameworks ;)

    However the statement about MS being behind may be true with the 1.x framework but don't underestimate the 2.0 release ;)

    MS are interested in profit, true, but what company isn't? However the web edition of VS2005 is free for download.

    I'm not familiar with semantic web, struts or hibernate so perhaps you can explain a few things to me.

    Whats the link between Java and semantic web? It seems more related to XML then anything Java to me?

    As you said hibernate is already made for .NET

    And struts? According to wiki, http://en.wikipedia.org/wiki/Struts , it sounds a lot like the standard Visual Studio IDE. What is so significant about it? Maybe I'm misinterpreting something (more then likely, I need sleep)
     
    Last edited: Mar 31, 2006
  10. houseofzeus

    houseofzeus Member

    Joined:
    Mar 25, 2005
    Messages:
    3,195
    Location:
    St. Lucia, Brisbane
    Portability isn't exactly a minor issue when comparing .NET to Java. They are both as slow as molasses, but one is as slow as molasses on multiple platforms.
     
  11. OP
    OP
    MadOnion87

    MadOnion87 Member

    Joined:
    Jul 10, 2002
    Messages:
    3,232
    Location:
    Old Trafford, Manchester
    if java wont be around then what will replace it?
    talking abt ide, i like netbean more than vs2005 lol
     
  12. jay.tee

    jay.tee Member

    Joined:
    Jul 4, 2003
    Messages:
    496
    Location:
    Sydney, Australia
    well there is a community project to move the quake 2 engine to java i'm not too sure about the status of that. However, if you do a google search for john carmack's .plan, you'll find he has an entry where he gives java programming a go for games, and he pretty much rips into it and criticizes it heavily. He does think it's got potential though *shrug*.
     
  13. MetalSkin

    MetalSkin Member

    Joined:
    Sep 24, 2002
    Messages:
    856
    Location:
    Brisbane, Australia
    There was a flight simulator done in java by i think sun. i ran it once and it was quite impressive. obviously the 3d api that you can download for java isn't as extensive as opengl or activex but from what i have read it's quite impressive.

    That said I wouldn't think that java is the right app for game devepment as the end product is intermediate code that runs in a runtime. I know that some game engines use c# but I beleive thats for general coding and I suspect they use c/c++ for optimisation. The same could be said for java, if a decent game engine was available that supported java then it wouldn't realy make any diff if you used c# or Java. Remember java has JNI which allows c/c++ coding in a java environment. That's how the os specific optimisations work for general Java and the 3D API.

    Now the way phones are going, well wont be long before phones and pda's merge, maybe somehow involving flexible screens. PSP's and the like will never merge with phones as the company behind them want to tightly control what is available on them. I doubt if you would ever see Sony put a JVM on a PSP. Of course they may end up doing so, just like they ended up supporting mp3's on their hardware. but once you have a JVM on a wide range of hand held based devices with decent performance, then I beleive you will see an explosion of games that take advantage of the Gfx available on said handhelds.

    Remember the PSP, while a hand held device, has similar if not better performance than the PSOne. So it is quite reasonable to presume that the next generation of hand helds (in say 3 years or so) will have similar performance to the PS2. Maybe they will lag behind by 3 to 5 years, but if you have a whole heap of different vendors all running their own custom os's with different means of development, then something like Java is a common ground to write a game that will run on all platforms. That is why Java has exploded on the mobile market, easier than c/c++ to write for multiple platforms, the whole approach Java has taken for embedded environment with different capabilities for each peice of hardware is quite unique and very easy to use.

    Also .net is just a way for ms to try and retain control of windows development and get people tied into using the windows platform. If you spend millions on a software suite for the .net platform then I'm sure your gonna stick to the MS platform where it runs best. That said there was a recent news article about MS looking at supporting other platforms with .Net, obviously they realise the threat that Java is.

    An anyway, dont look at stuts you should be looking at Java Server Faces, and for that matter Portlets. Some may be impressed with .net claiming that they have worked in java and .net, but it appears to me that they dont know half of what is going on in the java world.

    Btw, this is a 'Why isn't java used for major game titles' thread, not a lets compare .net to java in a business environment, which is the main focus of .net and j2ee.

    Oh one other note, when the op mentioned major game titles, i presumed PC based, and in that case then the major game libraries are c/c++ based with some supporting c# as thats the major development enviroment in a Windows world that provides the best benifits for optimisation. also a lot of the engines have received heavy investment, you dont just throw that away on a whim to change to something like java which currently is imature for this type of windows development.

    If you talk about platform game titles, then your tied to the development enviroment that each vendor provides. the vendors are very controlling about what you can and cannot do for each platform. just look at sony's continued effort to stop homebrew!

    :edit: I'm a senior architect working for a big firm and I would say that you cannot predict what will be occuring in the business world in 10 years time. 10 years is a bloody long time in that arena. But as for Java loosing market share or dropping off, well i find that very unlikly. Many companies still have massive libraries of Cobol that is 20+ years old. when you invest millions in software development you dont throw it away unless there is an extreamly good reason. I think you will find that java is here for a very long time.
     
    Last edited: Mar 31, 2006
  14. chip

    chip Member

    Joined:
    Dec 24, 2001
    Messages:
    3,920
    Location:
    Pooraka Maccas drivethrough
    For speed, games are written to support specific hardware, e.g. DirectX 9 or OpenGL hardware graphics accelerators. The whole point of Java is that it's hardware independant, the compiled bytecode is designed to be run by any JVM on any hardware, so you lose any benefits of designing for specific hardware.
     
  15. MarkWasabi

    MarkWasabi Member

    Joined:
    Oct 29, 2002
    Messages:
    135
    Location:
    Brisbane
    These arguments about Java being slow are usually as ill-informed as the sort of knee-jerk dismissals of .Net because it's by Microsoft. Java got a bad name a long time ago because the early virtual machines, apparently, were quite slow, but more modern studies have shown that speed is quite similar most of the time. Some even argue that it's slightly faster in some applications. For example, the JVM reserves a whole lot of memory so allocating memory in Java doesn't need to ask the OS to find free memory. I haven't looked into these claims (I think they were published by IBM recently, in obviously they have an interest in promoting Java). Personally I wouldn't argue that Java is faster in many cases, but it's really not as slow as most people think.

    Anyway, the other issue that's commonly cited (as in this thread) is the performance of libraries such as Java 3D. I don't think any serious developers actually use Java 3D any more. A much better route is to use OpenGL. It breaks the 100% Java philosophy because it uses native calls to the operating system, but if you're after performance (which you are when doing 3D stuff), then it makes sense. Seeing as the intensive graphics computations are then done by the same hardware that they would be in applications written in other languages, you'll find that Java can be just as fast. And as for user interface, I think the standard Swing/AWT interface is slow and looks crap, so I use SWT, which uses native widgets. Java + SWT + OpenGL = cross-platform apps that look as good as native apps and run just as fast.

    That's just my experience anyway. I got into Java development in a recent project for Macs where I only had a Windows PC to work on. The resulting app works really well, has a lot of fast 3D components, and no-one can tell it's Java. Yay for me.

    That's just my opinion. I was sceptical of Java too (it seems to have quite a bad reputation), but it turns out that stigma is from a long time ago and it's really quite good these days.
     
  16. Luke212

    Luke212 Member

    Joined:
    Feb 26, 2003
    Messages:
    9,999
    Location:
    Sydney
    Sorry but major games titles are a wholly business environment! They dont do it for love you know! If you were talking about little hobby games then I would say Java is rampant in that segment.

    Nevertheless, I believe IL-2 Sturmovik, a highly successful and graphics intensive flight sim, was written to at least some extent in Java.

    If I were to write a major game title in Java, I would use java for the game logic, and make calls to a separate native graphics system that runs with DirectX 9.0C. But I just wouldnt bother really.

    Managed DirectX is the future of games development, but I dont think its quite ready yet.

    So true. The government, especially, still runs 20 year old databases - and the word Cobol sends shivers down my spine.
     
    Last edited: Mar 31, 2006
  17. MetalSkin

    MetalSkin Member

    Joined:
    Sep 24, 2002
    Messages:
    856
    Location:
    Brisbane, Australia
    Yes and you gain the benifits of not having to port the game to other platforms. thats why java is used extensivly for game development in the mobile platform. Last time I checked 80% of phones support a JVM (that was a figure from last year). And the prediction was that it would increase.

    There's more to games than just spead, there is ease of development, ease of porting to multiple platforms (if required, which it is for mobile market), development timeframe, etc, etc, etc.

    also note that not all games have to make extensive use of advanced 3D graphics such that you need to upgrade your puter to run it (aka Doom 3, BF2, etc). RTS games dont realy need 3D (although i know some are using it and I'm still not sold on that it adds to the game), any form of city building games (again same comments as for RTS) and any of the old style platform games (eg puzzle games and the like).
     
  18. s.Neo

    s.Neo Member

    Joined:
    Oct 23, 2002
    Messages:
    398
    Location:
    Darwin, NT, Australia
    MarWasabi is dead on the money. Java 3D is quite slow, but you can use Java and OpenGL for Graphics. As both Java and OpenGL are cross platform, you don't lose compatability, but gain performance.
     
  19. Luke212

    Luke212 Member

    Joined:
    Feb 26, 2003
    Messages:
    9,999
    Location:
    Sydney
    As far as cross-platform compatibility is concerned, there is nothing technical stopping .net from being as cross-platform as Java.

    They are both packaged and distributed as Interpreted Code. .net is translated into MSIL and Java is translated into byte-codes.

    Both .net and Java compile at run-time, and the only difference is .net compiles slightly ahead of time, whereas java compiles more on the spot.
    So, technically they are very similar.

    Practically however the .net API does not have as many (or any? i havent looked too hard) pre-made controls that are designed for cross-platform use. If MS wanted to, then they could provide a uniform library that we could use for all platforms. We may be waiting a while because im sure it must be low on their list of priorities.
     
  20. MetalSkin

    MetalSkin Member

    Joined:
    Sep 24, 2002
    Messages:
    856
    Location:
    Brisbane, Australia
    I can't remember where but there was a recent news article about MS supporting the .Net platform on other OS's, from memory they were talking about using other firms to develop it under Linux. I think it included Solaris. Oh, and this included using their new GUi features that they have developed for Vista. Hmmm i think they wanted some of the lnf from vista to run on the other OS's, but not 100% certain. dont know how this would apply to directx.
     

Share This Page

Advertisement: