Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Simple 2D game with Xamarin

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?

like image 878
Boris Avatar asked Feb 25 '13 17:02

Boris


2 Answers

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

like image 106
Georg Avatar answered Oct 20 '22 01:10

Georg


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.

like image 29
craftworkgames Avatar answered Oct 20 '22 01:10

craftworkgames