Sign in to follow this  
ELFanatic

[.net] XNA content pipeline

Recommended Posts

I have a couple of questions dealing with the content pipeline. first, do I have to add a file to the solution to load the content into the content pipeline. I ask this because it seems like it isn't efficient if the game has hundreds or thousands of images to load into the game. But I don't know. Also, is there a way to bundle a lot of images together? Is it even standard practice to do so? It seems that when I add an existing item to the solution and then need to edit the item, again, say an image, I then need to add it again. Is there a way around this?

Share this post


Link to post
Share on other sites
If you want to use the content pipeline, yes you do need to add each item to the solution. No, there isn't a way of packaging the images into one file. If you alter an image, you don't need to re-add it, but the pipeline will recognize that the file has changed and will reprocess it.

I believe one of the future goals is to make handling large amounts of content more streamlined.

There's a couple upsides though. One, the images are only processed once when you add them, and then only get reprocessed when they change. So it's not like you'll be processing a ton of images each time you debug your application. Secondly, for some assets, such as textures, you don't need to use the content pipeline. If your application is windows-only, you can load the textures directly from file.

Personally, I hope in the near future they plan to add the ability to load all types of content without the pipeline. At the moment, some types of content can be loaded manually, while others require the pipeline. This is annoyingly inconsistent.

Share this post


Link to post
Share on other sites
There are people out there that have made apps to add whole directories to the pipeline. I don't have time right now to find you one (going to a hockey game) but you should be able to google one. If not let me know.

theTroll

Share this post


Link to post
Share on other sites
To load textures into your game without adding them to the solution, you can't use the content pipeline. You'll need to load them yourself with Texture2D.FromFile. Essentially, you're loading them the same way you would if you were working directly with Direct3D.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this