Basic starter questions for mono game.

Topics: General
Feb 6, 2013 at 6:43 PM
I recently found out that my university allows me to get free versions of visual studio and xna. I was very interested in this however I found out that XNA is no longer being developed. This led me to here, mono game which is very exciting and i'm very interested in starting. I've used allegro and C++ in the past and it was a lot of fun, but a little primitive.

After reading some tutorials and wikis I think I have a basic understanding of how it all works but I have a few questions.
  1. In the getting started, it doesn't mention installing XNA but I understand you need XNA for building. How does that work then, does mono-game build by itself or do i have to create in mono-game then load into XNA and build?
  2. Someone asked if visual studio was usable with mono-game and the answer was yes, but you cant build for Windows 8...so what would you use then to build for windows 8? Does mono-game have an IDE built into it or can you use something like codeblocks?
  3. What language is used? I've never used XNA before so I assumed its c++ but microsoft has always pushed c#.
Feb 6, 2013 at 8:44 PM
Edited Feb 6, 2013 at 8:44 PM
Hi Jadestar,

Hopefully these will answer your questions:

Q1. MonoGame itself doesn't need XNA to be installed, it can work completely independently of XNA itself. However, the current published release is missing something called the "content pipeline", which is a part of XNA that converts resources (graphics files, fonts, audio files, etc.) into a format that XNA uses (files with an extension of ".xnb"). MonoGame uses the same .xnb files as XNA, but doesn't have the capability to create them, and this is the part of the process that XNA is required for.

MonoGame's content pipeline functionality is in development at the moment and hopefully will be made available soon, at which point the need for XNA itself will be eliminated.

Q2. Visual Studio 2012 will allow you to build MonoGame games for Windows 8. You can either use one of the "full" versions of Visual Studio 2012, or you can download the free Visual Studio 2012 Express for Windows 8 from www.visualstudio.com

Q3. I would expect the majority of MonoGame development to be in C#.

HTH!

Adam.
Feb 6, 2013 at 9:39 PM
Ok that is starting to make sense now. I have access to XNA 4 and Visual Studio 2012 through my university so thats not a problem. I might as well get XNA while I still can in case I need it. So i'm assuming theres some tutorials out there on how to use XNA to do the resource converting and what not. Is that a complicated procedure and is that required for testing while coding? For example while coding with allegro and c++ in codeblocks, I would just hit F9 i think to run and test the game at any point and didnt have to export any thing or build resources in another program. I guess i'm not fully understanding the whole procedure.

SO probably what I saw about visual studio was visual studio 2010 not being able to do win8 but 2012 can. Again, I have access to the full version of visual studio 2012 through my university so ill get that as well.

Yeah c# seems nice actually, somewhat of a middle ground between c++ and java!? (not to offend anyone :)). I have a good amount of experience with java AND c++ so c# shouldnt be a problem. Look forward to it.

Thanks again for all the information.
Feb 6, 2013 at 10:05 PM
The full version of VS2012 won't come with any XNA capabilities, but when you download and install the Windows Phone 8 SDK to go with it, that's where your XNA development environment (for Windows Phone) will come from.

Using it to build your content files it pretty easy: create an XNA project, add your resources into the "Content" project that comes along with it, and compile. You'll find the resulting .xnb files inside the bin folder of the main XNA project. You can either copy these to a folder within your Windows 8 project, or add them as links from the Windows 8 project (which will simplify the task of updating them each time your resource files are modified).

You should be able to find plenty of tutorials and examples of using the XNA Content project, and of loading the content resources into an XNA project (which is identical to loading into a MonoGame project).

C# is probably my favourite of any language I've ever programmed, and I've tried a few. It's closer to Java than C++ in syntax, but they're all relatively similar.

Have fun :-)

Adam.
Feb 6, 2013 at 10:17 PM
So when you say

The full version of VS2012 won't come with any XNA capabilities, but when you download and install the Windows Phone 8 SDK to go with it, that's where your XNA development environment (for Windows Phone) will come from.

Do you mean that VS2012 can ONLY write xna/monogame for windows phone? So what would I use to develop for Windows7/Windows8/8metro, android etc...?

SO basically If i'm using mono-game, i'm only using XNA for resource converting. SO that makes sense to keep them in XNA if/when they are updated and them put them all together when the game is released (whever it happens to be released to) and just link my monogame game path to where xna has them stored and converted. Got it.

Thanks.
Feb 6, 2013 at 10:28 PM
In VS2012, the only supported platform for XNA is Windows Phone (and it's actually Windows Phone 7), which is installed via the Windows Phone 8 SDK. That's the only platform you'll be able to develop XNA games for with VS2012. Your options are as follows:

VS2010 can use the XNA Game Studio 4.0 SDK to target Windows 7 (and Windows 8 desktop, but not Windows Store), and Windows Phone 7.

VS2012 can use the WP8 SDK to create XNA games to target Windows Phone 7 only.

VS2012 can use MonoGame to target Windows 8 (proper Windows 8 store apps) and Windows Phone 8 apps.

-- If I've missed anything here then I'm sure someone else will be along to correct me soon! :-)

Adam.
Feb 6, 2013 at 10:34 PM
A little bit confused now.

So then MonoGame can only develop for win8 metro and phone 8?

Or can vs2010 and/or vs2012 use mono-game to develop for windows7/8 desktop?

What I want to do is just use monoGame, as XNA is basically dying (but ill use it to convert resources until monoGame can do that itself), and develop games for windows7/8 desktop that I may want to port to win8 apps, android and iOS in the future (possibly).

One last (probably) question. SO if someone knew how to code using XNA, they could easily move to monoGame? I do enjoy internet tutorials and e-books and youtube, but nothing beats a good ol fashion text book in my opinion. So if I bought a book on XNA from chapters or amazon or whatever, would that still be relevent to coding using monoGame. If so, any good book recommendation for beginner and intermediate? Honestly I would love it if there were a series of books that started off beginner and moved into advanced and super-advanced eventually, rather than dealing with a beginner book from one author and an intermediate from another etc...

Thanks a lot, your help is very much appreciated.
Feb 6, 2013 at 11:03 PM
My bad, I believe VS2012 and MonoGame can indeed be used for Windows 7/8 desktop. You'll find a table of supported frameworks here.

If you already know how to code in XNA, you should find it very easy to switch across to MonoGame. The majority of the code is 100% identical between the two (and major kudos to the MonoGame team for managing this!). So I would say that an XNA book would still be relevant. When I upgraded my WP7 XNA projects to MonoGame, I literally had something running and working inside of 20 minutes. It took a lot longer to polish up for Windows 8, but that shows you how similar they are to one another.

I'm kind of biassed when it comes to books about XNA as I've written one myself. ;-) My book focuses on XNA on Windows Phone, but I'd say that a fairly significant proportion of it is relevant to MonoGame on other platforms too. If you'd like to know more, you can find it here on Amazon.com -- they're selling the paperback for $9.44 at the moment which I think is a pretty good price!

If you'd like something more focussed on Windows development, I'm sure that there are plenty of other good books too, but I don't have any specific recommendations myself. I'm currently writing another book specifically covering MonoGame development for Windows 8 and Windows Phone 8, but I would imagine it'll be at least 4-5 months before it's published so that probably won't be much use to you.
Feb 6, 2013 at 11:46 PM
Ok thanks again. That link points to the "price" page but thats ok, i can find that frameworks page myself.

Nice book by the way. I may have a look at it.

I think i've convinced myself (with your help of course) to start working with mono game and vs2012. Looking forward to this project.

Thanks again.

p.s. Once you release that next book, let me know please and thanks.
Feb 7, 2013 at 12:12 AM
If you scroll down the price page a little, you'll see a table showing the prices for each framework, that's what I was using to see which platforms are supported.

It sounds like MonoGame and VS2012 should work very well for you!

I'll do my best to remember to let you know about the new book once it's ready, or if you prefer you can follow me on Twitter (@AdamDawes575) where I'll definitely be mentioning it once it's ready. :-)

Best regards and good luck!

Adam.
Feb 12, 2013 at 5:04 PM
Thanks again.

Can I use monodevelop instead of vs2010/2012? For making windows games in windows and later porting them to other platforms.
Coordinator
Feb 12, 2013 at 5:08 PM
You can use MonoDevelop for most of it. There is still a dependency on using VS2010 and XNA for content building for now.
Feb 12, 2013 at 7:08 PM
Right.

thankyou.