Game Development Reference
In-Depth Information
portantly, loading in art files. In XNA, writing code that can load a 3D model,
initialize the camera/projection matrices, and then render the model can be done
in only a handful of lines. That's because XNA has built-in support for loading a
large number of media files, including textures, models, sounds, and even certain
types of videos.
Although it certainly might be easier to prototype a 3D game in a full engine such
as Unity or UDK, the problem with such engines is that they do most of the pro-
grammingheavyliftingforyou.Forinstance,ifyouwanttousepathfindinginone
of those engines, you can use the built-in pathfinding and never have to implement
A* once. But in XNA, if you want to have pathfinding, you have to implement it
yourself, which means you will have to understand the algorithm well.
Unfortunately, Microsoft has decided to abandon XNA, and they no longer will be
providing updates to the framework. But even though XNA has been orphaned by
Microsoft, the framework still lives on in MonoGame.
MonoGame
MonoGame is an open-source and cross-platform implementation of the XNA
framework. It uses all of the same class and namespace names that XNA does, so
it really is a very quick process to convert an XNA game to MonoGame. In the
case of __Defense , it took maybe 15 minutes to get the XNA project to work in
MonoGame. The first two versions of MonoGame only supported 2D games, but
as of version 3.0 (released in March 2013), the framework now supports most of
the 3D functionality, as well.
What's great about MonoGame is that because it's written in a cross-platform
manner, it works on a large number of platforms. At the time of writing, it runs
on Windows, Windows 8 Metro, Mac, Linux, iOS, and Android (though the mo-
bile versions are not free). The aforementioned Bastion was ported from XNA to
MonoGame, and that's how it was released on so many additional platforms, in-
cluding Mac, Linux, iOS, and even the Chrome Web Store. In the future, it may
even be possible to develop Xbox One games using MonoGame, depending on
how Microsoft implements their system for development on retail units.
One important aspect of the XNA framework that hasn't quite yet been fully im-
plemented by MonoGame is the ability to convert assets from their original format
to the custom format that XNA/MonoGame uses. So in order to prepare assets
for use in MonoGame, you have to build them using XNA and then copy those
files into the appropriate directory for the MonoGame project. But the MonoGame
Search WWH ::




Custom Search