Monogame goes PS4, why not jME?

If monogame can port their engine to PS4, we should be able to do it, Right?

Source : http://www.monogame.net/2014/03/23/monogame-for-playstation-4/

Does anyone know anything about how they got it? or can we will be able to get it?

It’s on C#, jME is on Java.

Yeah, you’d have to convert java to C# and GLSL to whatever Sony calls their language atm. There is tools to do that though, so you could try to get it to work.

I thought PS4 sdk is C++ only. Is it wrong?

@iamcreasy said: I thought PS4 sdk is C++ only. Is it wrong?

I guess the normal sony sdk is C++, yeah. Its a normal computer though, so you can get many toolchains to work. Probably even avian or something similar, the main problem is the GPU language. For C# there is an existing toolchain though afaik

I think the question is really, “If the monogame community can get their engine supported on the PS4, why can’t the JME community?”

The PS4’s OS is FreeBSD based and developers have access to standard OpenGL calls. The PS4 shader language, PSSL, is very close to GLSL, but not exact, so there would have to be translations. It could potentially be automated.

With root access to the OS, it would probably be trivial to install the JRE and run a JME based game.

Sony has the PS4 locked down though, and I doubt they would allow the installation of a JRE to support JME games. I also doubt they allowed installation of the mono runtime to support monogame.

Most likely monogame is naively compiling C# directly to x86 binaries that run on the PS4 without the need for a mono runtime environment. I know the mono compilers support this option.

Something similar would have to be done for JME, compiling directly to a native binary. I believe their are java compilers that also so this.

1 Like
@aaronperkins said: The PS4's OS is FreeBSD based and developers have access to standard OpenGL calls.

Can you cite a source for this? Everything I’ve read says their graphics API is custom. Which if an engine is written at a higher level (like Unity) is no problem to support.

When your engine is a thin wrapper over OpenGL then it is more difficult… though presumably an OpenGL wrapper could be written over their API. The GLSL issue would still be there.

Hmmm you can google many people talking about it but I can’t find any official source. Sony is very tight lipped about their development environment.

Most people believe there are standard OpenGL drivers available with some custom Sony extensions on the PS4. This could all be false rumors but I doubt it. It makes sense considering the standard x86/AMD GPU platform.

I did find that the mono runtime is actually available on the PS4… It’s on their list of used open source software.

http://www.scei.co.jp/ps4-license/

Kinda ironic Sony is using a runtime environment originally designed by Microsoft and re-implemented by the open source community.

@aaronperkins said: Hmmm you can google many people talking about it but I can't find any official source. Sony is very tight lipped about their development environment.

Most people believe there are standard OpenGL drivers available with some custom Sony extensions on the PS4. This could all be false rumors but I doubt it. It makes sense considering the standard x86/AMD GPU platform.

I did find that the mono runtime is actually available on the PS4… It’s on their list of used open source software.

http://www.scei.co.jp/ps4-license/

Kinda ironic Sony is using a runtime environment originally designed by Microsoft and re-implemented by the open source community.

When I looked for stuff recently, all I found was pre-release speculation posts… some including “will support DirectX”. I guess until I someday get a dev kit, I’ll never know for sure. :wink:

@pspeed Its a lot easier now : http://www.develop-online.net/interview/land-of-the-indies-ps4-self-publishing-explained/0117690

“Sony : Developers can do it even before they write a line of code. They can send it in [Their concept] and then within a week they get a response from us. Going through the process is very straightforward."

Now after reading this it felt - if it’s that easy, how hard can it be to have java games running on ps4. right? If the only barrier is to compiling to native code.

and more from here : http://www.thirteen1.com/2014/03/26/sony-supporting-monogame-will-help-ps4-beat-xbox-one-for-indies/

“Developing for the PlayStation 4 is a non-exclusive deal, which should ultimately work in Sony’s favour. You’re free to push your game out on other platforms, but if you pledge either full or timed exclusivity and Sony like what you’re doing they’ll give you access to the ‘PubFund’ and provide you a cut of royalties in advance to help develop your game. This works from one game to the next, so no long term contracts needed on a per-company basis. Developers can also market their games for free on the popular PlayStation blog, and get to keep 100% of their IP.”

@iamcreasy said: @pspeed Its a lot easier now : http://www.develop-online.net/interview/land-of-the-indies-ps4-self-publishing-explained/0117690

“Sony : Developers can do it even before they write a line of code. They can send it in [Their concept] and then within a week they get a response from us. Going through the process is very straightforward."

Now after reading this it felt - if it’s that easy, how hard can it be to have java games running on ps4. right? If the only barrier is to compiling to native code.

Neither of your posts seems to have anything to do with OpenGL support… which is what we were talking about.

They also don’t directly speak to getting the JVM on it but I suspect that is the “easy” part. One could always compile it to the PS4 just like fo iOS. The OpenGL thing will be more critical.

What I was trying to say was what monogames does with their shaders. They seem to support GLSL and since PSSL is similar to HLSL, I guess there is some automatic conversion going under the hood. I don’t know why I get the feeling, but it doesn’t seem daunting.

@iamcreasy said: If monogame can port their engine to PS4, we should be able to do it, Right?

Source : http://www.monogame.net/2014/03/23/monogame-for-playstation-4/

Does anyone know anything about how they got it? or can we will be able to get it?

It is absolutely technically possible, it’s just more work than any group has put into it.

PS4 is a C-based environment. The Mono/Xamarin team has focused on getting C#/CLR apps running inside of C environments on game consoles, iOS, Android, etc.

RoboVM is the most popular group doing the same thing in the JVM world, but they only officially target iOS. It’s completely technically possible to make a jME -> RoboVM -> PS4 development chain, but that is more work than the typical hobbyist is going to do, and there isn’t any moneyed interests willing to finance a team to do that.

1 Like

I’ve just stumbled upon this : http://www.mono-project.com/docs/about-mono/languages/java/

From the page :
“Mono is able to run Java code side-by-side with .NET as well as having Java and .NET object interoperate with each other. This is done with IKVM the Java VM implementation that runs on top of .NET and Mono. IKVM was developed by Jeroen Frijters for the .NET Framework. Zoltan Varga ported it to Mono and fixed the Mono runtime to support the features required by IKVM. The class library runtime for IKVM is the GNU Classpath, which is rapidly advancing but not entirely complete. IKVM is fully supported by Mono and its part of the standard Mono package distribution. As it stands today, it is able to run popular applications like Eclipse and Derby.”

Don’t understand all the technicalities, but felt it might add to the discussion.

1 Like

Compiling the java code for the PS4 is, as was said multiple times, the easy part.

I am not advanced with Shaders but what Do they change that makes it difficult?

I mean changing the names like gl_FragColor to sony_colFrag should be easy so there should at least be simple Shaders possible?

Or is the Problem that there is no documentation available?

There is no OpenGL on PS4… so the entire renderer would have to get rewritten I guess.

Also, translating GLSL to some other shader language is likely WAAAAAAY harder than your simple example. Semantic differences will kill you. In the end, I don’t think you get around writing custom PS4 shaders… which means we’d need at least PS4 Lighting and PS4 Unshaded shaders.