MonoGame 3.8 prerelease packages are up on NuGet

Try echo "export MGFXC_WINE_PATH=$HOME/.winemonogame" >> ~/.zprofile

If you are asking how to set it up, and not just about vs for mac, you need to install wine64 and 7z, and than run the following script: https://github.com/MonoGame/MonoGame/blob/develop/Tools/MonoGame.Effect.Compiler/mgfxc_wine_setup.sh

Awesome news, a massive congrats to the team!

I have not had a chance to try it out yet but I am curious did DesktopGL get updated to OpenGL 4.6? It be really nice if that path was now on par with the DX11 support in MonoGame.

Anyways all the best and again a huge congrats to the team and I look forward to the PS5 and XBSX support with 3.8 down the road!

That’s… not how OpenGL works. If we did upgrade to a newer OpenGL, most older devices wouldn’t be able to run MonoGame and you would see no performance benefits. Like macOS doesn’t even support stuff past 3.3 at all.

I don’t think anything has been omitted. There’s no real pure interface layer for the netstandard shared library, but I think DesktopGL is commonly used because it’s the most neutral and most common of the packages. I think theoretically you could use any of the packages in your shared library, as long as you set <PrivateAssets>all</PrivateAssets> and avoid using platform-specific APIs.

The Android and iOS packages have lots of platform-specific code regarding graphics, inputs, sensors, etc., and they also have properties that instruct mgcb to build your content for their own platform.

1 Like

My project is currently based on Windows + DX11, I don’t work with OpenGL.

I was looking forward to a Switch port which I believe only supports OpenGL 4.5 and Vulkan so that is why I asked since MonoGame OpenGL is on 3.3. I don’t have a Switch Dev Kit yet and was thinking ahead in regards to the performance and porting issues going to the Switch.

My apology for asking ahead of time and not waiting till I had My Dev Kit.

Fantastic work team, spotted this accidentally while I was testing some other features the other week and now 've stumbled on the official update .

Happy testing / updating times ahead. Plus updating the samples again :smiley:

2 Likes

How do we make extensions for the content builder? I tried generating a project with dotnet new mgpipeline, but it doesn’t compile because it references two nuget packages v3.8 that doesn’t exist on nuget.

  • MonoGame.Framework.Portable
  • MonoGame.Framework.Content.Pipeline.Portable

Maybe that template wasn’t updated with the newest packages. Odd that it would have the new version but the wrong packages. I think you need to reference

  • MonoGame.Framework.Content.Pipeline
  • MonoGame.Framework.DesktopGL (as the portable package, like when you make a netstandard shared library; theoretically you’d want to set <PrivateAssets>all</PrivateAssets> for this, but your pipeline extension project probably won’t be referenced by any published game, so it doesn’t matter in practice)

Looks like that fixed it, maybe the template should be updated? https://github.com/MonoGame/MonoGame/blob/develop/Templates/MonoGame.Templates.CSharp/content/MonoGame.Library.Pipeline.Extension.CSharp/MGNamespace.csproj

Another issue. I get a runtime exception when trying to build content with my extension. A System.PlatformNotSupportedException: Sysem.Drawing is not supported on this platform. is thrown when trying to invoke System.Drawing.Image.FromFile. This code worked fine in 3.7. Some of my assets are images (masks) that I convert to my game objects using the content extensions, being able to use System.Drawing helps me a lot. I had to to import the package System.Drawing.Common to use with dotnet standard/core, maybe the mgcb tool needs to reference this as well?

System.Drawing is not part of .NET standard, its also not really crossplatform. We should avoid referencing it like its a plague.

Also yup about the template, will update it later today.

1 Like

I guess I’ll experiment with some other libraries for image processing

So, is there a guide on setting up a UWP project? would like to create a visual guide with images for complete beginners.

My assumption is create new Blank UWP App,
Some NuGET code magic voodoo code
Compile and run
?

As you know, not yet a fan of NuGET.

EDIT

Ok, used the manager in vs, found the pre-release thingy,

Accepted these changes:

TestMgNuget\TestMgNuget.csproj

Installing:

MonoGame.Framework.WindowsUniversal.3.8.0.1375-develop
SharpDX.4.0.1
SharpDX.Direct2D1.4.0.1
SharpDX.Direct3D11.4.0.1
SharpDX.DXGI.4.0.1
SharpDX.MediaFoundation.4.0.1
SharpDX.XAudio2.4.0.1

Do I have to add the other code and files manually?

Also during compile some errors were showing up but they disappeared after, debug stuff.

EDIT

Still exploring, is there a way to install a template from NuGET?

EDIT

Package 'MonoGame.Templates.CSharp 3.8.0.1375-develop' has a package type 'Template' that is not supported by project 'TestingMgNugetDesktop'.

What are these templates for?

MonoGame 3.8 has templates for VS 2019, just install templates, select MG UWP application, and that’s it, project created.

Would it be possible that for the final release, the UWP projects by default target SDK version 18362, instead of 17763? VS installs 18362 by default.

image

@MrValentine With 3.8, will be providing 3 sets of templates:

  • VSIX for Visual Studio 2019 for Windows
  • mpack for Visual Studio 2019 for macOS
  • MonoGame.Templates.CSharp nuget, for dotnet CLI and Rider IDE

The last one is installed using the following command:

dotnet new -i MonoGame.Templates.CSharp::3.8.0.1375-develop

and provides templates when using dotnet new command.

1 Like

How do I use that for VS?

I managed to coax a template to work but can you tell me the VS19 method?

EDIT

And does it work for UWP-XAML?

EDIT

Tried to figure this one out, so I then run:

dotnet new -i mguwpxaml

and nothing happens…

I mean it runs some script and nothing changes with my files.

What am I missing?

EDIT

Tried:

dotnet new -i --install mguwpxaml

Can someone please make a guide thread?

EDIT

Nuget is not helpful at all:
-i, --install Installs a source or a template pack.

What does this even mean

You don’t have to run the -i argument when you’re not installing templates from nuget package.

Run this dotnet new mguwpxaml

1 Like

F me… why doesn’t it just say that then…

EDIT

OK, template created successfully, what next?