Is the monogame pipeline necessary?

Is the monogame pipeline necessary?
I mean a good amount of people can’t get it to work with xml files without trouble
and it doesn’t have a xml editor like visual studio does

what would be the difference of just using a folder structure?
would directly importing assets into the project work as well?
is it possible to just remove the content pipeline from the project?

Of course you can read xml files in your app :slight_smile:
It is c# afterall

umm when did I say you can’t?
I simply said you can’t without trouble

the main reason why I’m posting this is because most tutorials either don’t use the pipeline or use an older version of it
also sometimes they don’t show where they are importing assets to which makes it really hard to follow

This comes up often and usually this link is referenced

1 Like

And of course we need to fix the issues with XML assets.

I answered to the fact you can load xml independantly. No need to use a pipeline for that.
And it is really easy…
Video options can be in an xml loaded at runtime. So why not other xml files separating xml from the piepline yes but it will work instead of waiting for the addressing of the issue.
I dont understand why people bump in problems and cannot see other ways of doing things.

I am still messing around with it.
but ya it would be nice to be able to compile xml file to binary by putting them in the content pipeline
this could prevent people from editing them

You can download Visual Studio 2010 Express for Windows Phone or Visual Studio 2010 + XNA and it will convert XML’s into XNB’s.

I assume MonoGame can read both formats?

You can also make your own app and compile xml files into your own binaries with an encrypting method (you need skills in cryptography). As it was done in the old times

The problem is editing the xml file inside the pipeline.
its not as easy to do then just having it directly inside the project

This is the first time I’ve heard of these issues and I’m interested to know more about them but nobody has posted any context.

What trouble are you talking about?

What are the issues? Can you link to the issue number please?

I’m trying to get more info myself.

I’ve solved @Shadowblitz16’s XML issues in this thread. There were no fixes to MonoGame required. It was all solved on the game project side with the correct setup of XML assets and class libraries.

There are other issues that some people have had with XML assets that we’ve been told worked fine in XNA. Those are more important issue to solve.

see I don’t understand why I need to use a class library for one class.
that’s why I was wondering if I could load my assets though something besides the content pipeline.
so can just directly reference them in a hierarchy of folders within my single project.

The same class needs to be available to both the content pipeline and the game. That’s why it is in a class library so both can reference the type to get the reflection metadata. It doesn’t have to be in there on its own. You can have a bunch of other code in there as well if you have many items that need XML serialisation.

oh so its just for classes that use xml serialization?
can I just put all my classes in it?

I dunno about necessary, but it sure makes things a lot easier.

For some things you must bypass it.
Ever try writing a simple paint program in xna how about monogame yikes.

I have like 3 classes that write data directly in binary i still use from time to time.

One of them i don’t think ill ever pitch it turns like 9 gigs of small values into a runtime useable 1 gig data stream without zipping, i wrote it before the c# binaryarray class came out. I used it for hex maps that were insanely huge to keep them from filling up all the ram with a 5k by 5k hex map. That was necessary and took some serious bit math but id rather not do it to load a model.

I think what you’ll want to look into is TitleContainer.OpenStream. This should allow you to open files directly in a cross platformish way. I can’t remember off the top of my head but I think this will open files in the Content folder of your project. They can be any type of file, and once you’ve got a stream open you can use standard C# code to de-serialize the XML or whatever.

It will open files in the root of your install. Content is usually a subdirectory from there. I say usually because not all platforms work the same way, such as Android where TitleContainer opens a stream into the AssetLibrary.

So then I can just store all my classes inside my class library?