Java on Playstation 3

I didn’t do any real benchmarking, but emulating and displaying one frame of pacman takes about 3ms (it sleeps 13ms every frame to make it run at approximately the correct speed).
The good part is is that it also scales the image to 1080p without any apparent speed loss.

Regarding memory, I have the feeling that there is a memory limitation (I’m guessing that’s the reason the heavy to emulate games don’t work), but I’m not sure what that is exactly. I have to do some more testing.

came across this tutorial for installing the BD-J SDK, might be useful?
http://www.ps3news.com/forums/ps3-guides-tutorials/how-install-minimal-bd-j-sdk-ps3-100246.html

Thanks, but I was using that already to get JEmu2 to PS3 :slight_smile:

I’ve done some more testing and as it turns out, BDJ on PS3 is not a real performance beast after all…

For example, the Sega Master System emulator runs at full speed, but barely, where I can easily run a couple of them at once on my PC. The pacman arcade emulator is a really optimized-to-the-bone driver so that was why it was running quite fast.
A (very) wild guess would be that BDJ on PS3 runs at a comparable speed to, say, a JRE on a 300-400MHz PC.

There also is another issue that I’m encountering: BDJ’s framerate seems to be 24/25 fps. Even though the emulator renders 60 frames per second, I’m not seeing all of them actually displayed, so things don’t appear as smoothly as they do on a PC. This might have something to do with BDJ having to sync with an actual Bluray video, but I’m not sure.
I also didn’t yet figure out a way to do proper vsyncing, so there’s quite some visible tearing especially in scrolling games.

On a more positive note, image blitting seems quite fast and especially scaled image blitting seems even faster than on my PC.
These emulators render everything in a raw pixel array and your average game typically blits images, so I still think BDJ on PS3 is quite usable for games, if not all types of games.

Then, for the moment, I assume it would be stupid to invest some time to port a FPS in Java to PS3, am I wrong?

I got Alien Flux running OK on 300MHz Celerons so that’s promising I suppose…

Cas :slight_smile:

I suppose you still can do a lot with the available performance, but the biggest problem of all is the controls: You only have directional buttons and 2 action buttons available, and the worst part is that java only registers one directional button at a time (so diagonal movement is just impossible)… :frowning:
It can however register a directional button and an action button at the same time; it seems the restriction is only with the directional buttons.

Maybe something like Titan Attacks could work on PS3, but not any other game from puppygames. An FPS is not even worth considering I guess.

300MHz is easily fast enough to do Quake-2 like performance in Java I think. Only way to find out is to try it…

Cas :slight_smile:

Sigh, that sounds like J2ME all over again =/

Embedded Java==big mistake.

Maybe a low-res software-rendered Quake2-like thing is possible, but even if someone would be interested in such a thing, I don’t see the point when the end result would be near unplayable anyway because of the controls.

[quote]Sigh, that sounds like J2ME all over again =/
[/quote]
Exactly. BDJ is nice for many things but for games the restrictions seem very J2ME-like indeed.

If you have an access to PSGL, it is possible, otherwise it is not possible and personally, I won’t spend some time in doing it if I’m not sure I can use PSGL. Moreover, TUER is obviously worse than Quake 2. Maybe the creators of Jake2 (or the creator of Undead Arena, Night Squad, Futuristic Arenas) would have a chance to do a Quake2-like in Java for PS3.

Well, quite, it all does depend on having some sort of GL access.

Cas :slight_smile:

According to wikipedia BD-J is based on Java 1.3 :o, which rules out JNI.

But should be possible to create slower puzzle games like Monkey Island, using FMV backgrounds and stuff. Theres already that game called Dragon Lair that runs on BD-J.

1.3 doesn’t rule out JNI, but it does rule out Buffer access which is a bit of a pain.

Cas :slight_smile:

[quote]According to wikipedia BD-J is based on Java 1.3, which rules out JNI.
[/quote]
No, JNI was there long before 1.3 (IIRC it was there since the beginning?)
Maybe you’re confusing JNI with native buffers (which were introduced in java 1.4, and heavily used in LWJGL)?

[quote]If you have an access to PSGL, it is possible, otherwise it is not possible and personally, I won’t spend some time in doing it if I’m not sure I can use PSGL. Moreover, TUER is obviously worse than Quake 2. Maybe the creators of Jake2 (or the creator of Undead Arena, Night Squad, Futuristic Arenas) would have a chance to do a Quake2-like in Java for PS3.
[/quote]

[quote]Well, quite, it all does depend on having some sort of GL access.
[/quote]
Has anyone been listening? ::slight_smile:
Talking about GL access and first person shooters is really irrelevant without even having proper controller support.

I think the bottom line is that BDJ is obviously not meant for any serious gaming. You can squeeze some game play out of it, but only if it doesn’t depend too much on proper controls. Like board games, casual games, card games, that kind of thing.

For more serious gaming, I guess the way to go would be to get OpenJDK running on PS3 with the devkit.
Who knows, a great java game that would make a great fit for PSN might get Sony interested enough to support the idea of java by donating a devkit to whoever is going to get OpenJDK running on PS3? It would at least be good propaganda for Sony against the wild spread idea that PS3 is too hard to develop for.
I still think puppygames would make a really great fit on PSN and would probably do great there… And perhaps Tribal Trouble too. (hint hint ;))

Until then, it’s probably a better idea to experiment with Linux and the IBM JRE to see what java on PS3 can be capable of.

yes but what is the showstopper which prevents popper controller support? Is it restricted by design (api) or is it just a RFE away from better controller access (you said something like only one axis at once…)?

I can think of harder to solve problems :wink: (like porting the OpenJDK VM to the PS3 in a master thesis)

yeah meant buffers of course ;D

This is an interesting idea, if you used a stripped down version of linux (without a DE), just with Xorg, IBM JRE (OpenJDK?) and maybe software OpenGL with MESA, might be quiet powerful and capable gaming machine. Some of the benchmarks running linux on PS3 roughly compare it to a G5 PowerPC running at 1.6GHz. No sure how much of that power will be zapped up by the software OpenGL but should be enough for games like the puppygames right?

Nah, our games absolutely burn fill rate like it was cheap.

Cas :slight_smile:

Uh, as far as I know the BluRay spec is pretty much nailed down. Even minor changes aren’t going to happen. What are you going to do - offer free replacements for all BluRay machines already in people’s homes?

I fail to see why everyone is so obsessed with trying to run something on a PS3. Getting linux on it is far too awkward and painful and only very few will go to the effort. Getting them to jump through additional hoops to run your game is even harder. And the BluRay method is so crippled it’s basically useless and isn’t going to change any time soon.

Seriously, let it go people. ::slight_smile:

no this will happen automatically, bdj life isn’t even yet available. Even my 8 year old satellite receiver has a automatic firmware update. With network connection this should be further simplified. Wait 2 years and you won’t be able to distinguish between a bluray player and a internet connected multimedia pc.

I am no expert in that topic but I’ve read (or was it a podcast?) somewhere that BDJ is build of profiles which are designed to be extended and mixed in future based on the capabilities of the device which sounds for me similar to J2ME.

I am interested in this topic only form technical perspective anyway, because I am skeptical that java gaming would profit from consoles since it even doesn’t shine on desktop while having best conditions on that platform.