문제

Is it possible to write one single code base using the MonoGame framework and have it compile on the following platforms: Android, IOS and Windows Phone?

도움이 되었습니까?

해결책

You can do this, I have done this for my game Tokyo Hosto for the following platforms: - iOS - Android - Windows Phone - Windows 8 Metro - Xbox 360 - OUYA - Playstation Mobile

I first created the XNA projects, coded them to about 90% and when there was a lull in development (because I was waiting for animation to be sent to me) I started work on a MonoGame port. I didn't do anything particularly clever, instead of copying in my source files I linked them in. This meant there was a single set of code used for each platform.

I simply used compiler directives to iron out the platform specific details.

다른 팁

You cannot have one single code base for MonoGame projects that deploy to iOS, Android and Windows phone. According to the MonoGame website you'll need to use two different IDE's, Mono Develop for iOS, Visual Studio for Windows Phone and Visual Studio or Mono Develop for android.

The good news is that the code you write will be mostly reusable but there maybe some small tweaks.

I'd recommend reading around the MonoGame documentation.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top