Simple 2D game with Xamarin

20,132

Solution 1

Xamarin only VERY recently announced Xamarin Studio. It used to be called MonoDevelop so that explains why you're having trouble finding search results in google.

The good news is that it does work, I'm currently making games with MonoGame using the new Xamarin Studio. It's not perfect, their are some bugs they are currently sorting out but it's definitely usable.

Here's a game I finished just after Xamarin Studio was released as proof that it works just fine: https://play.google.com/store/apps/details?id=com.craftworkgames.rockrun

So yeah, MonoGame is going through a transition phase, but it's all good.

Solution 2

Monogame works with Xamarin really well:

SETUP:

I know its late but I just joint monogame and found the solution: To make it work follow the following steps:

  • Install the latest xamarin studio from http://xamarin.com/studio
  • Next download the monogame files from https://monogame.codeplex.com/releases/view/102870
  • choose the xamarin version on mac

  • Next install the templates by opening xamarin studio. Next click on the top Mac menu "Xamarin Studio" Addin Manger and choose install from file and select your donwloaded file...

  • so far so good but your png files will not be loaded from here... so solve this issue follow the next steps: visit the git page from monogame and download it: https://github.com/mono/MonoGame

  • after Downloading and unpacking the zip file go into the folder and look open the following file by using xamarin studio MonoGame.Framework.MacOS.sln

  • Now Xamarin studio should open up and include 2 Projects: Lidgren. ... and Monogame.Framework.MacOS

  • on the top of Xamarin studio (besides the play button you should see Debug click on it and change it to Release
  • now do a right click on the Monogame.Framework.MacOS project and build it new
  • This should be done without any errors but you may get warnings... we do not pay attention on them :D
  • next do you need to go again to the downloaded Monogame folder from where you opened the MonoGame.Framework.MacOS.sln project.
  • But this time you need to dive more deep into the folder structure: look for the following folder --> MonoGame.Framework/bin/MacOS/Release
  • the files in the release folder are now your new libraries...
  • You can copy this libraries where ever you want but you should know where they are because you need to add them to your new monogame project.
  • Next open up Xamarin studio and create a new Monogame project by using the already installed templates...
  • Choose the Monogame Mac Application Template

We are now almost done:

  • Look for the reference "folder in the project tree inside of Xamarin studio" and do a right click on Monogame to delete the reference...
  • Now you need to add new references by right click on reference.
  • Access the .Net-Assemblies and add your files from the MonoGame.Framework/bin/MacOS/Release/- folder (make sure that you add all of them)

The final step now is to expand your Content folder in Xamarin studio and do a left click on the logo.png file. on the left side of the IDE you can find Properties. In the properties change 3rd from top to content instead of none. If you run now the template the graphic should be loaded without any problems :D

ENJOY regards Schreda

Share:
20,132
Boris
Author by

Boris

Updated on July 12, 2020

Comments

  • Boris
    Boris almost 4 years

    I've just downloaded Xamarin. To get started I decided to create a simple 2D game for my Android device. Strangely Google didn't turn up any results on 2D game engines for Xamarin. The only thing I could find was MonoGame, but that seems not to work with Xamarin (only Visual Studio and MonoDevelop are supported).

    Can anyone give me advice what engine/framework I could use with Xamarin?

  • Boris
    Boris about 11 years
    Thanks for the info. One question though: How did you get MonoGame to work with Xamarin Studio? I tried to load the current MG version for MonoDevelop, but Xamarin Studio refused to load it.
  • tigerswithguitars
    tigerswithguitars about 11 years
    Bear in mind that because of all the neat stuff in MonoGanme... it is unlikely to work in Xamarin with the starter licence (free one). You''l probably need an indie+ licence monogame.codeplex.com/discussions/437143
  • Boris
    Boris almost 11 years
    Thanks for the reply. For now I'll stick with Unity, since Xamarin is way to expensive for Indie developers. Perhaps one day they'll change their pricing plans and I'll come back to your reply ;-)
  • cansik
    cansik almost 11 years
    very nice! helped me a lot!
  • Danyal Aytekin
    Danyal Aytekin about 10 years
    @Boris Xam Business edition seems about the same price. store.unity3d.com/products/pricing
  • ToolmakerSteve
    ToolmakerSteve over 8 years
    @DanyalAytekin: the personal edition of Unity is free. Limitations: there is a Unity splash screen; can't be used by commercial entity with gross revenue greater than $100K/year; can't mix content developed with personal edition with content developed with pro edition (you can upgrade a given license key from free to pro; you just can't cheat by having one pro license for one developer, and a free license for other developers). DISCLAIMER: I don't use Unity, I've just kept track of them over the years. See unity3d.com/legal/eula for legal details.
  • ToolmakerSteve
    ToolmakerSteve over 8 years
    I think the problem Xamarin has is that an individual can't get very far without needing to pay for an Indie license. IMHO the price of the Indie license (currently $25/mo) would be reasonable if you didn't have to pay it until you were ready to launch your product; the issue is that for many people paying the Indie license fee up front, for a project that might never pan out, is too much. Its also not practical for a project that proceeds slowly over several years.
  • Danyal Aytekin
    Danyal Aytekin over 8 years
    @ToolmakerSteve Thanks for the update. After I wrote my comment, I did try developing an app using MonoGame, and it was a frustrating time. I haven't tried Unity though so I couldn't say how it compares.