3
\$\begingroup\$

XNA and Monogame are built using a content pipeline, which takes source files (images, sound effects, 3D models, etc.) and converts them to proprietary .xnb files. What's the benefit of doing this as opposed to simply loading source files directly?

To be clear, I'm not asking how to use the content pipeline. Just why .xnb files are used in the first place.

\$\endgroup\$
3
\$\begingroup\$

It is much simpler to only support a single format at runtime.

A lot of formats just are not suited for quickly loading in the asset it contains. For example wavefront obj is a horrible format for that.

Doing the heavy lifting of conversion just once during build means that while the player is waiting on you to start showing stuff you are not doing dumb busywork of decompressing files, parsing text, ...

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.