Cafu on OUYA?

Get help with installing and running the Cafu Engine here. This forum is also for general questions and discussion of all aspects regarding the Cafu Engine.
Post Reply
MonoAlithica
Posts: 17
Joined: 2012-02-07, 13:06

Cafu on OUYA?

Post by MonoAlithica » 2013-02-09, 23:13

Innocent question:
Can the Cafu engine be compiled for and run on the OUYA game console, running Android? Could the code be ported and compiled on an ARM platform with some tweaking or slight re-factoring? Or will things have to be changed significantly?

I'm interested in developing for the OUYA and, as much as I'd love to use Unity, I'd honestly prefer Cafu. But I'm no systems programmer so I would like some idea about the sheer amount of work required for such a port. I bet its a lot ¬_¬

Thanks
User avatar
Carsten
Site Admin
Posts: 2160
Joined: 2004-08-19, 13:46
Location: Germany
Contact:

Re: Cafu on OUYA?

Post by Carsten » 2013-02-10, 10:46

MonoAlithica wrote:Can the Cafu engine be compiled for and run on the OUYA game console, running Android? Could the code be ported and compiled on an ARM platform with some tweaking or slight re-factoring? Or will things have to be changed significantly?
Good questions. It seems like the challenge is not porting Cafu to OUYA, but porting it to Android first. I would very much appreciate a port to Android, but to the best of my knowledge, this has not been tried yet. Therefore, the required amount of work is hard to predict, but while I think that it won't require a monumental effort (in fact, Cafu is designed to be inherently portable), I still expect that any required adjustments to the Android environment will take some dedication (e.g. maybe it can be done in one afternoon, but more realistically I'd expect several days of work at least, maybe a week to two).

So the best we can probably do is to just try it out. Would you be willing to give it a try? I'm currently focusing my own work on the new component system, and -currently- have not enough time to drive an Android port myself, but I'd be more than happy to help you if you did.
:up:
Best regards,
Carsten
MonoAlithica
Posts: 17
Joined: 2012-02-07, 13:06

Re: Cafu on OUYA?

Post by MonoAlithica » 2013-02-10, 14:56

Absolutely I'll give it a go. But I'm not a systems guy so I'm going to have to skate around the tutorials on some basic Android programming first (I may skip them). But I'd love to do it and I have an Android Tegra 2 device on hand as well. Sounds like it would be stupidly beneficial to everyone, and my ambition to have a game on the OUYA.

So would compiling Cafu with an Android compiler be the first port of call? Ill give that a go, if I can find said compiler.
User avatar
Carsten
Site Admin
Posts: 2160
Joined: 2004-08-19, 13:46
Location: Germany
Contact:

Re: Cafu on OUYA?

Post by Carsten » 2013-02-12, 22:52

MonoAlithica wrote:So would compiling Cafu with an Android compiler be the first port of call? Ill give that a go, if I can find said compiler.
Yes, you'll likely have to start with the Android NDK.

For example, I think that http://developer.android.com/tools/sdk/ ... rview.html is a good starting point. I have no idea however where it may lead you from there. ;-)
Best regards,
Carsten
User avatar
Carsten
Site Admin
Posts: 2160
Joined: 2004-08-19, 13:46
Location: Germany
Contact:

Re: Cafu on OUYA?

Post by Carsten » 2013-02-13, 20:49

I don't know if it keeps what it promises, but this one seems to be worth a look, too:
http://www.madewithmarmalade.com/

It's commercial (at a reasonably fair price I think), and covers all important mobile platforms.
Best regards,
Carsten
User avatar
Carsten
Site Admin
Posts: 2160
Joined: 2004-08-19, 13:46
Location: Germany
Contact:

Re: Cafu on OUYA?

Post by Carsten » 2013-02-15, 16:28

For completeness, here is something else that I just came across, in a similar spirit:
http://blogs.nvidia.com/2013/02/nvidia- ... evelopers/
Best regards,
Carsten
MonoAlithica
Posts: 17
Joined: 2012-02-07, 13:06

Re: Cafu on OUYA?

Post by MonoAlithica » 2013-02-17, 22:13

Right, the latter link is the sort of thing I was looking for. It has everything including the NDK pre-packaged and ready to go. However, there is a known bug in the Tegra Visual Studio package - and its preventing me from installing it on my PC. Despite re-installing Visual Studio itself to the top level C:\ drive directory, that single app won't install. Which kind of hinders my efforts a little.

Ill get back onto it either once they've patched it or I've found a work-around in a Virtual Machine. But I have been reading up on the transition from OpenGL to OpenGL ES, would that require any significant alteration to the source code? Or will the existing renderer handle fine with OpenGL ES, seeing as the mobile spec and the desktop aren't too different. I assume the engine will have to make the transition seeing as the Tegra 3 is a mobile chipset inherently.
User avatar
Carsten
Site Admin
Posts: 2160
Joined: 2004-08-19, 13:46
Location: Germany
Contact:

Re: Cafu on OUYA?

Post by Carsten » 2013-02-18, 15:34

MonoAlithica wrote:But I have been reading up on the transition from OpenGL to OpenGL ES, would that require any significant alteration to the source code? Or will the existing renderer handle fine with OpenGL ES, seeing as the mobile spec and the desktop aren't too different. I assume the engine will have to make the transition seeing as the Tegra 3 is a mobile chipset inherently.
Renderer implementations in Cafu are very modular, see Libs/MaterialSystem/ for those that currently exist. Adding another one on the basis of OpenGL ES is probably relatively simple, and it is a crucial step in the porting effort.

(http://en.wikipedia.org/wiki/OpenGL_ES links to http://malideveloper.arm.com/develop-fo ... -emulator/, which may be helpful.)

The easiest start is probably with porting the Libs/MaterialSystem/RendererOpenGL12 to something like Libs/MaterialSystem/RendererOpenGL_ES11 (OpenGL ES 1.1), but I'm saying that only because I haven't checked how OpenGL ES 2+ supports the shaders that we use in the more advanced renderers, and because OpenGL ES 2+ doesn't support "immediate mode" rendering, which we still use. Overcoming this is not difficult, but possibly involves a little extra effort.

I would expect that with an OpenGL ES renderer in place, the rest of the porting effort (the engine itself) is relatively straightforward.
Best regards,
Carsten
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest