Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


RPG Text adventure with XML

This topic is 5481 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 am making a RPG text game with C#. I have an xml file that saves the players name password and the class they choose. I want to create a child node in the XML file so that I can make an item collection to keep track of the items that the player has. But I cant figure out how to create a child to a player attribute in an XML file. Can anyone explain the syntax for that to me. Thank You

Share this post

Link to post
Share on other sites

XmlDocument doc = new XmlDocument();

XmlNode n = doc.CreateElement("node");

XmlElement e = doc.CreateElement("type");
e.InnerText = type.ToString();


Hope this helps,


[edited by - edotorpedo on November 18, 2003 5:06:51 AM]

Share this post

Link to post
Share on other sites
Personally, I feel that XML is a good choice for data storage in a text adventure... unless. you are concerned about your players opening the ''plaintext'' xml and tampering to alter their games. Perhaps a binary reader/writer might be sufficient with some baselevel encryption added to it to ward off the casual gamer hacker.

Unless you are defining schemas and actually using a service that can encrypt the data from the XML. I believe that XML is a great choice, personally for your data format, as content databaseing was one of its original reasons for existance. You just need to make sure that the proper level of security is addressed.


Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!