« Making Trees in ZBrush 3 | Main | Review Building XNA 2.0 Games by James Silva and John Sedlak »
Friday
Jan092009

Review Beginning XNA 2.0 Game Programming From Novice to Professional by Alexandre Lobao, Bruno Evangelista and Jose Antonio Leal de Farias

I really liked this book.  About half of the book will be valuable to a complete beginner.  The second half delves into 3D and starts you down the path of shader development, terrain generation and a third person shooter.  I found the third person shooter part to be a relief since most books deal in first person when they hit the 3D section.  I have motion sickness problems with first person shooters so I will never make a first person shooter.  I am therefore a little biased in that regards.  I didn't understand most of the 3D stuff.  So I doubt you will either if you are at my stage in XNA development, which is to say beginner.

I did however like the fact that the authors are uncompromising in their use of Game Components vs. Classes.  My understanding of the history of Game Components is that it was a feature Microsoft included in XNA in the hopes that the community would develop components that could be distributed over the web and used as a sort of "drop in" chunks of game code.   I won't explain how they work here but I will say I was thoroughly confused by them at first.  The previous XNA and C# books I read never even mentioned Game Components as an option.  In regards to C#, I think that's because they are not available in C# regular (don't quote me on that though) only XNA, and as far as the other XNA books, I think it's because the authors were not familiar enough with the concept to feel comfortable writing code using them.  In essence a Game Component is just a form of a class that works differently with the intent of making that chunk of code more modular and thus more conducive to sharing.

The authors make full use of Game Components in their very first game, Rock Rain.  This game is a real treat to code and to run.  I think the authors did a nice job of slowly progressing the building of this game.  They actually finish it in a very basic form which is good for us beginners.  Then they extend it with more powerful features like menus, game networking, health ups, progressing difficulty etc.  That helps to keep the complexity low in the beginning and it gives you a sense for how you can organize your code using game components.  I actually used their rock code structure in my first project.  Instead of rocks falling down the screen, I have raindrops.  And I used a class instead of a game component because I was more familiar with that structure from reading previous books.

It is absolutely imperative that you understand Game Components, in my opinion.  I say this because a lot of the tutorials and examples you see online use them to structure things.  If you check out the code samples at the XNA Creators Club Website , you'll see Game Components all over the place.  I am particularly fond of the 2D particle system.  I implemented this in my current project and it forced me to learn how to use Game Components.

Another piece of code I am using directly from this book is how they handle screenbounds on the Xbox 360.  You can't just declare a screen resolution like you do on a PC and expect your game to work right on the 360.  TV's have overscan, an unused area rim that varies in thickness from TV to TV.  You have to take this into account when developing for the 360 or some players will not see things you put on the edge of your game window.  The authors use the #if Xbox 360 command to separate the screen code "if" the program is running on the 360 vs. a PC.  I thought that was pretty slick.

I used sticky notes to reference key topics that may be valuable to me in the future.  Some of them were, XNA supported file formats, game components, menus, health up object and networking.

I probably would not recommend this as your one and only XNA book.  I think the Rob Miles' "Learn Programming Now!..." book is better for beginners since it only deals with 2D.   But I would recommend this book as your second or third purchase.  Just be aware that the second half may be over your head right now.  I mention a possible third because I am currently reading the new, and as of this writing, only XNA 3.0 book:  Learning XNA 3.0 by Aaron Reed.  I like it a lot so far but I'm not ready to review it.

Reader Comments (1)

Thanks for the nice comments on our book!
Feel free to contact us anytime you want!
[]s!
Alex

March 18, 2009 | Unregistered CommenterAlexandre Lobão

PostPost a New Comment

Enter your information below to add a new comment.

My response is on my own website »
Author Email (optional):
Author URL (optional):
Post:
 
Some HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>