2

I haven't found a clear-cut answer for if I can do this nor how to go about it. I'd like to allow my game to load additional MGCB into content managers, thus allowing additional content to be made after I release my game.

I've seen talk of building them on the fly, but nothing about loading them nor using them. If I missed this question being asked and answered elsewhere, please feel free to correct me.

My initial solution was to just not use the MGCB content pipeline at all, and replacing it with an uncompressed zip structure similar to the classic "pak" concept games have used in the past. I fear inefficiency with that. I'd like to use the "native" content pipeline system if I can.

Cereza
  • 163
  • 7
  • All I got is a searchterm tip for you: What you describe sounds a lot like allowing modding of your game. If this is a valid path for modding, you should find something. If not, it might get you on the right track. – Christopher Jul 21 '19 at 00:56
  • @Christopher - Well, that sort of helped. I've determined that while everyone vaguely hints this can be done, given nowhere in existence does anyone show it working nor how they did it, that I may indeed need to go the pak route. I feared inefficiency with it, but truth be told, given I don't compress anything, it's probably actually faster anyhow. Your suggestion did expand my search range and get me to this conclusion much more quickly and for that I legitimately thank you. – Cereza Jul 21 '19 at 03:04

1 Answers1

3

I'm going to go ahead and post my own answer to this, in case anyone else ever finds themselves pulling out their hair trying to resolve this. Everything will hint that you can do this, but there's no real, practical way to.

If you want to allow mods or additional content to be dropped into your game after the fact, you have to design your own content management system. It's easy with something like DotNetZip and a little out-of-the-box thinking, and despite my initial fears, if it's not faster than the MonoGame content system, it's certainly no slower.

Cereza
  • 163
  • 7
  • 1
    The MonoGame Content Pipeline essentially processes content files from their raw format into cross platform XNB files. This really comes down to the type of content you're loading. For example, loading a WAV file on a Windows Desktop could be quite different than doing it on an Android mobile device. That said, I agree that the MGCB is not really adding a whole lot of value most of the time. If you can figure out a way to make your game without it go for it. – craftworkgames Jul 22 '19 at 01:33