Posts tagged: mono

MonoGame, XNA and Documentation Hell

2000px-MonoGame_Logo.svgI confess I have some admiration towards the Mono Project. It is the base of different tools, and it allows those tools to run virtually on any device. A good example is the Unity 3D Game Engine.

In my teaching duties this year I need to each MonoGame. Not sure if this is a good choice or not, I just needed to keep with the old syllabus as I did not have any time to prepare the course as I should.

In case you are not aware, MonoGame is Microsoft XNA made public. Although the libraries, themselves, are easy to install under Windows, the most recent version is not available for Mac or Linux. The documentation that is available is mostly from the old XNA, in Microsoft MSDN. There are a few mini tutorials and blog posts that help on some specific details, but there isn’t a official, well prepared, source of documentation, and that is a shame.

Another problem from basing things on Microsoft previous work, is that MonoGame depends on Windows libraries, some of which are not free, and can’t be made available by the MonoGame project, meaning the developer needs to go through a list of old software (yeah, from 2011 is old software) to be able to have everything working.

One of the problems with MonoGame is that it depends on a binary format, named XNB, for importing assets. I am not sure if this format is open or not, but given it is Microsoft, I do not think so. To create these files, from other files, like image or sound files, you need a tool to convert. It seems (although I did not test yet) there is such a tool for Linux and Mac (the MonoGame Pipeline) but not for windows (are you sensing the strangeness here? the latest version of the library is only available for Windows, but the needed tools are not available for Windows…).

I wasted 5 hours trying to figure out how to create a XNB file from a WAV/MP3 file. I searched for tutorials, I downloaded software, I tried different approaches. None works with Windows 8.1 and Visual Studio 2013. I still did not try to contact the MonoGame team or foruns. But given this is something crucial for game development, I can’t understand how there isn’t an official reference from the project, on how to create these files).

The most promising tool I found was XNBBuilder (also known as XNBFormatter), a standalone tool for this conversion. But, from standalone it has few. It depends on XNA libraries (that I have installed) and, even with those libraries available, it still complains on them missing. In fact, a book I bought from Apress about C# game programming in MonoGame also suggests this tool (that means I am not the only trying to figure out how to create those XNB files). At the moment my try was to contact this tool author and asking for some support.

I confess I was expecting some more organization from MonoGame. I am really considering the suggestion to change the syllabus for another library. Even libgdx is more organized.

 

Unity 3D

In the last days I’ve been using Unity3D. Unity3D is a electronic games engine. It has been developed by some years, but in the last years a free version, with some limited features, was made available.

Now, why am I, somebody who likes to write real code, playing with this kind of software, where most of the work is done by the mouse?

Sometimes we have to do things that we do not like, or we aren’t ready to. And in this case, I was chosen to teach a course on Applied Game Development, and IPCA, in the second year of the graduation students of a Game Engineering Degree.

What can I say on Unity3D? Well, first of all it is an IDE merged with a graphical editor, where you can prepare your scenes. Then, you can script your scenes with three different languages, C#, JavaScript or Boo, a Python dialect. In fact, JavaScript isn’t JavaScript (it is a JavaScript dialect) and I wonder whether C# is really C#. Any way, you can script different parts of your game in any language. This is just great.

Then, your code will run in Mono. Yes, Mono is the OSS .net implementation, that was started by Miguel de Icaza (as far as I can remember). I am sincere, never though it would be being used as it is in so few years.

One of the great things on Unity is the ability to, with some plugins, export (or build) your game for a variety of platforms, ranging from the top console market (Wii, XBox, PS3) to the top mobile market (iOS and Android) passing by the major PC architectures/operating systems, and touching the Web.

At the present moment I am having some fun with Unity. I am just sorry there isn’t any academic program where the students (and teachers) would be able to use the Pro version with a lower price (current Pro license is $3000, too much for a public Portuguese academic institution).