Upgrade XNA 4.0 solution to MonoGame - c#

Could someone explain, how to "transform" an existing XNA 4.0 solution to a MonoGame Windows Phone 8?
My XNA solution has 4 projects:
1. contains the Game() class
2. Content which includes the .fbx model (rigged 3D hand)
3. the Model proj with 4 classes (AnimationClip, AnimationPlayer, Keyframe, SkinningData)
4. Pipeline, where the ContentProcessor() is
Nothing special in the code, it was written on the basis of "Better skinned sample". In the Game() class I wrote a method, which provide a skeletal animation. It works perfectly, but I have to upgrade to MonoGame, because of some integration issues.

I recently did exactly what you asked for my own game.
You can start as you are. Almost 100% of the source code that worked in an XNA 4.0 project is compatible with MonoGame. Essentially copy over the code to the new project and you are good to go.
The only issue is with the content loading. I highly suggest you use the nugget packages to install Monogame on a solution and create a content project. From my experience fbx models are supported OK at the moment and can be compiled to xnb just OK.

Related

MonoGame Xna how can I import an animated model from Maya

I have been trying to get an animated model from Maya to Monogame and Xna but all i get is a rigid model with no animation. I converted the model to fbx and then to xnb files but nothing is working. Found some hints to the SkinnedEffect but I cant seem to make it work. I found some samples of of rigged models but I get an error when i try to open the project in Visual Studios. Cans somebody help me with this issue.
There is an example how to implement model animation logic for XNA game.
Try install same version of XNA and VS if you got en error. I have XNA 4 and VS2010 and I successfully has opened this project.
If you need more theory look for it on the Internet.
if you need an example I can give you my own (not totally completed) example with importers and processors for .obj and .smd models included.

How to use Xna Content Compiler on visual studio 2013

I saw this solution here so I downloaded and tried to run but I've never used XNA and the website from the link doesn't have any instruction/documentation...
Anyone who uses it have any suggestions?
(I don't have xna... I'm trying to use monogame)
Another rather classic solution is to install XNA framework included in Windows Phone SDK 7, create a separate XNA solution just for the purpose of building XNB files.
To get XNA working on your computer (for VS2010 - VS2013) first download Windows Phone SDK 7 and 8 (both of them) from here:
https://dev.windowsphone.com/en-us/downloadsdk
And then you can install XNA implementation for VS2010 - VS2013 from here:
https://msxna.codeplex.com/releases
Once all is installed, just create a new XNA Game solution. XNA will automatically create two projects for you, one of which is "Content" project, where you can place all your assets (pictures, sounds, fonts). After compilation you will get your XNB files created.

vs2012 and xna4 (monogame)

I got totally sick from this "how to install xna for visual studio 2012" thing. I was searching a lot, checked out lot of tutorials, that work half as I want, and I really know that google is my friend.
I noticed that peeps use monogame nowadays, instead of xna. "SURE": so I installed monogame. Totally cool, I saw it in VS2012 too. But content...
It uses xna content as I understood, so xna developers need less time to adopt their game. Cool. Let's see tutorials... they say you should install VS2010 and then hipp-hopp back and forth to have content in your VS2012 project. Now well I do not want that.
I installed windows phone sdk 8 (or what?) so I can add xna4 content and pipeline projects in VS2012 - so... without VS2010.
Cool, but I can not make it work at all. I got content project, with a .X file in it and a .BMP so that has a texture. I added a WindowsPhoneGameLibrary too, and added content reference as well. I compile and the xnb files appear - pretty cool, I say. Then I try to link all this to the main project and nada.. it says it can not be linked (main project is monogame for windows 8 with xaml). OMG why? When I do model = content.load(etc) it can not load, since the file is not there.
So.. my simple question is: how can I make it "just to work"? Without wizardry or manually copying files from here to there, or without installing VS2010, and such or just without getting bald.
Like the others, I think your question is a little ranty and I don't really understand it but I think reading these might help.
Why is XNA not supported in vs2012?
How to install XNA game studio on Visual Studio 2012?
In regards to your content issues:
"When I do model = content.load(etc) it can not load, since the file is not there."
Ensure all art/sound/effect assets File Properties are set properly:
Build Action should be set to Content
Copy To Output Directory should be Copy if newer or Copy Always
You CAN use XNA with VS2012! Don't give up yet! :) Here's how I did it: How to install XNA game studio on Visual Studio 2012?
You can use XNA with VS2012 (I do it all the time). However, if you're using MonoGame (as I understand from the post), you have to use XNA to convert your content into .xnb files and then put them into the MonoGame content folder. You can't use the Content Pipeline in MonoGame. This might help: http://blogs.msdn.com/b/tarawalker/archive/2012/12/04/windows-8-game-development-using-c-xna-and-monogame-3-0-building-a-shooter-game-walkthrough-part-1-overview-installation-monogame-3-0-project-creation.aspx. Even though it's Windows 8, I don't think that XNA development is different on Windows 7 and 8 (the window will just look different).
Also, if this answer helped, please mark it as the correct answer :). I'm new to the site and could use the reputation ;).

Can't add new monogame content project to solution in VS2012

I'm trying to add a new MonoGame content project (via templates installed in the MonoGame 3.0 installer) to an existing solution in Visual Studio 2012 (Professional), but it always comes up with the following dialog box:
It does create a few empty folders where the project should be, though they don't have anything in them. After this popup it also comes up with this:
I do not have XNA installed as VS2012 does not support it.
Also, I am using Windows 7.
Thank you!
If i were you I would read the three blog posts that Tara Walker has made about Windows 8 game development starting with this one: Overview, Installation and MonoGame 3.0.
The third blog post talks about creating a Content Pipeline outside of Mono Game (using XNA) and importing it into your MonoGame project. It sounds like you will need XNA so you'll need to read through her information and figure out how to get it working in VS2012 Express.
I've been dabbling with a MonoGame project in my spare time and I have been able to load some textures and sprite sheets without a dedicated content project; everything is just added to the project solution and created during initialization of the main class. But I don't know if this is viable in the long term.
HTH.
Mono Content Project depends on the XNA as MONOGAME is still working on truly independent CONTENT MANAGER. So as off now we have to intall XNA. Download it from XNA zip and unzip the content because XNA is not officially supported by MS.
Read the attached readme and install as mentioned. Don't forget to intal the file in zip folder named
"XNA Game Studio 4.0 (2012).vsix" which installs the "XNA" template for VS.
Now try to create a sub-project for your content. Your problem should be fixed !!

What's the difference between a Windows Game Library and a Class Library?

What's the difference between a Windows Game Library and a Class Library? Is it just that one starts off by including the XNA Framework?
Also, where are the differences between the Windows / Xbox360 / Zune Game Libraries? They all seem to start off with the same References (Microsoft.Xna.Framework, Microsoft.Xna.Framework.Game).
There is no real difference. It is just a project template, it helps you get all the project settings right. Yes, the assembly references are one of the biggies. I don't have it installed to check, but you can use, say, notepad to look at the .vcproj file to see what settings are overridden from their default.
I'm a bit late here with my answer, but the main difference between a Windows Game Library project and a simple Class Library project is that a Windows Game Library project can contain content references (they can build in content from referenced XNA "Content Project" projects).
Additionally, they can use XNA's project synchronisation (MSDN) to maintain copies of the project for different platforms, that keep their list of source files in sync.
Finally, these projects get an "XNA Game Studio" properties page, where you can select between the "Reach" and "HiDef" profile, and set a Game Thumbnail. Although these have no effect on libraries, as far as I know - they are only relevant for Game Projects.
XNA Game Projects have the same special features as Game Library Projects. They're just set to output an application instead of a library.
It's worth noting that you don't have to use these special "Game" versions of the project templates that XNA provides. You can still make an XNA game just by referencing the XNA assemblies. But obviously you won't have access to these nice project features, so you will need to come up with alternatives.

Categories

Resources