Datasheet

use, or peer-to-peer games as role playing or strategy games usually use. It is totally up to you; you
could even use a hybrid approach.
Because XNA makes great use of the Xbox Live system, you get all the features in there for free, which
includes your gamer card, friend management, and chat system (you can even show the keyboard and
messages boxes on the Xbox 360 now). You can even enable voice support for your games. There are also
nice tools to support the development of multiplayer games on the Xbox 360 and the built-in latency and
packet loss simulation tools help you prepare for problems that can occur when playing your game over
the Internet.
This all sounds similar to DirectPlay of the DirectX Framework, which was not very successful and was
depreciated a few years ago because game developers would not use it. Instead, most games would just
use Windows sockets directly or use another networking API. But in XNA, it will be the only way to
write network games (at least on the Xbox 360), which gives me hope that XNA networking will be a lot
more successful than DirectPlay was.
It is very easy to enable multiplayer support in XNA with just one single line of code:
Components.Add(new GamerServicesComponent(this));
But writing network games themselves is not that easy. It is great to have all that built-in support and,
as you will see in Chapter 14, it gets you up and running quickly — but to write a full-blown network
game and to understand all multiplayer components, you have a long road ahead. For this reason, the
networking APIs are discussed at the end of this book with the most complex game Dungeon Quest,
which is a full-blown multiplayer role playing game that has a great replay value and allows users to
create new worlds easily.
Other new features of XNA 2.0 include simplified model rendering such as helping you to render models
quickly via the new
EnableDefaultLighting method in the BasicEffect class. There were also
improvements made to the game components classes; not only are more game components available,
but you can also nest game components now. You can learn more about game components in Chapter 4.
Most of the XNA 2.0 Framework has not changed and is still compatible with XNA 1.0 code. Even in
parts where performance improvements were made, the calling code is still the same. You will just enjoy
the new capabilities and you can extend your game easier or add one of the new features in the render-
ing engine. For example, occlusion querying and multiple render targets are now supported. Another
improvement is the project templates for content importers and processors to help you writing content
processors, which was very hard to do previously. Working on your own content processors is still hard
work, but at least there is some help to get you started now.
I also want to mention the many samples that are available on the XNA Creators Club. When the first
edition of this book was written, the website was non-existent, but now, only 9 months later, many more
community sites are available, and you can find many very active XNA forums. On XNA Creators Club
at
http://creators.xna.com, you can find a lot of useful samples beyond the scope of this book such
as Generated Geometry, Aiming, 3d Audio, 3D Picking, Billboards and 3D particles, Distortion Effects,
Normal Mapping, Non Photorealistic rendering, Bloom post process, and other samples. Several mini-
games and the very popular XNA Starter kits can also be found on the XNA Creators club, including
Space Wars (Asteroids clone), Marblets (puzzle game), Ship Game (Descent-style game), and the Racing
Game (see Part IV of this book).
26
Part I: XNA Framework Basics
61286c01.qxd:WroxPro 1/21/08 3:44 PM Page 26