Jump to content
  • Advertisement
Sign in to follow this  
Oduig

Drawing simple text

This topic is 2545 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I apologize if this is an obvious question, but I cannot seem to find anyone who has the same issue.

In my XNA 4.0 game, I would like to draw some text. For this a SpriteFont is required, which should be created by clicking the Content folder and selecting New Item. Now, the problem is, there is no content folder or content project. The only things listed my solution explorer are:

- Solution
- Project name
- Properties
- References
- Source code, config files, thumbnail

Everyone seems to assume this 'Content' project is present. Where is mine? Should I create a new empty content project and put a SpriteFont in there?

Thanks in advance,
Guido

Share this post


Link to post
Share on other sites
Advertisement
Hi!


Everyone seems to assume this 'Content' project is present. Where is mine?

Perhaps it was accidentally deleted. But don't mind, you can add a new one.


Should I create a new empty content project and put a SpriteFont in there?

Yep, you can just create a new content project. It doesn’t matter to your game with which content project the content was compiled. Content projects just do some pre-processing, conversions and mapping to easily loadable data formats that map better to the GPU. Just for convenience all this offline processing is placed in the compile step of a project, so that you can manage the basic parts of your content pipeline easily in visual studio. Sometimes, there are use cases where you want to have only one content project for many applications, e.g. a bunch of tutorials. Then for instance you’d probably like to have a single content project that builds teapots that you can use in all your tutorials. :) My point is there is no dependence of a project on a single specific content project. (You could even use multiple projects if you’d want to.)
Usually XNA 4.0 creates a content project side by side with each new game you create.

If you add a new content project, you will have to make sure that the output path of your content project coincides with the input path you’re reading from in your game (that would be the RootDirectory of the ContentManager).

Merry Christmas by the way! :)

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!