Considerations on the 360
Equestrian Dawn is written in XNA. This means that, theoretically, it can run on Windows, 360, and certain phones. This isn't as simple as you'd hope. These are my findings and opinions after a night of experiments.
1 - When targeting the 360, you're forced to use version 2 of most System assemblies. Now, imagine you have some (critical?) data defined in XML. Aside from the issues in point 2, you'll be forced to use a System.Xml that doesn't include any DOM functionality at all - no XmlDocument, no XmlElement, no nothing. All you get is XmlReader, the most basic of basics.
Houses = new List(); var housesDoc = new XmlDocument(); housesDoc.Load(System.IO.Path.Combine(Content.RootDirectory, "Houses.xml")); foreach (var entry in housesDoc.GetElementsByTagName("House")) Houses.Add(House.FromXmlElement((XmlElement)entry)); //static House.FromXmlElement() parses the stuff in entry, returning a new House object.
Houses = new List(); var reader = XmlReader.Create(new StringReader(Content.Load("Houses")), settings); House thisHouse = null; while (reader.Read()) { if (reader.NodeType == XmlNodeType.Element) { switch (reader.Name) { case "House": if (thisHouse != null) Houses.Add(thisHouse); thisHouse = new House(); break; case "Name": thisHouse.Name = reader.ReadElementContentAsString(); break; case "Color": var cvals = reader.ReadElementContentAsString().Split(' ').Select(x => int.Parse(x)).ToArray(); thisHouse.Color = new Color(cvals[0], cvals[1], cvals[2]); break; case "Playable": thisHouse.Playable = true; break; } } } Houses.Add(thisHouse);
2 - You can avoid all the above by using XNA's Content Pipeline to parse an XML file directly into the classes it's supposed to represent. This would take only one line; Houses = Content.Load("Houses");. But of ofcourse, there has to be some dumbfuck downside to this ease. You apparently have to create a dedicated library project to your solution, which the pipeline can then use to produce an XNB file that you can load directly into the Houses array. But the game has to use the same, it seems, and you end up with some sort of datatypes.dll file or whatever in your bin folder! That's pretty fuckin' ugly.
3 - You can avoid the issues in point 2 and still get to use XNB files for your textual data, with free compression on Release builds, by loading not as House[] but string. But guess what? Nobody thought to include a simple "as-is" string content format! You have to make one yourself. On the bright side, it won't visually appear in the end product, and since it's an as-is copy, it's very trivial to implement. And then issue 1 comes to bite you.
4 - On Windows, you're technically free to read and write however, wherever you want. But on the 360, you have to use StorageContainers and such. They're a bitch to implement, too:
var file = "My File"; //First, let the 360's OS show a selection dialog -- memory unit, hard disk...? var iaRes = StorageDevice.BeginShowSelector(null, null); //It's an asynchronous process. For simplicity, we'll just hang the game until a choice is made. iaRes.AsyncWaitHandle.WaitOne(); var device = StorageDevice.EndShowSelector(iaRes); iaRes = device.BeginOpenContainer("EqDawn", null, null); iaRes.AsyncWaitHandle.WaitOne(); var container = device.EndOpenContainer(iaRes); var stream = new BinaryWriter(container.CreateFile(file)); stream.Write("This is the stuff."); stream.Close(); container.Dispose();
This runs on Windows, too! You don't get any selectors, though. It ends up saving in My Documents\SavedGames\EqDawn\EqDawn\My File. No game I have ever played did that.
5 - The rest of GamerServices is just plain unavailable for indie developers. Achievements, for example, one of the must-have "services" for any self-disrespecting modern game:
This class and all related methods and properties only retrieve a calculated result for titles approved to access Xbox LIVE Services through the Xbox LIVE Registered Developer Program. For Xbox LIVE Indie games, the properties in this class will not return a calculated result, and related methods will report a NotSupportedException.
In other words, hobbyists don't get to do achievements. As far as I can tell, you can't even test these things as an indie developer.
My conclusion? Screw the 360 with a big rusty pole. Stick to Windows only. If you're feeling generous, look into making it compatible with something like MonoGame (XNA for Mono, basically). You want achievements? Roll your own. I spent the rest of the night pondering how.
But first, let's look into Steam. I don't like Steam very much, but it's good to know.