Java on Playstation 3

The thing with BDJ is that it’s not a gaming platform. By chance some buttons of the PS3 controller double as a bluray remote, and by chance it’s possible that you can run bluray with BDJ content from a USB device. It might well be possible that Sony will disable that feature in the next firmware update because it also opens up possibilities for piracy.

So even if Sony feels that it should lift BDJ’s limitations of reading the PS3 controller (and I don’t see why Sony would feel that need: there’s hardly any BDJ content available on bluray, and the PS3 already has the best/fastest BDJ implementation on the market), then what we have in the PS3 with BDJ is still a bluray player instead of a games console and you simply can’t expect too much of that.

A full JRE on ‘real’ PS3 on the other hand, for that I see possibilities. Especially for PSN type games, java is really the perfect fit.
And I’m sure it’s not as huge a deal to get some java running on PS3 as many people seem to think, even if it would only be GCJ or something. I’m pretty sure Sony would give some support in somebody’s efforts to get something going using an official devkit. Who knows, they might even like the idea of Java on PS3 enough to donate a devkit to any serious attempt for getting a JRE on PS3.

It’s just that nobody even tried.

[quote]it even doesn’t shine on desktop while having best conditions on that platform.
[/quote]
The PC is mostly a platform for casual browser gaming, and java is simply outdone by flash in that area for many reasons. And there’s probably too much money involved in the big budget AAA PC titles to consider investing in a new java toolchain instead of going the tried and successful C++ route.
On PS3 otoh, people happily download and install gigabytes of pure gaming content from PSN. I’d say, the potential of java on PS3 might be even bigger than java on PC.

I agree with you, sorry if I was not clear about this point.

I wrote to a YDL responsible, hardware acceleration is not available under Linux with PS3. Using OpenJDK or IBM JRE might solve the problem of proper controller support but not the problem of the lack of hardware acceleration. Nevertheless, if there is an access to JNI and if someone knows how to modify Linux to access to PSGL on PS3, perhaps it is possible to adapt JOGL-ES to work with PSGL (it seems very complicated :(). Finally, I doubt that casual users will accept installing Linux to play a game.

There’d be absolutely nothing wrong with writing completely traditional code for PS3 and using an embedded JVM, you know… all you need really is some JNI tweakery to get access to PSGL and the input stuff. LWJGL would be just great :wink: Then you’d just have to compile a skeleton JVM from OpenJDK using the ordinary PS3 devkit. Thing is you’d not really want to bother because a PS3 devkit is not for hobbyists… and that’s where XBox and XNA are pwning Sony and Sun utterly.

Cas :slight_smile:

Maybe what should happen is sun should make there own Java gaming console :smiley:

With beer. And hookers.

/bender

LOL ;D

Now what could be interesting is this:

  • A Sony-Sun collaboration in creating java based devkit for PSN type games for, say $100 (IIRC, MS XNA devkit for X360 costs something like 99$?)
  • This devkit would include a bootable CD with a JVM+JOGL+JOAL+JINPUT to test on. You simply do development on a PC.
  • Sun and Sony could get a bit of investment back through a share of the devkit price.
  • Sony would benefit from having an answer to MS’ cheap XNA devkit and having an answer to the belief that PS3 is too difficult to develop for.
  • Sun would benefit from more java exposure. They could even squeeze in a few logo’s when the JVM is started :slight_smile:
  • This won’t at all be competing with the ‘real’ devkit since it’s a completely different thing with a different purpose. There’s no way you’d be creating GTA4 using java on PS3, and games created on this devkit can only be sold through PSN.
  • If games are not sold through PSN, they can still be played using the devkit (which might be a reason for non-developers to buy the devkit).

There are already 2 JVMs running on PS3, so how hard/expensive can it be?

Just thinking out loud…

But it is a major problem! If we can’t get access to PSGL through C code, how can we then imagine to write a binding for it? ???

Of course you can get access to it! How do you think PS3 developers write games??? What we’d like to see is basically an embeddable VM implementing just enough stuff to run - something like the one I used to use for my games, was about 2.5MB payload compressed with LWJGL. And LWJGL probably a much better fit than JOGL due to JOGL’s extra complexity dealing with AWT (which PS3 doesn’t need implemented!)

Cas :slight_smile:

something like the NetBeans OpenGL Pack only with up to date sample projects? ;D

As Cas said, it’s not problem at all. It’s only a problem when running Linux on PS3, but that’s not what I’m talking about. Besides, it’s not really realistic for Sony to support Linux to compete with native PS3.

[quote]And LWJGL probably a much better fit than JOGL due to JOGL’s extra complexity dealing with AWT (which PS3 doesn’t need implemented!)
[/quote]
I absolutely agree. I mentioned JOGL and friends because from Sun’s POV that probably makes more sense to support. BDJ already has AWT implemented (albeit without widgets).

This bootable CD would be for PS3 of course :slight_smile:
NetBeans OpenGL Pack with samples would be neat to deliver with it though for PC, to get people started.

JOGL-ES is closer to PSGL than LWJGL. Under the “Graphics/Video” section of “Linux Kernel Overview” I found this:

"PS3 has a powerful graphic processing unit with high speed host connection. The GPU is connected to both HDMI and AV multi interface. Although the GPU is connected directly to CBE, no direct access by guest OSes to the GPU is allowed currently. Video mode/format setting is also the role of AV setting driver. PS3 Linux fb driver calls AV setting driver to setup video modes.

Currently X server uses virtual frame buffer to render its image. No hardware acceleration is supported under Linux. See the description above section."

If it is easy to access to PSGL, why don’t you give a try?

Busy trying to make money, that’s why! I don’t have time to fart about doing pointless altruistic things that have no commercial value.

Cas :slight_smile:

Under native PS3 it’s probably not at all difficult if there were a good JRE.
But while there is a JRE on Linux, there’s probably not even an OpenGL driver available under Linux, so under Linux it’s not easy, if even at all possible without Sony’s consent.

The main point is that (like you mentioned) it is not even allowed under a guest OS such as Linux, so there’s no point to even try except for the sake of hobbyism and hackery.
A good official solution supported by Sony would be needed; a Linux solution is not usable as long as Sony (quite understandably) doesn’t allow it.

It doesn’t need even to be supported by Sony; it just needs to be a straightforward port of OpenJDK running natively on PS3 as an embedded VM. Whereupon the C++ component of your game simply becomes a JNI call to invoke the JVM and start running Java code. And a LWJGL port to PSGL to take care of the other stuff.

Cas :slight_smile:

[quote]It doesn’t need even to be supported by Sony
[/quote]
Maybe ‘supported’ was the wrong word. What I meant was more like ‘allowed’, or ‘supported’ like running other kinds of middleware under native PS3 is also ‘supported’, not necessarily the JVM itself has to be supported.