Open ekolis opened 5 years ago
I believe this would require converting FrEee.Core to a .NET Standard library; I've tried this in the past and run into issues, but maybe it won't be as problematic with newer versions of .NET Standard?
I think I found a way to run Xamarin on Linux - you need to create a GTK# app: https://docs.microsoft.com/en-us/xamarin/xamarin-forms/platform/other/gtk?tabs=windows
I tested this with an app I was working on for my job and I was able to create a GTK# app that runs on Windows; haven't tested it on Linux yet...
OK, I tested my work app on Linux and I get an error...
We might need to port the game to .NET Core #20 first in order to port it to Xamarin?
If the goal is to get multi-platform GUI going, it seems that there are a couple of alternatives that should be better when targeting desktop (as Xamarin seems to be mostly focused on mobile apps at the moment). Two that I found are Eto.Forms (https://github.com/picoe/Eto) and AvaloniaUI (https://avaloniaui.net/), both of which are open source at work across Windows, Linux and Mac.
From what I gather, the WinForms code is reasonably well decoupled from the back-end, and thus it should be relatively easy to port the game to one of those platforms, which should have enough capabilities to handle it.
Hmm. I've heard of Avalonia; I had issues trying it out because the forms designer was broken or missing or something like that. Never heard of Eto; I'll have to look into that. There's also Blazor, which is supposedly going to be expanded to support not only web apps but desktop and mobile apps as well, but that doesn't sound like it will be happening until next year.
Now that we have the game converted to .NET Core, I tried creating a Xamarin project for it. All went well, until I tried to link in the FrEee core project; it needs to be a .NET Standard project in order to be linked from Xamarin, but .NET Standard is missing some certain APIs (such as scripting) that we need. I suppose this will all be sorted out with the release of .NET 5, unifying all the various .NET platforms?
Xamarin runs on a variety of platforms and it would be cool to have a mobile version of the game! Oddly Xamarin doesn't run on Linux though...