Page 1 of 1

Can OpenRA be ported to Xbox One?

Posted: Fri Dec 23, 2016 1:49 pm
by DaveyMames
Hi, I was wondering if it's technically possible to get OpenRA working in the Unity game engine as I'd like to make a single player campaign mod for the PS4/Xbox One?
Unity games are written in C# so I assume it's possible? Thanks

Posted: Tue Dec 27, 2016 9:33 pm
by Fortnight
It should be technically possible but you'd have to write a lot of extra code since Unity has their own way to render stuff, capture inputs and deliver sound. The easiest way, which isn't easy, is probably to make "in-between classes" that communicate with the OpenRA code and presents the game in such a way that Unity can display it.

OpenRA uses OpenGL for graphics, which isn't supported by Xbone. They only do DirectX (it isn't named DirectXbox for nothing after all). I believe OpenAL is used to deliver sound in OpenRA so you'd probably have to rewrite that as well to be handled by Unity, I reckon the old audio formats need to be changed. Most likely inputs need to be captured by Unity and then passed along to the OpenRA code as well, not to mention you need to adapt the game to controllers instead of keyboard and mouse. The network code might need a rewrite if you want to support that. You probably do since bots isn't on StarCraft level just yet in OpenRA. :lol: I don't even know how that would work out since Microsoft and Sony has strange ideas nowadays of how you should play online on their consoles (pay extra money for using your own home Internet etc).

Technically you can port almost anything from one system to another if you want to put the necessary work into it but generally I don't see it happening for OpenRA in this case. :P It would be far from just copy-pasting the source code and changing and/or adding a few lines.

Edit: Oh yeah you said you want to make a single player campaign so at least the Internet part isn't needed. It would still be a lot of work though and you can't sell it since OpenRA is free. I don't know if the OpenRA license even allows this type of thing in the first place.

Posted: Sun Jan 08, 2017 5:17 pm
by Matt
There is a free software Microsoft XNA reimplementation called http://www.monogame.net/ which could make this possible. Alternatively a more slim and better suited variant may be https://fna-xna.github.io/ which is developed by the same developer we took our OpenGL and OpenAL bindings from.

It need be a bit more than just writing a new platform DLL. I don't know much about the DirectXBox development. See the standard OpenGL/OpenAL/SDL abstraction at https://github.com/OpenRA/OpenRA/tree/b ... ms.Default if you are really interested.

Posted: Sun Jan 08, 2017 8:47 pm
by DaveyMames
Thanks for the info everyone.