Which moving ball example are you referring to?
Hard to be sure what might be the issue without code or references.
But if you’re trying to add a texture file in the pipeline tool, right-click on ‘content’ on the left and you can add folders, or ‘new item’. Do ‘new item’, then go grab your texture using the file dialog that pops up and then run the build option at the top. If you aren’t running build then you aren’t converting anything to a usable xnb file. Not sure if you did that step, but a build is needed.
Once you’ve built the content, you can then reference it with Texture2D texture = Content.Load<Texture2D>(FILE_PATH_HERE)
. By default, the file path in the ContentManager (Content) member in your Game1 class is relative to your project folder. So if your ball texture is in the root directory, just Load(balltexturename) is all that’s needed. No extensions required.
just stuff that reference somewhere in the body of your Game1. In Draw, you should only need to do this:
Spritebatch batch = new Spritebatch(GraphicsDevice);
batch.Begin();
batch.Draw(texture, new Vector2(0,0), Color.White);
batch.End();
If you’ve done all that and still don’t see the ball texture, nor are you getting any errors… then that’s weird.
Another way to test things to be sure everything is working okay would be to draw a primitive instead.
Instead of loading a texture, you’d do this:
Texture2D texture = new Texture2D(GraphicsDevice, 1, 1);
texture.SetData<Color>(new Color[] { Color.Red } );
Then in the draw, you’d define a rectangle instead of using the vector. If you don’t define a rectangle, using a primitive this way will result in a 1x1 px rectangle.
batch.Draw(texture, new Rectangle(0,0, 200, 200), Color.White);
If you do this, you ought to see a red square in the top-left corner. If THAT doesn’t work, then something is really messed up.