Porting to Xamarin Studio

I have a windows phone 7 XNA game finished in Visual Studio 2012. I want to port it to Android/iPhone using Monogame. Being an indie developer, the business version would add up to 2000$, which is a bit prohibitive so I decided to go with indie version and use Xamarin Studio. However I have not found much in terms of a guide for doing this. Simply trying to open my game solution inside Xamarin Studio fails with "Unknown solution item type" on all inner projects. I tried deleting the XNA references and opening it again but the problem persists. Monogame provides some sort of an mpack for Xamarin Studio which I have no idea what it does or where to put it.

I would appreciate some guidance on these issues. Thanks.

Posts

  • DeanEllisDeanEllis USXamarin Team Xamurai

    Hi

    Your Windows Phone 7 project will not open in Xamarin Studio because its not a supported project type. To use MonoGame in Xamarin Studio you need to install the Addin which you can download from the codeplex site (http://monogame.codeplex.com/releases/view/102870). You need the Xamarin Studio .mpack.

    In Xamarin Studio you need to open the AddIn's Manager and use the Install from File option to select the .mpack and install the addin.

    You should then be able to create a new MonoGame for Android project (providing you have the Xamarin.Android installed). That template will give you a basic game which displays the CoreFlowerBlue screen. The next step is to link to the existing game files, and also link to the existing .xnb files.

    A tutorial is available at http://www.youtube.com/watch?v=hF0sm5KGPPM. Its a bit out of date because you dont need to add the monogame libraries as the .mpack has pre-built assemblies.

    Note , you will need a Mac to target iOS you can't do it from a windows machine.

  • DominiqueLouisDominiqueLouis GBMember Xamurai

    Hi Ramsay,
    Firstly you will not be able to open your existing XNA project in Xamarin Studio as it does not know about the custom XNA project types Visual Studio knows about.

    Instead, you need to create a new Android project, then "Add as Link" all your source files and xnbs assets into that that new project. Changes the references to point to MonoGame assemblies and take it from there. This is a very rought overview of the process. For a better look of setting up a project please take a look here - https://github.com/CartBlanche/MonoGame-Samples/ were you will find out how to set up iOS, Android etc MonoGame projects.

    Note that for iOS games, you will need to Mac.

    I would also suggest that you post MonoGame related questions over on the discussion forums over at monogame.codeplex.com as there are more active users there, and you are more likely to get a quicker response.

    I hope this helps.

    D.

  • RamsayAmarinRamsayAmarin JOMember

    Thanks for the helpful responses. I actually find better responses here. Some posts go unanswered on monogame codeplex.
    While the basic template now runs and shows a blue screen, Xamarin Studio reports a problem with the Lidgren.Network and MonoGame.Framework, labeling them in red "File not found"?

Sign In or Register to comment.