XML (Extensible Markup Language) is a markup language that defines a set of rules for encoding documents in a format that is both human-readable and machine-readable.

learn more… | top users | synonyms

31
votes
6answers
4k views

What is a good file format for saving game data? [closed]

I need to save some custom game data. Map, player, etc. All of them will have "sub objects". For example, a map and map will have an "array" of tiles. ie, hierarchical data. Hopefully nothing ...
18
votes
6answers
3k views

Would it be better to use XML/JSON/Text or a database to store game content?

I'm considering how to implement a component-based game, as that seems to be the hot thing and I like the idea of such a flexible design. One of the features of such a design is that adding new ...
16
votes
7answers
3k views

'Binary XML' for game data?

I'm working on a level editing tool that saves its data as XML. This is ideal during development, as it's painless to make small changes to the data format, and it works nicely with tree-like data. ...
13
votes
4answers
3k views

How to choose how to store data?

Give a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime. - Chinese Proverb I could ask what kind of data storage I should use for my actual project, ...
12
votes
5answers
720 views

Why place entity config outside of scripts?

I've seen a lot of games that define the entity components in script files, but when they configure each entity and specify what components it has, they use some other file format (like XML). Why do ...
12
votes
3answers
2k views

How to store a shmup level?

I am developing a 2D shmup (i.e. Aero Fighters) and I was wondering what are the various ways to store a level. Assuming that enemies are defined in their own xml file, how would you define when an ...
11
votes
7answers
6k views

What is a good way to store tilemap data?

I'm developing a 2D platformer with some uni friends. We've based it upon the XNA Platformer Starter Kit which uses .txt files to store the tile map. While this is simple it does not give us enough ...
9
votes
2answers
7k views

How to use XML files as content files in XNA?

I have an XML file representing different car manufactures that will be available in my game. The file looks like this: <?xml version="1.0" encoding="utf-8" ?> <XnaContent> <Asset ...
9
votes
1answer
544 views

Organising levels / rooms in a MUD-style text based world

I'm thinking of writing a small text-based adventure game, but I'm not particularly sure how I should design the world from a technical standpoint. My first thought is to do it in XML, designed ...
8
votes
1answer
1k views

Why does XNA's ContentManager follow generic type parameters for serialization purposes?

I've finally gotten to the bottom of a problem and am wondering what my best recourse is. In short, the problem is that XNA's ReflectiveReader reflects into generic type parameters, even if no ...
6
votes
2answers
359 views

What is an elegant way to localize level data?

I'm writing a simple android game. I planned to store all levels in xml files that contain info about level, including a level_name field. The Level class would load an appropriate level by parsing ...
6
votes
2answers
696 views

Can XNA Content Pipeline split one content file into several .xnb?

Let's say I have an xml file which looks like this <Weapons> <Weapon> <Name>Pistol</Name> ... </Weapon> <Weapon> <Name>MachineGun</Name> ... ...
5
votes
4answers
2k views

Should NPC dialog be stored in XML or in a script?

I'm developing an action RPG with some friends. I would like to know the differences and pros/cons of making NPC's dialogue using a file in XMLformat instead of using a script. I see that script ...
5
votes
4answers
776 views

Drawbacks of using reflection for a component based system at loading-time

I'm coding a little casual game in Java using Slick2D. This game use a lot of different "objects", managed in a composite way. So, firearms, furniture in the map, NPC and player character will be ...
5
votes
1answer
475 views

How can I pass an external instance to the constructor of an object that's being created using the default XNA XML content loader?

I'm trying to understand how to use the XNA XML content importer to instantiate non-trivial objects that are more than a collection of basic properties (e.g., a class that inherits from ...
4
votes
2answers
466 views

How is xml being used for a game engine

In this question the first answer explains a way of defining components of a gaming engine in xml like this: <?xml version="1.0" encoding="UTF-8"?> <mobs> <mob> ...
4
votes
3answers
2k views

Loading levels in XNA from XML

I'm trying to load levels in XNA from XML files. I have currently got a system to do this working, but it looks like it might get horribly complex as I add more objects later on. My world currently ...
4
votes
3answers
846 views

Isometric tile map format

I've just knocked up a fairly basic isometric tile based game and I'm looking for the best way to store the level data. Each tile coordinate is assigned one or more numbers that correspond to a tile ...
4
votes
1answer
228 views

Using heavyweight ORM implementation for light based games

I'm just about to engulf myself in an MVC-based/Component architecture in C#, using MySQL's connector/Net for the data storage, and probably some NHibernate/FluentNHibernate Object-relational-mapping ...
4
votes
3answers
262 views

Runtime Storage vs Static Storage

Runtime Storage (hardcoded) vs Static Storage (file storage) (original question) I extended my engines GUI from procedural style to object orientated style, but I still have to create ...
4
votes
2answers
2k views

How do I store level-data in Android?

I'm building a game where enemies come in waves. I want to create a file where I can define data about the waves (# of enemies, spawn times, speeds, etc.). I come from a background in iOS and would ...
4
votes
1answer
250 views

How to store and parse story actions in XML

I been working on a game in Unity that reads its story (Actions, scene descriptions, NPC's, ect...) from an XML and have been wondering there was a better way to store actions based on player data ...
4
votes
2answers
2k views

Recommended method for XML level loading in XNA

I want to use Blender as my level designer tool for an XNA game. Using an existing plugin, I can export my levels to DotScene format which is basically an xml file like this one: <scene ...
4
votes
3answers
1k views

How do I use Content.Load() with raw XML files?

I'm using the Content.Load() mechanism to load core game definitions from XML files. It works fine, though some definitions should be editable/moddable by the players. Since the content pipeline ...
4
votes
2answers
868 views

Setting variable values in XNA 4.0 from an XML file

I made a program that simulates an assembly line using the XNA 4.0. I made a 3D model, and divided it into 5 positions - start, 3 workstations, and end. These positions represent the places on the ...
3
votes
2answers
200 views

Simple Update loop to show questions one at a time

I have two lists which work with an XML file which holds questions and answers. At the moment the project displays all the questions at the same time so they "flicker" on the screen and iterate ...
3
votes
2answers
262 views

Does using the XNA Content Pipline eliminate the overhead caused by file IO when working with a large number of files?

I'm working on a game in XNA with my goal being that it is fairly data driven so that I can easily tweak the system without having to update code. The research I've done shows that using XML files ...
3
votes
2answers
2k views

Using XNA's XML content pipeline to read arrays of objects with different subtypes

Using XNA's XML content importer, is it possible to read in an array of objects with different subtypes? For instance, assume these are my class definitions: public abstract class MyBaseClass { ...
3
votes
1answer
823 views

Loading class instance from XML with Texture2D

I'm having trouble with XML and XNA. I want to be able to load weapon settings through XML to make my weapons easier to make and to have less code in the actual project file. So I started out making a ...
3
votes
2answers
318 views

Issue with loading XML

So recently i've been changing my XML files that i'm using in-game, to add in a bit more data to the files but i've also changed the way in which i load & save files, by now using the XDocument ...
2
votes
2answers
252 views

Convenience of mySQL over xml

Currently I use XML to store specific information to correctly load a few things such as a list of specfied characters, scenes and music, Once more I use JAXB in combination with standard ...
2
votes
2answers
308 views

Unlimited inventory system?

I am working on a small game, I need to add an unlimited inventory to the game but I am not sure how to do it. I have an inventory system with a specific amount of slots, here it is: <?xml ...
2
votes
1answer
2k views

Xna, writing XML </Asset> end element

got another question here. Its not about actually writing/reading files in XML, i already know how to-do this. But rather something that has bugged me for awhile. Ok, so when i write out my files, ...
2
votes
1answer
625 views

Building different game objects (EG Spells, Items,) for an rpg game

I believe the best way to manage item data would be to use xml? For spells would the best option be to create a class (EG Fireball) and define all of the parameters inside of that class? Like ...
2
votes
3answers
3k views

Where do I place XNA content pipeline references?

I am relatively new to XNA, and have started to delve into the use of the content pipeline. I have already figured out that tricky issue of adding a game library containing classes for any type of ...
2
votes
1answer
748 views

Using XML in XNA to display maths questions which are associated with objects

I've got a snake game with three objects: apple, pear & orange. I would like these to be associated with questions which I'm trying to create in XML. This is what I've done so far... <?xml ...
2
votes
1answer
1k views

AndEngine - Moving Rectangle using Accelerometer

I'm learning how to create games with this great engine and I'm trying to put my knowledge in order to create a simple game. My first goal is to make a Rectangle moving using accelerometer and create ...
1
vote
2answers
211 views

When should I be implementing XML documents

I often struggle with the question of when to use XML docs. Does anyone have a good rule of thumb when it comes to deciding to use them or deciding not to use them. At the moment I am working on a ...
1
vote
1answer
144 views

How to split a string with negative numbers using ActionScript 3.0

I'm having trouble loading my level. I'm using Ogmo to create my level then I import it. I have no problem converting 0's and 1's into an Array, but I can't figure out how to do the same for -1's. It ...
1
vote
3answers
636 views

Opening an XML in Unity3D when the game is built

At the moment, my game can open up an XML file inside the editor when I run it. In my XMLReader.cs I'm loading in my file like so: _xmlDocument.Load(Application.dataPath + ...
1
vote
3answers
344 views

Help Reading this Data in XML as a List (ContentReader)

Edit: So i'm going to rephrase the question a bit, seeing as now i think know how i'm going to read this data. Looking at this example as my guide: ...
1
vote
1answer
398 views

Deserialize inherited classes into the same list in XNA

I am writing a Gui for a game (for what else ...). Therefor I wrote a class GuiElement which has some serializeable fields. From this class I deflect a Class "Button" which has one serializeable field ...
1
vote
1answer
909 views

Going from using XMLSerializer to using the XNA Content Pipeline

A well known limitation of using the XNA Content Pipeline is that it is not included in the XNA redistributable. So, if you want to create an editor for your game, the designer must download the whole ...
1
vote
2answers
164 views

Store voxel type data in XML or Java classes?

So, I want it to be very easy to create all the entities of my game and for other people to come in and do the same. I was thinking I could just let the users/myself create an XML sheet the stores all ...
1
vote
1answer
1k views

XNA doesn't compile my XML to an XNB, because of namespaces?

I am sorry, because I know, that this question came up before, but that thread doesn't help me so I decided to aks my own question. My problem is the following: I have a XML-file with the following ...
1
vote
1answer
63 views

How to store XMLs in Unity for web player deployment?

I've created with Unity a short demo that works as a standalone .exe on Windows, and I was interested in deploying it as a web player game too. When I run the game on the web player, though, I get ...
1
vote
2answers
76 views

Java: creating an instance of a user defined class by reading xml file

I am trying to write an engine for a game, in particular a component-based one (in my approach components contain both data and logic). So basically I have entities, and each entity has a list of ...
1
vote
1answer
98 views

ContentManager in XNA cant find any XML

Im making a game in XNA 4 and this is the first time I'm using the Content loader to initialize a simple class with a XML file, but no matter how many guide I follow, or how simple or complicated is ...
1
vote
1answer
104 views

XML serialization error on XBOX 360

When try to save game on an xbox with xml serialization i get a code 4 error. I made sure t oadd all the xml referances and there is no errors until i run the game. Any suggestions?
1
vote
1answer
74 views

Data model for unlockable card collection

My game has a collection of cards (about 64) that are unlocked (one by one) provided that 4 items are collected/gained in the game. Right now the deck of cards is modeled with a plist file, like ...