I've been porting a rather large project from XNA to IO using MonoGame and the Xamarin Studio - and it's been an exciting and often frustrating time.
I've run into functional failures, outright crashes and just plain Stuff That Doesn't Work All The Time - and I thought you'd want to know about it so you guys can look into it. I'm using
Here's a run down of some of the stuff I've noticed.
1) You cannot mark files with a build action at the directory level. As I said, I'm porting an existing project and it has LOTS of assets, all carefully arranged in quite deep directory structures. The only way I have found of setting the build action is to select each and every file and mark it. That means opening up each and every directory structure and doing that. That's not fun. If I could simply select a directory in the project and mark it that way, that would be a serious win for me.
2) I was told that if I put assets in to the Resources directory, they would automatically get marked as Bundle Resources in the Build Action. That might be true if I physically put them in the actual Resources Directory in the project - which I cannot do since I don't own these resources and I cannot move them around in the root directory - but if you just add a folder under the Resources directory in the project, in Xamarin Studio, nothing gets marked as Bundle Resource. I still have to make them all individually. Don't know what is going on there.
3) Move does not work. Some of the time it outright crashes, most of the time it just does nothing. I am attempting to move a reference to a physical directory in the project from one folder to another, using the move function, but nothing at all happens, or a I get a stack trace. (which I apologize for not including here. I should have recorded it when I saw it.) No idea why.
4) If you delete the reference to the Resources directory, the IDE will not allow you create another one. It took me a few days of back and forth to understand that because the physical Resources directory still exists in the project on disk, the IDE won't let me create another one. I simply didn't understand why I was getting the error message I was when I was trying to create a new folder. Not sure what you can do about this to make this more obvious?
5) Exception handling / Debugging. Given the codebase is just littered with try catch exceptions, it would be nice if the debugger handled them correctly. Most of the time, when I am stepping into a function where I know an exception is going to happen, the debugger does NOT step me into that function, it just goes straight to the catch. This is unhelpful, for obvious reasons. This happens even when the exception is happening several functions deep from the function I want to step into. About the only way I can get around this is to put a break point directly in the function being called, and that stops it. Either way, stepping in when exceptions are being fired appears to give the debugger serious issues. And given how much of the code base IS try/catch oriented, you can see how much of a problem this can be.
I have found the Break on Exceptions settings, but it gives you a list of exceptions to break on and that's not that helpful bearing in mind quite a lot of the catches are for generic exceptions - basically I have no idea what I'm supposed to break on, since the catch itself - where the exception is being caught - is for extremely generic catches. Without knowing what the actual throw was, it's hard to know what to put an exception break point on.
This is more a problem with how the codebase has been architected - someone is very attached to Try Catch, to the point where the code base has lots of nested try/catch hierarchies and very difficult to trace / debug.
6) Most of the time the locals variable window is just not populated. Usually when I start up Xamarin Studio, start debugging, it works. Then something happens during the session (after I've been debugging, stopped and gone back to editing, rebuilt and restarted) and it stops being populated and nothing will make it work again. The only thing I can do at that point is mark variables in the Watch window, which will still update.
7) What does Immediate Mode do in the debugger? I'm imagining it must be like the console debugger in XCode? What is the syntax to use it? I can't find any documentation on it. A link on how to use it would be great, thanks!
8) The content build pipeline. Where to begin with this. The words "Absolute mess" don't even begin to cover this. I spent two hours last night on skype with one of the architects of the IOS version of this, and it took us two hours just to get the content build to output anything specifically IOS related.
Some learning that I think needs to be disseminated - the content pipeline will not do automatic power of two conversion of assets that are NOT power of 2 (which, of course, none of ours are), despite the settings you can set in the content pipeline per asset (that setting is not actually hooked up to anything behind the scenes - I went through the code last night). However, if your assets are already power of 2 (as they automatically are in the case of SpriteFont definitions) then yeah, compression happens. Otherwise it does not.
Also, in my case, even though I had XNA 4.0 installed, the content build system requires a higher version of XNA - but since MS is not actively developing that, you have to install the Windows 7 mobile SDK version 7.1 - assuming you can find it, since MS isn't actively distributing it any more - (and it's update of 7.1.1) which has the XNA upgrades that are required before drop downs actually appear in the Visual Studio 2010 content build project. Yeah. And I had to just Work That Out via googling for an hour when the provided projects didn't work.
So say this pipeline process is a mess is putting it mildly.
Now I also get that this isn't anyone at Team Xamarin's fault either. You guys didn't create this CF of a pipeline and I somewhat suspect you guys would like 5 minutes in a dark alleyway with the architect of this, just like I would - but the fact that it's as messy as it is to try and port this to IOS is just... not optimal. I mean, having to edit project files with a text editor? Really?