Just the other day I saw the link to this page on the Xamarin web site. http://developer.xamarin.com/guides/cross-platform/cocos2d_xna/cocos2dxna_tutorial/
I figured I give it a try to see if I could get it running.
I ran into a couple of issues on the way.
1. The git-stuff didn't work as expected
Disclaimer: This is probably due to my small experience with git.
In the beginning of the tutorial there is a link to clone the git repository for Cocos2D-XNA. I followed it and got started. The first git command under "Code on GitHub" worked fine.
That is the $ git clone https://github.com/Cocos2DXNA/cocos2d-xna.git
Also the sub module initialization and update worked great.
$ git submodule init and $ git submodule update
$ cd MonoGame
$ git submodule init
$ git submodule update ThirdParty/Libs
Is this a problem? I don't know? :D If someone reading this knows the answer, please comment to enlighten a poor git fool.
2. Downloaded the bananas project
Yup, did so and unzipped it into my favorite folder. Had to move the project around to get the correct relative path to Cocos2D-xna since it loads some of the Cocos2d-xna projects. Not an issue, but it could be explained somewhere that you need it to be relative to the Cocos2D-xna folders.
3. Cocos2D-xna does not build
In the Cocos2d.ios project there is a class named CCTextFieldTTF. It cannot resolve a namespace reference to Microsoft.Xna.Framework.GamerServices. So what I did was to add the !IOS compiler directive to simply not include it for my iOS configuration. I also have to correct this in like five other places. It does build and run after that.
#if !WINDOWS_PHONE && !XBOX && !PSM && !IOS
using Microsoft.Xna.Framework.GamerServices;
#endif
After that, all success and I could collect as many bananas as I'd liked.
No comments:
Post a Comment