Platform Independent Gaming? 505
klocwerk writes "At the game developers conference, Sun is releasing a white paper on their new "Java Games Profile." Their ultimate goal? To have one CD you could pop into an Xbox, a PS2, a Windows machine, or a Linux machine, and play the same game on them all. If they get full support for it I can finally get rid of that windows gaming partition!" Sun's got an article on their site describing what they hope to accomplish.
Nice Idea ... (Score:1, Interesting)
Read the article... (Score:4, Interesting)
Certainly not all. Games like Escape Velocy Nova [ambrosiasw.com] that are Very popular (and only available on the Mac) would work great even with the elegid java performance hit.
Sure, Sun has a lot of work to do before this is a working solution... but you are fooling yourself if you think it can't be done.
--T
Re:Fast language like C++? (Score:3, Interesting)
Now i like java its a very nice language (although i havent really done much with it yet).
I still think its too slow. ive tried 1.2.x, 1.3.1 and 1.4 and i havent really noticed any performance improvements. - yes i can run any java program fine on my duron 900 at home with 512Megs ram but on my P 233 / 64MB laptop everything is dog slow.. even just javac Vehicles.java && java Vehicles takes at least 1 minute to spurt out text (in the console) about how many wheels each vehicle has.
and trying to run something like jedit (this is a really nice program btw) is painful!
now is there something wrong with my setup?
because if not i dont see java as a viable language for writing games.(except maybe something like xscavenger).
Possible, If History Repeats (Score:5, Interesting)
But the popularity helped to fund the technology improvements and the gaming industry took legs.
Now, we play games with millons of colors in 3D spaces with near-virtual reality situations. It only took the maturity of the technology to make it possible.
Would Java game playing require a new technological paradigm to work? Sure--it can't work under the current model. When games first appeared in the 70s on TV, there was NO significant competiton. Today, the competition is too fierce for a new idea to compete directly and the performance of current games easily exceed what platform-agnostic programming might offer right now.
But then, Atari's games started with a handful of very large pixels and simple game premise. Nobody thought a video game would point the way to what has become.
For Java to work, it would need to take on a new competitive edge. I would suggest taking the open-source approach to the commercial side. Make a MAME-like, open source game player (this may take care of the hooks needed for platform performance) that's freely distributable and extensible.
Next, sell games. Some may be free, others not. But ALL could be placed on any OS and platform desired that supports Java. You would think that we have the ability to improve Java through hardware (such as a PCI Java "processor" expansion, also available for all platforms) or even let processor evolution handle it.
I'm not a pro programmer, but Java's general specs could be made to work, if companies like Microsoft (who are so profit driven to stifle competition) don't intervene. It would have to take baby steps.
QuickTime, Apple's movie/multimedia technology, started with movies the size of a postage stamp and was the first viable movie technology for computers. Today, it allows you to watch "Star Wars" trailers (don't start with the "Pro" version stuff--that's just Apple being a business). What could the future hold tomorrow if the playing field stays fair, although not necessarily even?
Re:This will never fly (Score:3, Interesting)
From the original article...
It sounds like Sony (developer of the PS2) is interested after all. Perhaps it's for their games consoles [playstation.com], perhaps it's for their cell phones [sonyericsson.com], perhaps it's all hype, but they do seem interested.
Re:Where are the facts? (Score:4, Interesting)
Except that very few Java VMs emulate processors anymore. Most Java VMs these days are actually compilers in disguise. They simply take the Java byte code as input and compile it to native machine code then execute it. Due to the fact that it knows the exact details of the machine it will run on at compile time, it can actually produce faster machine code than C.
With the massive advances being made in JITC technologies and with hardware acceleration for Java (see Mac OS X), there is a lot of reason to think that Java can not only compete with C/C++ in the game market but actually beat it. Remember that critical sections of games are generally written in assembler, not C/C++ and this can still be done with Java.
Re:Why bother? (Score:5, Interesting)
You're a schmuck. Assembler IS machine code. There is *no* difference, other than one is written as binary, the other as text.
The guy was clearly pointing out the falacies told in the past. Actually the average code turned out by a good C++ compiler these days is better than that turned out by good assembler hackers for all but a handful of very compact problems - crypto algorithms and graphcs being the principle ones.
The problem with the 'they laughed at Gallileo' approach is that although Java is eventually going to catch up with C in performance it won't be on the basis of the JVM approach. The problem with the JVM is that you don't have enough information to do really good optimization and generating that information is not the kind of thing you want to do just in time.
When it comes to cross platform gaming JVM is not a credible platform and no amount of Sun hype will make it so. .NET on the other hand does provide the optimization hints needed to do a good code generation phase.
Sun is really playing into Microsoft's hands here, this is one ground where performance is the absolute.
From a technical point of view Suns approach makes no sense for games consoles because the whole point of a console is that there is no O/S layer. That is how a machine with pretty tepid hardware performance can outpace a high end PC, there are no abstraction layers between the program and the hardware. It is like writing code for an early micro-computer, no O/S between you and the hardware.
More generally Sun's approach s clueless because they appear to not understand the way the gaming market works. The manufacturers deliberately introduce incompatibilities between players in different markets. Game console games are typically $15 to $20 more expensive than equivalent titles because the console companies charge for access to their platform. Sony and Sega don't want you to be able to play cross platform games and they will fix the hardware to stop you.
Xbox is kinda odd in that early reports stated that the hardware was open and there were no fees. Microsoft's interests are to have as many games on their platform as possible. But I doubt they would provide Sun with any help for their current scheme.
That leaves the PC platform running either Windows or Linux. There is absolutely no need for a virtual machine translation layer when the only platforms are i86.
While Sun goes on about the evils of Microsoft the only party that would benefit from this scheme would be Sun who would be able to market the SPARC as a games chip.
This sounds familiar (Score:3, Interesting)
-adma
Re:Fast language like C++? (Score:1, Interesting)
C++ and Java have early binding, static vtable based dispatch.
Java's object model is a strict subset of C++'s, and has very little to do with Smalltalk's. It adds reflection, but it is done as a library, seperate form the language itself, but this could be added to C++ without changing the object model at all. In fact, you could do it (hackishly, and non-portably) without changing the compiler by using debugging info.
You, and many others, have been mislead by Sun's marketing.
Re:Fast language like C++? (Score:3, Interesting)
Hmmm... when you say C++, are you referring strictly to the object oriented portions of it (e.g., classes and such), or are you also including the standard containers (e.g., ANSI C++ strings, lists, vectors, maps, etc.). I would think C would give you the kind of control and performance required (at the sacrifice of portability, but if so many major open source apps can compile under Win32 and *nix and be written in C, anything is possible.) C code, encapsulated in C++ classes will give you the benefits of OOP with little gain in overhead. But I think if you were to use the C++ containers and other built in objects and methods, you might take a significant performance hit, even if these tools are optimized in your development environment (e.g., Visual C++ has some super-fast way of implemeenting the string class). I'm not sure if C++, using all of this, is really a fast language.
Of course, it would be faster than Java, but it may not be the fastest, most portable, option out there.
While we are on this subtopic, for anyone using MSVC++ 6.0, can you get <list>s to work? Every time I've used them, I've gotten programs which refuse to run correctly. Of course, g++ does not have such a problem LOL.
Re:This can only work for some games (Score:5, Interesting)
Re:Believe it or not, Java is improving (Score:3, Interesting)
a virtual machine can't be as fast as native code, but they're definitely getting close
Bzzzzt....incorrect. Read up on Hotspot. A VM can certainly be faster than native code, particularly in long running iteration-intensive situations. Can anyone say game engine?
All in all an interesting idea, the problem Java will have is getting the stuff to the screen - but there are decent gfx libs coming along. Can't wait