Monofoxe

Monofoxe Trello board is now public. If you want to contribute – there is always stuff to do. ; - )
Tasks under “Open for taking” category are… open for taking!

We have migrated to Github. New repo link: https://github.com/gnFur/Monofoxe/

I’m currently updating the touch screen input component of my own libraries. You’re welcome to them if you want. When they’re finished I’ll find a way to get you the code. I took a look at your code and our approaches are fairly different. It might be easier to let you take a look and decide if it’s something you want or not :slight_smile:

1 Like

Monofoxe v1.0.1.0 is here. Did lots of bugfixing, added some handy classes, added DirectX support, but most importantly – now there is a set of actual demos, which showcase most of the engine’s features.
Demos: https://github.com/gnFur/Monofoxe/tree/master/Monofoxe.Playground

Hey there I’m also working on a GM inspired engine, and did a fair bit of work on it already -

Preview videos: https://www.youtube.com/channel/UCCDT5l4gglPpFB_tEZd5c7Q/videos

Since we two have common interest it might be very effective to buckle up, I am really impressed with your work.

Hehe, you actually went and copied even the UI. Though, I think, that’s
kinda too far. Sprite editor and all that fluff are kinda useless, and
VS does the job absolutely fine. Making your own IDE is too much of a
rabbithole. Though, I may steal something from your thingy. ; - )

Uploaded a 2v in-dev build. Now with docs, even more foxes and lots of other stuff.

1 Like

@gn.fur Tried downloading the latest public version (1.0.1.1) and additionally tried the 2.0.0.0dev, but unfortunately the installer didn’t seem to do much. I only have Visual Studio 2019 Community installed (both 2019 and 2019 Preview version), and the MonoGame SDK installed is from the Development Builds (3.8.0.848). I’m running Windows 10 Version 1909.

The 1.0.1.1 installer seems to start working, then goes to the part with for NoPipeline (which I didn’t have installed yet), pops up another window to install it, but then seems to finish immediately without actually doing anything. No templates were available in Visual Studio 2019 when I opened it up (although I selected the checkbox to install them).

The 2.0.0.0dev starts the installer, I choose the options I wanted (I kept the Visual Studio 2019 template checked). The installer finished almost immediately. Same thing - no templates in Visual Studio 2019 that I can see.

In both cases nothing appeared in Programs and Features to uninstall too. I did find an uninstall.exe in C:\Program Files (x86)\Monofoxe (add Engine for the 2.0.0.0 build) that worked correctly for 1.0.1.1, and 2.0.0.0dev cleaned up everything except it left a blank folder in C:\Program Files(x86).

@Cory_Kroll Install v2-dev and check the Documents\Visual Studio %yourversion%\Templates\ProjectTemplates\Visual C#

Tell me if the templates are there. Also I’ve noticed that there is an issue with VS2019 when it doesn’t index new templates so they doesn’t appear in the search, but if you scroll list of all templates, they willl be there.

@Cory_Kroll Ok, I’ve googled some more and that’s what I’ve found: VS 2019 template search has been broken for months. VS team seem to have failed to fix it and introduced some tag system which may fix the search. I’ll try adding that right now and will upload a new in-dev build which hopefully will work.

Also yeah, the uninstaller is indeed not registered, I’ll try to fix that too.

@Cory_Kroll Ok, uploaded a new build. Now uninstaller shows up in the Remove Prgrams, and… well, searching is still broken. The best I could do is add the tags in project templates. Now you can switch Project Type filter to Monofoxe and all the templates will show up.

Also created a bugreport for VS team describing this issue.

@gn.fur

Ok good news - the templates are placed at the path you’ve indicated, which for me was:
C:\Users%username%\Documents\Visual Studio 2019\Templates\ProjectTemplates\Visual C#\Monofoxe v2-dev

I did find that Monofoxe is showing up under the Project Types filter.
However, just typing Monofoxe doesn’t bring up the results.
I’d have to either know what to look for in the filter or scroll to the bottom.

I’d be really interested in any articles you found about search indexing bring broken, etc. specifically around the name/description search.
I’m interested in writing templates myself as would certainly share what I found with it.
Also could you link to the issue you created for the VS team?

So I think proceeded to create a project from every template. Here are my specific finding, and then general notes at the end.
TL;DR All generated a template, none compiled directly to launching a hello world I’d expect (the cornflower blue screen).

Monofoxe Class Library (.NET Standard)

  • Builds just fine, no issues.

Blank Monofoxe Cross Platform Desktop Project

  • Monofoxe.Engine.dll does not resolve (.\References\Monofoxe.Engine.dll instead of $(MonofoxeInstallDirectory)$(MonofoxeVersion)\lib\Monofoxe.Engine.dll)
  • Monofoxe.Engine.dll does not resolve (.\References\Monofoxe.Tiled.dll instead of $(MonofoxeInstallDirectory)$(MonofoxeVersion)\lib\Monofoxe.Tiled.dll)
  • Didn’t come with a Game1.cs, and doesn’t build as a result.

Blank Monofoxe Windows Project

  • Get this warning when building: Found conflicts between different versions of the same dependent assembly. Please set the “AutoGenerateBindingRedirects” property to true in the project file. For more information, see http://go.microsoft.com/fwlink/?LinkId=294190
  • Didn’t come with a Game1.cs, and doesn’t build as a result.

Monofoxe Cross Platform Desktop Project

  • The project fails on build. Looks like it has something to do with NoPipeline:
    1> Unhandled Exception: System.NotSupportedException: The given path’s format is not supported.
    1> at System.Security.Permissions.FileIOPermission.EmulateFileIOPermissionChecks(String fullPath)
    1> at System.Security.Permissions.FileIOPermission.QuickDemand(FileIOPermissionAccess access, String fullPath, Boolean checkForDuplicates, Boolean needFullPath)
    1> at MGCB.MGBuildParser.ParsePreprocessArg(String arg, List1 output, Stack1 ifstack, Boolean inResponseFile)
    1> at MGCB.MGBuildParser.ParsePreprocessArg(String arg, List1 output, Stack1 ifstack, Boolean inResponseFile)
    1> at MGCB.MGBuildParser.Preprocess(IEnumerable1 args) 1> at MGCB.MGBuildParser.Parse(IEnumerable1 args)
    1> at MGCB.Program.Main(String[] args)

Monofoxe Shared Project

  • Seems to generate just fine. When I add a Windows project, reference it as a Shared Project, and try to build however I get a pathing issue with NoPipeline:
    1> Unhandled Exception: System.NotSupportedException: The given path’s format is not supported.
    1> at System.Security.Permissions.FileIOPermission.EmulateFileIOPermissionChecks(String fullPath)
    1> at System.Security.Permissions.FileIOPermission.QuickDemand(FileIOPermissionAccess access, String fullPath, Boolean checkForDuplicates, Boolean needFullPath)
    1> at MGCB.MGBuildParser.ParsePreprocessArg(String arg, List1 output, Stack1 ifstack, Boolean inResponseFile)
    1> at MGCB.MGBuildParser.ParsePreprocessArg(String arg, List1 output, Stack1 ifstack, Boolean inResponseFile)
    1> at MGCB.MGBuildParser.Preprocess(IEnumerable1 args) 1> at MGCB.MGBuildParser.Parse(IEnumerable1 args)
    1> at MGCB.Program.Main(String[] args)

All

  • Reference to MonoGame.Framework does to local DLL (personally I’d like to see this wired up to a Nuget instead, but that’s more personal preference)

Where do you create new projects? What reference paths are in MGCB file? Exception seems like it’s something that has to do with your system not permitting to write into the file. I’ve seen something baguely similar with some security settings.

Blank projects aren’t supposed to compile by themselves, they need Shared project to be referenced in them.

…and yes, I’ve fucked up reference paths for blank projects. : - D
Will fix it right away.

Issue: Developer Community

Also, nuget will not work, since you need to set up some files to make Monofoxe work, which goes against “make it at simple as possible” rule of mine.

@Cory_Kroll
Ok, fixed warnings and template references. Still no idea what can cause Nopipeline to fail, tho. Generated MGCB config and paths you’re creating projects in may give some info.

For these projects generated directly from your template, I created them on my Desktop.
Not my typical location, but there shouldn’t be any permissions issues.

I downloaded the latest version and used the template Monofoxe Cross Platform Desktop Project.
I immediately attempted to build the template after creating it and got this out:

1>------ Build started: Project: Monofoxe Cross Platform Desktop Project, Configuration: Debug Any CPU ------
1>  NoPipeline v1.1.0.0
1>  Reading MGCB config C:/Users/Cory/Desktop/Monofoxe Cross Platform Desktop Project/Content/Content.mgcb
1>  
1>  Reading setting: /outputDir:bin/$(Platform)
1>  Reading setting: /intermediateDir:obj/$(Platform)
1>  Reading setting: /config:
1>  Reading setting: /profile:Reach
1>  Reading setting: /compress:False
1>  
1>  Reading reference: C:/Program Files (x86)/Monofoxe Engine/v2-dev/lib/Pipeline/Pipefoxe.dll
1>  
1>  Reading content:Content.mgcb
1>  Reading content:Graphics/default.spritegroup
1>  Reading content:Effects/AlphaBlend.fx
1>  Reading content:Fonts/Arial.spritefont
1>  Finished reading MGCB config! Got 4 items.
1>  
1>  -------------------------------------
1>  
1>  Reading NPL config.
1>  
1>  Reading reference: C:\Program Files (x86)/Monofoxe Engine/v2-dev/lib/Pipeline/Pipefoxe.dll
1>  
1>  Reading content for: Content.mgcb
1>      Reading Content.mgcb
1>  Reading content for: Audio/Music/*.ogg
1>  Reading content for: Audio/Sounds/*.wav
1>  Reading content for: Graphics/Default.spritegroup
1>      Reading Graphics/default.spritegroup
1>  Reading content for: Effects/*.fx
1>      Reading Effects/AlphaBlend.fx
1>  Reading content for: Maps/*.tmx
1>  Reading content for: Fonts/*.spritefont
1>      Reading Fonts/Arial.spritefont
1>  
1>  Finished reading NPL config!
1>  
1>  -------------------------------------
1>  
1>  Checking integrity of the final config. Hold on tight!
1>  
1>  Checking C:\Users\Cory\Desktop\Monofoxe Cross Platform Desktop Project\Content\Content.mgcb
1>  Checking C:\Users\Cory\Desktop\Monofoxe Cross Platform Desktop Project\Content\Graphics/default.spritegroup
1>  Checking watch for Default/*.png
1>  Checking wildcars for: C:\Users\Cory\Desktop\Monofoxe Cross Platform Desktop Project\Content\Graphics\Default
1>  Checking C:\Users\Cory\Desktop\Monofoxe Cross Platform Desktop Project\Content\Graphics\Default\monofoxe.png
1>  Modifying: C:\Users\Cory\Desktop\Monofoxe Cross Platform Desktop Project\Content\Graphics\Default\monofoxe.png
1>  Checking watch for Default/*.json
1>  Checking wildcars for: C:\Users\Cory\Desktop\Monofoxe Cross Platform Desktop Project\Content\Graphics\Default
1>  Checking C:\Users\Cory\Desktop\Monofoxe Cross Platform Desktop Project\Content\Graphics\Default\monofoxe.json
1>  Modifying: C:\Users\Cory\Desktop\Monofoxe Cross Platform Desktop Project\Content\Graphics\Default\monofoxe.json
1>  Checking C:\Users\Cory\Desktop\Monofoxe Cross Platform Desktop Project\Content\Effects/AlphaBlend.fx
1>  Checking C:\Users\Cory\Desktop\Monofoxe Cross Platform Desktop Project\Content\Fonts/Arial.spritefont
1>  
1>  Checking reference: C:/Program Files (x86)/Monofoxe Engine/v2-dev/lib/Pipeline/Pipefoxe.dll
1>  
1>  -------------------------------------
1>  
1>  Saving new config as C:/Users/Cory/Desktop/Monofoxe Cross Platform Desktop Project/Content/Content.mgcb
1>  
1>  Done! \^u^/
1>  
1>  Unhandled Exception: System.NotSupportedException: The given path's format is not supported.
1>     at System.Security.Permissions.FileIOPermission.EmulateFileIOPermissionChecks(String fullPath)
1>     at System.Security.Permissions.FileIOPermission.QuickDemand(FileIOPermissionAccess access, String fullPath, Boolean checkForDuplicates, Boolean needFullPath)
1>     at MGCB.MGBuildParser.ParsePreprocessArg(String arg, List`1 output, Stack`1 ifstack, Boolean inResponseFile)
1>     at MGCB.MGBuildParser.ParsePreprocessArg(String arg, List`1 output, Stack`1 ifstack, Boolean inResponseFile)
1>     at MGCB.MGBuildParser.Preprocess(IEnumerable`1 args)
1>     at MGCB.MGBuildParser.Parse(IEnumerable`1 args)
1>     at MGCB.Program.Main(String[] args)
1>C:\Program Files (x86)\MSBuild\MonoGame\v3.0\MonoGame.Content.Builder.targets(84,5): error MSB3073: The command ""C:\Program Files (x86)\MSBuild\MonoGame\v3.0\Tools\MGCB.exe" /quiet /platform:DesktopGL /@:"C:\Users\Cory\Desktop\Monofoxe Cross Platform Desktop Project\Content\Content.mgcb" /outputDir:"bin\DesktopGL\Content" /intermediateDir:"obj\DesktopGL\Content"" exited with code -532462766.

I then noticed that I couldn’t open the Content.mgcb at all in the MonoGame Pipeline Tool, getting the following error:

Content.mgcb: Failed to open the project due to an unknown error.

If I go into the .mcgb file and remove the following section, I can then open it in the editor:

#begin Content.mgcb
/importer:AssetInfoImporter
/processor:PassThroughProcessor
/build:Content.mgcb

I then noticed if I try to add in the .mcgb file, an Importer does show up in the drop down, called ‘Asset Info Importer - Monofoxe’. I set the ‘No Processing Required’ dropdown for the Processor for the .mgcb asset as well to match your template. However, then clicking the option to build in the MonoGame Pipeline Tool does nothing, and closing the trying to reopen the .mgcb file in the MonoGame Pipeline Tool causes it to start crashing again.

If I remove your .mgcb asset from the Content.mgcb, the content builds fine. However, then building the entire project still gives me the error in the Output, so something else is up.

I took a look at Content.npl and it has this path:
%PROGRAMFILES%/Monofoxe Engine/v2-dev/lib/Pipeline/Pipefoxe.dll

The problem is that %PROGRAMFILES% resolved to C:\Program Files
However, C:/Program Files/Monofoxe Engine/v2-dev/lib/Pipeline/Pipefoxe.dll doesn’t exist on my machine.
The program is installed under C:\Program Files (x86)\Monofoxe Engine\v2-dev\lib\Pipeline\Pipefoxe.dll
So pathing might be an issue as a result of the (x86).

I’m running a Windows 10 64-bit machine - but I think nowadays I’m probably what most users would be running.
Changing this didn’t resolve the project building issue, but maybe it is a hint to other path issues that might be in the toolchain?

In regards to NuGet, I think we are on the same page of making it as simple as possible.
For me, when I’m working with a git repository I’m looking to clone it, build it, and run it. Ideally this means not having to know what additional software I’d have to install for local dependencies. If any libraries can be replaced with a NuGet equivalent, this would be ideal. This is also a huge help when setting up a CI/CD pipeline, as generating a new build agent would ideally not require the installation of custom software in order to automate it in a cloud (like DevOps).

Ok, so:

  1. Replace %PROGRAMFILES% with %PROGRAMFILES(x86)% in the npl config and see if that resolves correctly.
  2. Create projects in a regular folder, not on desktop. I’ve seen Windows Defender blocking write access to files in Desktop already, and this may very well be the case.
  3. Try creating a regular MG project on Deskto and opening its .mgcb.

Except you still need Monogame, which has to be installed. : - )

Making it run on nuget is a whole heap of problems. First of all, you can’t install templates via Nuget, which is very important. Dunno about you, but I don’t want to manually set up Game1, GameController, resource loading and resources themselves. Second, Pipeline Tool also requires a reference, which can’t be really wired up to nuget, since it’s not a project. Third, Nopipeline also required .targets entry in .csproj, and it has to run before Content Pipeline.
If you know how to solve those issues – cool, let me know, but as I see it, making it an installer is the simpliest way. Monofoxe isn’t just a library which you can optionally install – it’s a whole engine on top of which you build a game. Spending two seconds to install the thing isn’t that difficult, I don’t think you hop onto a new machine every day.

Tried to run it myself in a secured folder and it gave me a different exception.
Open mgcb config in text editor, find /reference: entry and replace all “/” for all “” in the path. Then rename .npl comfig to something other than Content, so it doesn’t run and mess up your mgcb. Just make sure to run it at least once, so that .npl actually generate references and stuff.

Also kinda forgot to mention #begin Content.mgcb. It should… work? It’s treated as a regular resource.

YOS

Pinned down the source of issues. I’ve been running it on the MG 3.7.1 and you – on dev build. I’ll try to investigate what the issue is, but can’t promise anything. I am not supporting dev build which breaks new stuff every day. : - D

…and nope, it’s not something that can be easily fixed. I have some ideas on how that could be fixed, but I just recommend downgrading to 3.7.1, sorry. If I’ll start chasing the dev build support, I’ll go insane. I will fix the (x86) paths in a couple of days, but yeah, that’s pretty much it. If the same issue will persist in stable 3.8 release, I’ll get on it.

For now created an issue for maintainy bois: https://github.com/MonoGame/MonoGame/issues/6918

By the way, you can always go ahead and fix it yourself, I can even explain, how to do it. ; - )