penumbra icon indicating copy to clipboard operation
penumbra copied to clipboard

.NET Core Support Possible?

Open richard-hajek opened this issue 5 years ago • 13 comments

I know you stated that you will not update the library, so I am not asking whether you will do it, I am asking how hard would it be. As if it is easy enough I should be able to do it myself and possibly fork this one but if it is hard or near impossible without a complete rewrite, I will not attempt, because I would most likely fail tbh, Thanks

richard-hajek avatar Nov 19 '18 17:11 richard-hajek

Currently, MonoGame relies on WinForms implementations of .NET Framework or Mono for desktop GUI rendering. .NET Core 2.1 (latest as of this post) does not support WinForms, making it impossible to support it.

However, .NET Core 3.0 will introduce WinForms support for Windows platform. If MonoGame decides to support it, I'd be more than happy to move this code base over to .NET Standard. Main benefits would be faster runtime and vastly improved .csproj format to simplify code.

Here's an open issue on .NET Core support for MonoGame: https://github.com/MonoGame/MonoGame/issues/5339

discosultan avatar Nov 19 '18 17:11 discosultan

Wait, if I understand correctly, you're saying that MonoGame itself cannot currently run on .NET Core?

richard-hajek avatar Nov 19 '18 17:11 richard-hajek

As far as I know, yes. I haven't been following their updates for a while now, so I might be missing some information. From what I know, they plan to support it from MonoGame 3.8 (current latest is 3.7).

discosultan avatar Nov 19 '18 17:11 discosultan

Okay, not to argue with you, but I am running a .NET Core MonoGame game on Linux right next to me, and MonoGame download links list Linux as well link

Edit: Also I believe you can grab .NET Core version of MonoGame from nuGet if I am not mistaken link (Although the author is not MonoGame, as it is with the rest of the MonoGame nuGet packages)

richard-hajek avatar Nov 19 '18 17:11 richard-hajek

It's cool to see that there's working third party effort for .NET Core support!

The Linux download link on the official page is the Mono version of MonoGame.

It's hard to tell what problems may rise during the port. I'm mostly worried about the content pipeline, as Penumbra needs to compile custom shaders for each supported platform.

discosultan avatar Nov 19 '18 17:11 discosultan

If it is any help, when I attempted to build Penumbra in .NET Core it compiled successfully, don't know if that included the shaders or not though.

richard-hajek avatar Nov 19 '18 17:11 richard-hajek

Well, keep us updated, whether you plan to port or not!

richard-hajek avatar Nov 19 '18 18:11 richard-hajek

Personally, I will wait for official support in MonoGame 3.8 before dabbling into it. The whole .NET Core story around MonoGame is still unclear for me.

discosultan avatar Nov 19 '18 18:11 discosultan

Well what. Did you bloody know. If you install nuGet package Penumbra.DesktopGL it works out of the box. Just like that, no nothing needed.

Your thing does work with .NET Core.

You're a bloody genius.

Edit: Tested on HelloPenumbra, saw shadow thing rotating, the whole window was slightly blue, I suppose that's what it is supposed to do

Edit2: Well someone is definitely a genius, don't actually know if specifically you.

richard-hajek avatar Nov 19 '18 20:11 richard-hajek

After some testing, I have concluded, that it works reliably, had 0 problems (except for build warning me that Penumbra is not meant to run on this framework)

richard-hajek avatar Nov 21 '18 20:11 richard-hajek

@meowxiik How are you run monogame on .net core?

urusai88 avatar Nov 22 '18 09:11 urusai88

  1. Install MonoGame like you normally would
  2. Create new project
  3. Add Penumbra.DesktopGL nuGet package

Should work now

richard-hajek avatar Nov 22 '18 16:11 richard-hajek

Penumbra.DesktopGL is not working with Monogame UWP Core project:

System.TypeLoadException: 'Could not load type 'MonoGame.Framework.GameFrameworkViewSource`1' from assembly 
'MonoGame.Framework, Version=3.8.0.1641, Culture=neutral, PublicKeyToken=null'.'

romanov avatar Jan 13 '21 21:01 romanov

Closing as supported already for awhile.

discosultan avatar Dec 28 '22 21:12 discosultan