-
Notifications
You must be signed in to change notification settings - Fork 286
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cross-Platform Support #7
Comments
|
This would be amazing. The priority at least for us, would be that the game runs on Linux and Mac. I don't think people have a problem developing on windows |
If he's experienced with Mono and / or cross-platform OpenTK, that'd probably be a great help. I wonder if he gets notified, now that you've referred his nickname. |
He was part of the monogame team and he is a genius and also incredibly experienced. I hope he gets my nudge |
I did get your nudge.. :) genius is over stating it a bit I think :P |
:) not at all dude |
I'd have a review of the code when I get a moment. Mono Mac will probably be the easiest port since it has a compatible opentk layer. PS 4/vita will be more problematic since vita has its own API as does the PS4. Unless duality has its own abstraction layer for graphics/input/content etc which would make things easier. |
Thanks Dean, |
That sounds great :) Looking forward to your thoughts!
Duality provides an abstraction layer to the user, so he doesn't need to talk to OpenTK API bindings directly, but it doesn't have an additional, internal layer of abstraction as you're probably referring to. Directly invoking API commands (OpenGL, OpenAL, etc.) happens only in some designated spots, though - Resource classes (Texture, Sound, ShaderProgram, ...), Rendering classes (DrawDevice, VertexFormat, ...) and a few utility methods (CheckOpenGLerrors, ...) should account for most of the direct OpenTK interaction. If you need anything, just let me know. (I'll be unavailable from 30/4 until 6/5 though.) |
OK I had a quick look, I think it will be possible to port the runtime port to mac/linux as its using basic opentk. the editor however is a different issue, its using WinForms and what looks like some custom Windows components for Docking etc. So the editor will probably need a bit of a rewrite to get that working. I'm wondering if the runtime could have its 'OpenGL/AL/Resources' part moved to a plugin, so the core of Duality is totally independent of platform, and the platform specific bits are in a plugin (a monogame plugin perhaps…. :P ) . You already have a bunch of interfaces in place by the looks of things so it should be possible. For the editor the core and the presentation would need to be separated out so windows and mac could have their own front ends. You could move to a XWT type UI layer which handles the platform abstraction for you, or go totally native for each platform. Either way it will be a lot of work, but it would be well worth it in the end. For now for cross platform I would suggest looking at the runtime first, then the editor later. I might have a few cycles to help in a few months (got a few projects of my own I need to finish first). |
Thanks a mill for the feedback Dean :) |
Thanks for the feedback so far :)
That should be possible using the existing plugin infrastructure, but not in the way that would move Resources themselves into a plugin, because there should be a fixed basis of core functionality (Textures, Sounds, ...) that is always available, independently of available plugins. However, moving the "internal API" into a distinct plugin sounds like a good start. I'm thinking of something like an IGraphicsDriver / IAudioDriver abstraction layer that will be used by all Resources, but the implementation of it will be loaded from a plugin. That way, there would be no direct API calls in Duality at all. It will be a requirement to identify some kind of "shared basis" of API functionality on all platforms that will be exposed by the interfaces. It will also be necessary to decide whether this interface will have a low-level or a high-level tendency and which of both makes more sense. I'm lacking practical experience here, so some feedback on this would be great :)
Yep, that sounds good. I'm not sure whether it will pay off to port the editor at all, though - since I expect it to be a lot more work than porting the core, while only providing a relatively "small" benefit. Will need to re-evaluate that when the community has grown a little more. |
(Prerequisite Step) Evaluate whether Duality runs using Mono on Windows: Done. It works. ToDo: Acquire Virtual Machine and see what happens when trying that on Linux. |
A related issue is the ability to port the game to windows phone/mono touch and mono droid. The editor and system is very cool, but is gated from me because I would like to post my game on those market places. Of course this would also require having an ifdef like functionality so its probably beyond the scope of this bug... It would also require a diretx backend as the windows phones don't allow opengl. If a directx plugin were created, it would let us post to windows store too which would increase reach even further. |
Without OpenGL / OpenAL support on these platforms, it will be either introducing another abstraction layer or porting to something like MonoGame. Both options aren't really great in my opinion:
Another option would be to ditch non-OpenGL platforms in the first iteration and stick to making it run directly with OpenTK on all platforms that support it, preferably the Win / Linux / Mac trio. Since multi-platform is quite a big topic on its own, I'd kind of go with this third option and see how far it leads first. |
Hey Adam - My advice would be to port it using mono. You would in theory be able to port it to Android as well. My advice would be to use Android TV as a test bed for duality on mobile hardware. If you are having difficulties porting your engine to Android ask some of the Devs over on the XDA Developers forum. Here is a link - http://forum.xda-developers.com/ As for Mac and Linux - I am not sure about who to ask for help in the Mac area. Maybe some of the folks over on TIGsource.com could help you out as well as promoting your own engine. Maybe the Gaming on Linux forums could help - http://www.gamingonlinux.com/forum/ Just thought I would Offer my support.
|
Thanks for the hint! :) Will definitely check it out. |
Perhaps retargeting to OpenTK's OpenGLES 2.0 would solve some of the graphics issues? It allows a standard API to be used internally that in theory will work with all of the platforms. If anyone's graphics card doesn't support it (just about everything newer than the GMA950 does), they probably couldn't play the game anyways |
I've also thought about that, yet I'm not sure whether this is the best way to approach the task of platform-independent graphics, mainly due to one reason: It is possible that certain projects use OpenGL features that may not be available in OpenGL ES. I think this is a rather obscure case and would probably dismiss it that way, but right now, I do not know enough about OpenGL ES to say for sure. But then again, abstracting away all the graphics would leave those cases with some extra work as well, so it might not be any worse than moving the actual graphics code to a plugin. |
This issue has been superseded by the OpenTK Abstraction Layer and making Duality a PCL. When both of them are in place, it should be possible to port Duality by simply creating a new platform backend plugin and, depending on the platform, a new launcher. With the entire platform backend in a plugin and Duality and its plugins being PCLs, it would in theory be possible to reach just about any platform that is supported by the PCL profile - all Desktop ones (DotNet and Mono), as well as some of the Xamarin ones - as long as someone creates the platform backend plugin and potentially launcher. Closing this, moving discussion to the v2.0 milestone. |
The text was updated successfully, but these errors were encountered: