Monofoxe

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. ; - )

@gn.fur
Alright, I got some success with MonoGame 3.7.1!
Please check out the comments below about additional feedback and questions you had asked me earlier.

Sorry I wasn’t clear on this in my prior post but I actually did try this. It didn’t fix the issue when I was using a dev build.

I do projects off my Desktop as a starting point pretty regularly, so I didn’t think this is the problem. After installing MonoGame 3.7.1 SDK on my machine, I was able to build it with the project on my desktop. So the path wasn’t the issue (more on those results below). But hey, success with the build!

I have other projects with .mgcb files that opened just fine. I actually compared and contrasted .mgcb files that did work to look at differences to hone in on.

I tried uninstalling everything and then using your installer to install Monofoxe, MonoGame, Visual Studio 2019 Templates, and selected ‘Remove old versions.’
It doesn’t appear the MonoGame part of the install worked. I was expecting to see the same result as a MonoGame 3.7.1 install, but it doesn’t look like anything we added. What does checking this option do?

I noticed that when uninstalling Monofoxe, NoPipeline remained installed (the folder with all the files remained). I had to know to find it and run its uninstall.exe manually to clean it up.

In regards to building MonoGame without installing it and just using NuGet - I’ve been able to make that work.
I have MonoGame projects, building through a DevOps cloud, with cloud build agents that don’t have MonoGame SDK installed on them working. This was done by swapping out all referenced with Nuget references to MonoGame.
This also build locally even after I uninstall MonoGame SDK completely.
Here is a UWP csproj for this (NuGet Packages). Notice I even pull in MonoGame.Extended references here.

  <ItemGroup>
    <PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform">
      <Version>6.2.9</Version>
    </PackageReference>
    <PackageReference Include="MonoGame.Content.Builder">
      <Version>3.7.0.9</Version>
    </PackageReference>
    <PackageReference Include="MonoGame.Framework.WindowsUniversal">
      <Version>3.7.1.189</Version>
    </PackageReference>
    <PackageReference Include="MonoGame.Extended">
      <Version>1.0.617</Version>
    </PackageReference>
    <PackageReference Include="MonoGame.Extended.Content.Pipeline">
      <Version>1.0.617</Version>
    </PackageReference>
    <PackageReference Include="MonoGame.Extended.Tiled">
      <Version>1.0.617</Version>
    </PackageReference>
    <PackageReference Include="Newtonsoft.Json">
      <Version>12.0.2</Version>
    </PackageReference>
  </ItemGroup>

The only other thing I needed to do was remove the .target references in the csproj and it builds just fine.
Might be something worth considering for your templates.

So all that said, installing 3.7.1 locally with the SDK, then using your installer, then using the template and building it worked. Onward! :slight_smile:

Yep, this is already fixed in dev releases. In 1.0.1.1 Nopipeline was a separate thing with a separate installer. Now it’s embedded into Monofoxe installtion.

It just runs default Monogame installer. If you were expecting to see Monogame templates installed in VS2019 – MG doesn’t support it yet. I mean, I could repack the MG installer with fixes for that, but I don’t see much reason for it.

Except then resource building will not work. : - )

@gn.fur

Ok, with the very latest dev build I can confirm NoPipeline cleans up after itself, and the MonoGame installer does kick off and install properly and allows for seperate uninstallation. All good there.

Except then resource building will not work. : - )

Are you sure? Check out this NuGet package:

You’ll notice it contains a MonoGame.Content.Builder.targets
It also contains MGCB.exe under the build\MGCB\build along with all the files that typically get installed with the local installer.

I have cloud builds going on, right now, that use this. I don’t check in any xnb files to my source control because I don’t need to - the cloud build kicks off MGCB.exe and builds everything.

@craftworkgames provided a good tutorial that, with dotnet new, you can generate a template, build, and run it. You can absolutely take this initial template, add a .png and reference it in the .mgcb file and it will absolutely build it and it will be loadable in the program. I just did this again, without MonoGame installed locally, to verify the whole thing.
The only issue you have is that you don’t have the nice MonoGame Pipeline UI Tool installed, but my point is you don’t need to run the local installer to build the assets and use them.
Here is the tutorial link: http://www.monogameextended.net/posts/getting-started-with-monogame-extended

I’m looking forward to digging into the Monofoxe solutions and appreciate the back and forth on all of this. Forces me to look much deeper into MSBuild and the flow around these tools!

Hmm, maybe it would even work…
…but I don’t really want to completely rewrite all of my installation system. : - )
Not now, at least.

Sounds like an upside. Pipeline Tool UI is complete garbage and should not exist – I even wrote Nopipeline just to not use it.

At one point we didn’t have a pipeline tool at all, so to say i like it well enough. I just think the whole content processor importer reader writer is confusing even having written a couple for practice i still feel very murky when i think about it.

The one thing i think i am really missing is a way to just reference a folder or folders that has all my content with sub folders with the xnbs that are all only pulled into a project in place at publishing time when you flip a switch, Such that all projects can be set to reference the same place and sub folders for all tests and content then separated at will into a project only when the user deems that it is time.

To say it another way if i link to a content item, i do not know of a way to later copy that linked item without removing and re-adding it. This is tedious and i tend to not link.

This has caused me to have a lot of duplicate items across many many projects as i feel other options also have drawbacks.

Wowie, new in-dev build is out! :0

  • Monofoxe is now able to launch on Android.
  • Added an ability to change entity update order.
  • Added an all-in-one multiplatform project template.
  • Added various item templates.
  • Entity methods which count components/entities have been removed.
  • Systems have been removed entirely.
  • Components now have their own events.
  • Calling base.%EventName%() is now required in entities for EC to work.
1 Like

Monofoxe now has a Discord! https://discord.gg/F9tPYaD

1 Like

Monofoxe v2.0.0.0-dev+007

2 Likes

Monofoxe 2.0 is here! :000

  • Upgraded to Monogame 3.8.
  • Monofoxe is now distributed entirely via nugets.
  • Automatic content loaders.
  • Upgraded Nopipeline.
  • Dotnetcore support.
  • Various new features and bugfixes.
2 Likes

Tested Monofoxe on Macos – turns out, it works out of the box, even though I’ve not intended for it.

2 Likes

Uploaded a little update for the installer and project templates – you can still find it under 2.0.0 release, it’s not a full-on new version.
I’ve only fixed some errors in project templates and updated Nopipeline version to the most recent one.

Published Spriter library for Monofoxe. It’s… kinda wonky, since it’s based on SpriterDotNet, but eh, works for me. More of an emergency library than anything else. Still way better than SpriterDotNet, tho.

Working on coroutine system.
cr

It allows to create fairly complex sequences within a single method.

		private IEnumerator BallSpawnerCoroutine()
	{
		while (true)
		{
			for (var i = 0; i < 5; i += 1)
			{
				// 5 balls will be spawned with the interval of 0.1 seconds.
				yield return Wait.ForSeconds(0.1);
				new Ball(Layer, _ballSpawnerPosition);
			}
			// After 5 balls will have spawned, there will be a 1 second pause.
			yield return Wait.ForSeconds(1);
		}
	}
3 Likes

v2.1.0 is here!

This is not a huge update, however, it brings a number of very important features.

  • VS2017 template support has been replaced by VS2022 templates. Even though VS2022 is still in preview, you can already use it and make full use of sweet new features like hot reloading.

  • Solutions created from templates no longer requires to manually build Content project. This is a big one. Previously, after creating a new solution, you had to manually press the Build button on the Content project, since it’s not referenced by anything. Now, this is no more! Create an launch the project in one click, and everything will just work.

  • Component events like Draw and Updte are now virtual instead of abstract. Having a bunch of empty events never looked good anyway.

  • Templates now support .NET5 instead of netcore 3. Cause, why not? Netcore 3 is still fully supported, but .NET5 will be the default for desktop platforms. This means better overall performance.

  • Added coroutines. This is a big one. You can check them out in the post above.

Misc changes:

  • Added support for the backgroundcolor property for Tiled maps.
  • Added OnCrash event to SceneMgr which allows to catch and recover from the exceptions within a scene.
  • Added IsFixedUpdateFrame to SceneMgr.
  • Fixed Scene not being able to delete its layers properly.
  • Made SafeList thread safe.
  • Newly created solutions set their default project to GL instead of library, which cannot be run.

Get Monofoxe: Release v 2.1.0 · Martenfur/Monofoxe · GitHub

Join Monofoxe Discord: https://discord.gg/Q8c4jdDaaH

1 Like

v2.2.0 has been released! :o

Added

  • Added Name field to Sprite.
  • Added Range<> class.
  • Added HEX conversion for Color.
  • Added HsvColor Lerp and basic operators.
  • Added simplified GetResource<>() methods.
  • Added OnResize event to Camera.
  • Added Global instance to RandomExt.
  • Added unit circle methods to RandomExt.
  • Added dampers based on second order motion.
  • Added job system.
  • Added started argument to Alarm constructor.
  • Added Start(time) and Pause(), Resume() metods to Alarm.
  • Added Counter.
  • Added GetOrCreateLayer to Scene.
  • Added OnFinish event to coroutines.
  • Added Projection method to Vector2 and Vector3.
  • Added PerlinNoise.
  • Added SlowRotator.
  • Added simple logger.

Changed

  • Destroy() event triggers even if an entity is disabled.
  • Migrated to NET6.
  • Updated MonoGame to 3.8.1.
  • Updated Nopipeline to 2.2.0.
  • Replaced Newtonsoft.Json dependency with System.Text.Json.
  • Removed VS2019 support.

Fixed

  • Fixed Sprite.Clone() not copying frames properly.

Get Monofoxe: Release v 2.2.0 · Martenfur/Monofoxe · GitHub

Join Monofoxe Discord: Monofoxe

1 Like