I’m trying to port the LTrees library from XNA to MonoGame, and running into some issues (most of which I expect, given that I’m using a pre-release version of the content pipeline and associated tools).
But it made me wonder, is there yet a 3rd-party project that anyone can point me to, which:
- is a “middleware”-type library intended for use in a MonoGame-based game (i.e. not a game, just a reusable library).
- has solved the conundrum of handling all the build permutations for all the platforms that MonoGame supports (it gets even more complicated if the library has a content pipeline DLL providing custom importers and processors, because then there are 3 possible platforms just for the content pipeline DLL). I see MonoGame itself uses Protobuild - is that the recommended approach for 3rd party libraries too?
- has figured out how to package things in order to reduce or eliminate the number of manual steps end users must go through to use the library in their game.
Apart from thinking about how to author libraries like these, I’ve also been thinking about the end-user experience.
In my perfect scenario, all that would be necessary to bring a library like LTrees into your MonoGame game project would be:
- Open NuGet package manager, search for library, install (or equivalent for Mac and Linux environments)
- That’s it…
Of course there are a number of things that need to happen to make that possible:
- Add references for the correct platform version of the library - perhaps using a .targets file, which I think is how MonoGame itself does it?
- Figure out how to deal with any .xnb files included with the library (which would themselves be platform-specific). Perhaps a convention of putting .xnb files into the “content” folder of a NuGet package?
- If the library has custom importers / processors, ideally they would be able to “register” themselves with the .mgcb file - again, probably requires a convention for where the .mgcb file(s) are stored.
I realise that’s probably a long way off, but I wondered if that’s at all aligned with where MonoGame’s core developers want to get to? If it were as easy as that, I think you’d see an explosion (well, loud bang, anyway) of reusable components (like LTrees), that any MonoGame-based game could easily make use of.
I read this thread, and it sounds like some of the pre-requisite pieces are in progress.
Anyway, sorry for all the questions! I’m guessing that a lot of the answers might be “not yet”, or “no plans”, but that’s fine - I really just want to get a feel for the current state of affairs, as well as perhaps some idea of whether it’s going to get easier to build “middleware” libraries for MonoGame in the future.