<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://forums.xna.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>General</title><link>http://forums.xna.com/forums/32.aspx</link><description>Don't know where to post your question? Post it here!</description><dc:language>en</dc:language><generator>CommunityServer 2007.1 (Build: 0.0)</generator><item><title>Re: Best Practice for a string table?</title><link>http://forums.xna.com/forums/thread/182027.aspx</link><pubDate>Sun, 24 May 2009 05:14:15 GMT</pubDate><guid isPermaLink="false">4aa5dbf6-357b-46b2-b5b2-1b660a6dc370:182027</guid><dc:creator>Zero Serenity</dc:creator><slash:comments>0</slash:comments><comments>http://forums.xna.com/forums/thread/182027.aspx</comments><wfw:commentRss>http://forums.xna.com/forums/commentrss.aspx?SectionID=32&amp;PostID=182027</wfw:commentRss><description>I think I&amp;#39;ve got the idea now. I&amp;#39;ll give it a shot and come back with how well it works.</description></item><item><title>Re: Best Practice for a string table?</title><link>http://forums.xna.com/forums/thread/182025.aspx</link><pubDate>Sun, 24 May 2009 05:00:05 GMT</pubDate><guid isPermaLink="false">4aa5dbf6-357b-46b2-b5b2-1b660a6dc370:182025</guid><dc:creator>Daniel Hanson</dc:creator><slash:comments>0</slash:comments><comments>http://forums.xna.com/forums/thread/182025.aspx</comments><wfw:commentRss>http://forums.xna.com/forums/commentrss.aspx?SectionID=32&amp;PostID=182025</wfw:commentRss><description>If you&amp;#39;re only releasing your game on Xbox, then don&amp;#39;t worry about it. None of your consumers will ever be able to crack open your game and sift through the files. So that shouldn&amp;#39;t be a concern.&lt;br /&gt;&lt;br /&gt;

Even if they could, they wouldn&amp;#39;t see XML files; they would see XNB files, which are the serialized binaries of your XML files. The Content Pipeline exists as a part of your build process. Just like how the C# compiler takes your .cs files and compiles them into binary executables, the Content Pipeline will take your assets (including .xml files) and compile them into .xnb binaries that are loaded by your game. You should not be concerned about people reading your XML files any more than you should be concerned about them reading your source code.</description></item><item><title>Re: Best Practice for a string table?</title><link>http://forums.xna.com/forums/thread/182004.aspx</link><pubDate>Sun, 24 May 2009 03:08:21 GMT</pubDate><guid isPermaLink="false">4aa5dbf6-357b-46b2-b5b2-1b660a6dc370:182004</guid><dc:creator>Zero Serenity</dc:creator><slash:comments>0</slash:comments><comments>http://forums.xna.com/forums/thread/182004.aspx</comments><wfw:commentRss>http://forums.xna.com/forums/commentrss.aspx?SectionID=32&amp;PostID=182004</wfw:commentRss><description>I read &lt;a href="http://blogs.msdn.com/shawnhar/archive/2008/05/30/xml-and-the-content-pipeline.aspx"&gt;this&lt;/a&gt;, but I&amp;#39;m still confused. It basicly tries to explain serialization and what it does when cached, but implementing this in a useful state doesn&amp;#39;t seem to be the objective.</description></item><item><title>Re: Best Practice for a string table?</title><link>http://forums.xna.com/forums/thread/181981.aspx</link><pubDate>Sun, 24 May 2009 01:56:40 GMT</pubDate><guid isPermaLink="false">4aa5dbf6-357b-46b2-b5b2-1b660a6dc370:181981</guid><dc:creator>Kris Steele</dc:creator><slash:comments>0</slash:comments><comments>http://forums.xna.com/forums/thread/181981.aspx</comments><wfw:commentRss>http://forums.xna.com/forums/commentrss.aspx?SectionID=32&amp;PostID=181981</wfw:commentRss><description>&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="http://forums.xna.com//Themes/default/images/icon-quote.gif"&gt; &lt;strong&gt;Zero Serenity:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;Great, but I&amp;#39;m a tad confused a bit. The articles I&amp;#39;m reading seem to be just stuff that says to make XML files, but they can obviously just be opened with something as small as notepad and give away tons of information or can be edited. So I&amp;#39;m not sure how this is a help. It also mentions &amp;quot;Serialize&amp;quot; a lot, which is a concept I don&amp;#39;t understand. I read the articles but couldn&amp;#39;t follow the concept. I would like to release this game as a XNA Xbox game when it&amp;#39;s done (and aproved) but if I cannot I&amp;#39;d like to just throw it out there as a PC version, which is a lot easier to just browse through the files.&lt;/div&gt;&lt;/BLOCKQUOTE&gt;&lt;br /&gt;
&lt;br /&gt;
Serialize is the process of converting something into XML (for instance a class or, on the web, your most recent news). &lt;br /&gt;
&lt;br /&gt;
If you include the XML in the content pipeline, it will get compiled and won&amp;#39;t be so easily editable.</description></item><item><title>Re: Best Practice for a string table?</title><link>http://forums.xna.com/forums/thread/181978.aspx</link><pubDate>Sun, 24 May 2009 01:52:31 GMT</pubDate><guid isPermaLink="false">4aa5dbf6-357b-46b2-b5b2-1b660a6dc370:181978</guid><dc:creator>Zero Serenity</dc:creator><slash:comments>0</slash:comments><comments>http://forums.xna.com/forums/thread/181978.aspx</comments><wfw:commentRss>http://forums.xna.com/forums/commentrss.aspx?SectionID=32&amp;PostID=181978</wfw:commentRss><description>Great, but I&amp;#39;m a tad confused a bit. The articles I&amp;#39;m reading seem to be just stuff that says to make XML files, but they can obviously just be opened with something as small as notepad and give away tons of information or can be edited. So I&amp;#39;m not sure how this is a help. It also mentions &amp;quot;Serialize&amp;quot; a lot, which is a concept I don&amp;#39;t understand. I read the articles but couldn&amp;#39;t follow the concept. I would like to release this game as a XNA Xbox game when it&amp;#39;s done (and aproved) but if I cannot I&amp;#39;d like to just throw it out there as a PC version, which is a lot easier to just browse through the files.</description></item><item><title>Re: Best Practice for a string table?</title><link>http://forums.xna.com/forums/thread/181962.aspx</link><pubDate>Sun, 24 May 2009 00:50:19 GMT</pubDate><guid isPermaLink="false">4aa5dbf6-357b-46b2-b5b2-1b660a6dc370:181962</guid><dc:creator>khalos44</dc:creator><slash:comments>0</slash:comments><comments>http://forums.xna.com/forums/thread/181962.aspx</comments><wfw:commentRss>http://forums.xna.com/forums/commentrss.aspx?SectionID=32&amp;PostID=181962</wfw:commentRss><description>&lt;a href="http://www.talula.demon.co.uk/blogindex.html"&gt;Shawn Hargreaves Blog&lt;/a&gt; has a lot of stuff. Look under the Content Pipeline and intermediate serializer headings&lt;br /&gt;
Nick wrote a &lt;a href="http://www.ziggyware.com/readarticle.php?article_id=150"&gt;good article&lt;/a&gt; on Ziggyware.&lt;br /&gt;
There is a &lt;a href="http://creators.xna.com/en-US/sample/localization"&gt;Localization &lt;/a&gt;sample on this site that uses this method. (Check it out even if you don&amp;#39;t plan on supporting more than just English)&lt;br /&gt;
And of course, &lt;a href="http://lmgtfy.com/?q=XNA+XML+Content+Pipeline"&gt;&lt;/a&gt;&lt;a href="http://lmgtfy.com/?q=XNA+XML+Content+Pipeline"&gt;Google&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
Good luck!&lt;br /&gt;</description></item><item><title>Re: Best Practice for a string table?</title><link>http://forums.xna.com/forums/thread/181956.aspx</link><pubDate>Sun, 24 May 2009 00:32:20 GMT</pubDate><guid isPermaLink="false">4aa5dbf6-357b-46b2-b5b2-1b660a6dc370:181956</guid><dc:creator>Zero Serenity</dc:creator><slash:comments>0</slash:comments><comments>http://forums.xna.com/forums/thread/181956.aspx</comments><wfw:commentRss>http://forums.xna.com/forums/commentrss.aspx?SectionID=32&amp;PostID=181956</wfw:commentRss><description>This sounds good, got a primer? An MSDN doc? Anything?</description></item><item><title>Re: Best Practice for a string table?</title><link>http://forums.xna.com/forums/thread/181927.aspx</link><pubDate>Sat, 23 May 2009 22:19:09 GMT</pubDate><guid isPermaLink="false">4aa5dbf6-357b-46b2-b5b2-1b660a6dc370:181927</guid><dc:creator>Daniel Hanson</dc:creator><slash:comments>0</slash:comments><comments>http://forums.xna.com/forums/thread/181927.aspx</comments><wfw:commentRss>http://forums.xna.com/forums/commentrss.aspx?SectionID=32&amp;PostID=181927</wfw:commentRss><description>XML files will do that nicely, since they are built into a separate XNB file. I &lt;i&gt;think&lt;/i&gt; (don&amp;#39;t take my word for it) resource files are embedded into the binary, so they may not be the best solution for your needs.</description></item><item><title>Re: Best Practice for a string table?</title><link>http://forums.xna.com/forums/thread/181915.aspx</link><pubDate>Sat, 23 May 2009 21:48:32 GMT</pubDate><guid isPermaLink="false">4aa5dbf6-357b-46b2-b5b2-1b660a6dc370:181915</guid><dc:creator>Zero Serenity</dc:creator><slash:comments>0</slash:comments><comments>http://forums.xna.com/forums/thread/181915.aspx</comments><wfw:commentRss>http://forums.xna.com/forums/commentrss.aspx?SectionID=32&amp;PostID=181915</wfw:commentRss><description>&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="http://forums.xna.com//Themes/default/images/icon-quote.gif"&gt; &lt;strong&gt;Craig Martin:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;XML is easy to edit manually and it gets compiled into the XNB binary format for deployment.&lt;br /&gt;
&lt;/div&gt;&lt;/BLOCKQUOTE&gt;&lt;br /&gt;
This, I think. Let me try this a little more in depth. What I want are basicly language files. Stuff that I can hotfix out of the main executable for whatever reason, then deploy it whenever it&amp;#39;s done, updated or whatever.</description></item><item><title>Re: Best Practice for a string table?</title><link>http://forums.xna.com/forums/thread/181818.aspx</link><pubDate>Sat, 23 May 2009 12:59:40 GMT</pubDate><guid isPermaLink="false">4aa5dbf6-357b-46b2-b5b2-1b660a6dc370:181818</guid><dc:creator>Danny Tuppeny</dc:creator><slash:comments>0</slash:comments><comments>http://forums.xna.com/forums/thread/181818.aspx</comments><wfw:commentRss>http://forums.xna.com/forums/commentrss.aspx?SectionID=32&amp;PostID=181818</wfw:commentRss><description>&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="http://forums.xna.com//Themes/default/images/icon-quote.gif"&gt; &lt;strong&gt;GregA:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;Nowdays I wouldn&amp;#39;t store anything in a database unless you have some specific database need.  Look at the complexity of model files, and those are essentially just flat files.  I like the idea of either XML or making const classes with all of your text in them.  Then you are an easy step (and a translator or three ) away from multi language support.&lt;br /&gt;
&lt;br /&gt;
But my question fits in here nicely.  I&amp;#39;d like to store text attributes, like bold, italic, and color.  Is there some cheap easy way to parse out escape codes in XNA?&lt;/div&gt;&lt;/BLOCKQUOTE&gt;I think you&amp;#39;d need to use different fonts. I can&amp;#39;t think of an easy/nice way to do it. You&amp;#39;d need to come up with a method for storing which font/index in the string and parse through it. If you did it in XML you could use the possibly content pipeline to convert a nice format to a quicker format at compile time, eg:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;String Name=&amp;quot;GameOver&amp;quot;&amp;gt;Game &amp;lt;B&amp;gt;Over!&amp;lt;/B&amp;gt;&amp;lt;/String&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Could compile into a class like this:&lt;br /&gt;
&lt;br /&gt;
public class GameString&lt;br /&gt;
{&lt;br /&gt;
    public GameStringPart[] Parts;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
public class GameStringPart&lt;br /&gt;
{&lt;br /&gt;
    public SpriteFont font;&lt;br /&gt;
    public string Text;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Then you could create an extension method on SpriteBatch so you have:&lt;br /&gt;
&lt;br /&gt;
spriteBatch.DrawFormattedString(gameOverGameString, location, etc.);&lt;br /&gt;
&lt;br /&gt;
Then loop through the GameStringParts &amp;quot;DrawString&amp;quot;ing them, keeping track of the width (with MeasureString) to do the next one.</description></item><item><title>Re: Best Practice for a string table?</title><link>http://forums.xna.com/forums/thread/181807.aspx</link><pubDate>Sat, 23 May 2009 12:17:44 GMT</pubDate><guid isPermaLink="false">4aa5dbf6-357b-46b2-b5b2-1b660a6dc370:181807</guid><dc:creator>GregA</dc:creator><slash:comments>0</slash:comments><comments>http://forums.xna.com/forums/thread/181807.aspx</comments><wfw:commentRss>http://forums.xna.com/forums/commentrss.aspx?SectionID=32&amp;PostID=181807</wfw:commentRss><description>Nowdays I wouldn&amp;#39;t store anything in a database unless you have some specific database need.  Look at the complexity of model files, and those are essentially just flat files.  I like the idea of either XML or making const classes with all of your text in them.  Then you are an easy step (and a translator or three ) away from multi language support.&lt;br /&gt;
&lt;br /&gt;
But my question fits in here nicely.  I&amp;#39;d like to store text attributes, like bold, italic, and color.  Is there some cheap easy way to parse out escape codes in XNA?</description></item><item><title>Re: Best Practice for a string table?</title><link>http://forums.xna.com/forums/thread/181799.aspx</link><pubDate>Sat, 23 May 2009 12:04:47 GMT</pubDate><guid isPermaLink="false">4aa5dbf6-357b-46b2-b5b2-1b660a6dc370:181799</guid><dc:creator>Craig Martin</dc:creator><slash:comments>0</slash:comments><comments>http://forums.xna.com/forums/thread/181799.aspx</comments><wfw:commentRss>http://forums.xna.com/forums/commentrss.aspx?SectionID=32&amp;PostID=181799</wfw:commentRss><description>XML is easy to edit manually and it gets compiled into the XNB binary format for deployment.&lt;br /&gt;</description></item><item><title>Re: Best Practice for a string table?</title><link>http://forums.xna.com/forums/thread/181784.aspx</link><pubDate>Sat, 23 May 2009 11:32:47 GMT</pubDate><guid isPermaLink="false">4aa5dbf6-357b-46b2-b5b2-1b660a6dc370:181784</guid><dc:creator>Danny Tuppeny</dc:creator><slash:comments>0</slash:comments><comments>http://forums.xna.com/forums/thread/181784.aspx</comments><wfw:commentRss>http://forums.xna.com/forums/commentrss.aspx?SectionID=32&amp;PostID=181784</wfw:commentRss><description>&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="http://forums.xna.com//Themes/default/images/icon-quote.gif"&gt; &lt;strong&gt;Zero Serenity:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;second is somehow not be editable by anything else&lt;/span&gt;&lt;/div&gt;&lt;/BLOCKQUOTE&gt;Can you explain what you mean by this? I was also going to suggest Resources. They can&amp;#39;t be modified by the player on the Xbox, but I wonder if you mean on the PC. Is this to stop people replacing the resource file in the game folder on the PC?&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;You could potentially store a checksum of the resource file and check that, but it might be a PITA to keep changing.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;You could also try a static class in the game with a load of public constants:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;public static class Strings&lt;/div&gt;&lt;div&gt;{&lt;/div&gt;&lt;div&gt;    public string const GameOver = &amp;quot;Game Over.&amp;quot;;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;    public string const PressAToStart = &amp;quot;Press A To Start&amp;quot;;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;This is easily editable in one place (not sure if it meets your &amp;quot;editable in VS&amp;quot; requirement) but not editable easily on the PC (Note: with Reflector, this might not be as hard as you think, depends who you&amp;#39;re trying to protect it from).&lt;/div&gt;</description></item><item><title>Re: Best Practice for a string table?</title><link>http://forums.xna.com/forums/thread/181712.aspx</link><pubDate>Sat, 23 May 2009 04:04:37 GMT</pubDate><guid isPermaLink="false">4aa5dbf6-357b-46b2-b5b2-1b660a6dc370:181712</guid><dc:creator>Daniel Hanson</dc:creator><slash:comments>0</slash:comments><comments>http://forums.xna.com/forums/thread/181712.aspx</comments><wfw:commentRss>http://forums.xna.com/forums/commentrss.aspx?SectionID=32&amp;PostID=181712</wfw:commentRss><description>&lt;a href="http://msdn.microsoft.com/en-us/library/7k989cfy.aspx"&gt;Shazam&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;

&lt;b&gt;Edit:&lt;/b&gt; Oops, just read about your &amp;quot;not editable&amp;quot; comment. Not sure what you can do with resource files in that regard.</description></item><item><title>Best Practice for a string table?</title><link>http://forums.xna.com/forums/thread/181709.aspx</link><pubDate>Sat, 23 May 2009 03:57:28 GMT</pubDate><guid isPermaLink="false">4aa5dbf6-357b-46b2-b5b2-1b660a6dc370:181709</guid><dc:creator>Zero Serenity</dc:creator><slash:comments>0</slash:comments><comments>http://forums.xna.com/forums/thread/181709.aspx</comments><wfw:commentRss>http://forums.xna.com/forums/commentrss.aspx?SectionID=32&amp;PostID=181709</wfw:commentRss><description>&lt;span style="background-color:#f4f7f5;"&gt;Let me qualify what I want to do here first. I&amp;#39;m making a game with lots of dialog. Stuffing it all into hardcode in the game is probably a bad idea, so I&amp;#39;d like to use an external file to hold all the dialog. Two requirements are really needed, first one is it can be easily editable from within VS and the second is somehow not be editable by anything else either by encoding or passwords. Sofar the only thing I can come up with is Compact .NET Database which seems to be suiting the purpose quite well, but there&amp;#39;s a bit of lag to it. Is there any better ways?&lt;/span&gt;</description></item></channel></rss>