MonoGame (Windows 8+RT development) and FSE issues

Topics: User Forum
Jan 9, 2013 at 12:40 PM

After setting up MonoGame and doing some simple stuff to see that it's working, I decided to test out FSE for an upcoming game I want to make. I threw all the necessary code into the project, build...and BAM!

https://dl.dropbox.com/u/40864263/Untitled.jpg

So going through each of these errors:

1st is for allNodes.ForEach(AddNode); which can just be converted to a standard foreach. CHECK!

2nd revolves around the line "[MethodImpl(MethodImplOptions.Synchronized)]". 'Synchronized' is not one of the options. There's AggressiveInLining, NoInLining, NoOptimization, and PreserveSig. I have no idea what this means so I just commented it out. Bad idea?

3rd says that XmlWriter doesn't have a close method. I changed the call to Dispose(); 

4th is just a debugging thing so I commented it out. 

5-7th are just outputting to console and even have "// TODO: remove" so I just commented them out. 

8+ are all referring to the FileStream class in the Serialization file. It can't find it (yes, the imports are right). There could a be a .dll that I need to add.....but System.IO IS included so I do get access to FileMode and whatnot, but I guess since it's a Windows 8 Store app, they do all of that async stuff. Does anyone have a suggested workaround for me to fix this part? 

 

Thanks!

Jan 9, 2013 at 1:06 PM
Edited Jan 9, 2013 at 1:07 PM

For No 8 it's not so much the async stuff (which is pretty trivial to implement) but the fact that on WinRT you can't just access a random file because of security. You should check the Windows.Storage namespace and MSDN for more details. Basically the usual way is for you need to get a StorageFolder instance from the allowed list e.g:

StorageFolder localFolder = Windows.Storage.ApplicationData.Current.LocalFolder

And then you create/modify a StorageFile instance obtained through the methods of the StorageFolder. The streaming stuff is  almost the same with just name changes.