XNA 4.0 GDBE – Chapter 4/5 Review

January 22nd, 2011

Continuing on with the quality from previous chapters that I have now come to expect , Kurt dives right in to getting his impressive graphics straight to the screen. He starts in straight away with many of the utility classes needed to put together a standard top down space shooter and gets the basics of the game up and running in no time.

Some small code things I would have done differently:

  1. Many of the properties in the classes could have been automatic { get; set; } which can make the code look much cleaner (personal opinion)
  2. The padding parts of the asteroid collision detection system is unneeded. I actually removed it altogether in the final code and the game worked just as well
  3. The StarField, AsteroidManager, ShotManager, and many other Manager classes are very similar. I would consider seeing if they can be combined into a more generic class or set of classes.
  4. GraphicsDevice.ScissorRectangle could be used in many places instead of a hand built rectangle with the client bounds’ width and height
  5. Collision detection for asteroids is discussed and implemented in Chapter 4. All other collisions are in Chapter 5. These should be done together with a single CollisionManager

Some things I especially enjoyed in these chapters was the inclusion of sound and special effects. Both the particle explosions and the shooting and fire sounds are highly reminiscent of a simpler time in video games when kids still lived and died by their quarters. The final game is once again incredibly impressive for a beginner’s XNA book and I would have been ecstatic back in 2002 when I first started playing with Managed DirectX if I could have shown my friends the kinds of games that have come out of this book so far.

Book Link: http://link.packtpub.com/ZWicAE

Moving to git

January 17th, 2011

Just a quick message to say there will be a little downtime in tutorial update and book review posts while I move my source over to git and github.

My reasons are many, but much of the background information and research I have done on the topic is well summed up in Linus Torvalds’ talk at Google.

XNA 4.0 GDBE – Chapter 2/3 Review

December 8th, 2010

Chapter 2 of Game Development by Example goes into making a small but very impressive tile flipping puzzle game with chapter 3 adding the polish and finishing touches to the completed game. The project hits on sprites and spritesheets; it puts a little design work into place that separates the game into more classes than the one bloated Game.cs class many small games like this use; finally, it gets the game all the way to a final playable point in a fun show your friends state. I am incredibly impressed with the complexity and quality of the game that comes out of chapters 2 and 3 with only a few small notes about things I would have done differently:

  1. Separate more of the functionality from the Game class into its own classes or into existing but better suited ones
    • Drawing the game board should be part of the existing GameBoard class, not the Game class
    • Each Draw of the pieces should also be in the class for that piece. This one is REALLY obvious as the method names even have the name of each piece class in them.
    • Font and text related rendering could easily be separated for easier understanding of the whole code base
    • Flood related functionality is borderline hitting enough code to be separated out. Not needed as bad as the above parts though
  2. An enumerated type and a bool would be more suitable to the choosing of game pieces from the spritesheet (instead of the list of constant strings with a “W” at the end when filled in with water)
  3. Queues in the UpdatePieceTypePieces methods add unneeded complexity to the picture. The same functionality can be accomplished with a simple List<string>.

As I mentioned above, the overall outcome of the project in chapters 2 and 3 is leagues ahead of what you would normally see coming out of the early chapters (or in some cases any chapters) of many other XNA books out there. Hopefully the high quality output continues in future chapters.

Book Link: http://link.packtpub.com/ZWicAE

XNA 4.0 GDBE – Chapter 1 Review

November 5th, 2010

So far the book is turning out to be a pretty good read. I was excited to see how quickly the author jumped into coding and getting to work on putting together a simple game. I am a big believer in learning by doing so this super quick introduction is exactly what I think the beginner type of books like this need to have.

The method of presenting the code seems to be pretty similar to the way I write my tutorials, with a small code block followed by a short description of what just happened in the code. I am nowhere near as consistent in the pattern but the basic style is similar enough to make me feel really comfortable reading through it.

My only let down so far is that the book states very early on that it is specifically geared towards development of 2D games in XNA, which really isn’t anything against the actual book as most beginners to game development need to start in 2D to get a grasp on the basic concepts; my gripe is really just a personal dislike of 2D graphics development and the SpriteBatch class,  but I’ll put that aside for the remainder of the book.

Altogether it actually took less time to get the chapter 1 project from start to finish than it did to just install the XNA Framework. Pretty impressive for a fully functional game even if it is a simple computerized whack a mole. The challenges proposed at the end of the chapter are at a perfect level of complexity for anyone just coming into game development.

Chapter 2 review soon to come.

Book Link: http://link.packtpub.com/ZWicAE

XNA 4.0 Game Development By Example

October 31st, 2010

Just grabbed a copy of a new XNA 4.0 book by Kurt Jaegers over at xnaresources.com that was recently released through Packt Publishing and am going to take a stab at going through it over the next week or so and see what I think. Other than updating the tutorials here to the 4.0 framework I haven’t taken a real hard look at anything new and shiny in the latest version so this should be a good primer for me going forward with any future tutorials.

This will also be my first electronic book on anything graphics programming related so I’ll have to see how things go from that perspective. I have been reading everything novel wise 0n my nook for about a year now and loving it for that so hopefully the good experience extends into this type of reading as well.

Check back soon for a full review of the book and the ebook process!

Book Link: http://link.packtpub.com/ZWicAE

XNA 4.0 Updates Incoming

June 19th, 2010

All of the tutorials have been updated to work with the new XNA 4.0 CTP! As the HiDef profile is not yet available in the CTP, I cannot completely finish the postprocessing tutorial #8 because the GetBackBufferData method is only supported in the HiDef profile. Once an update or the release happens the PDFs will be uploaded to reflect the changes.

All of the tags in the svn repository have already been updated (except #8) so if you want to get an early look at the changes feel free to check out a copy from http://code.google.com/p/hmengine-xna/

I’m thinking hard about getting another tutorial out the door for the 4.0 release. The two previous ones I was attempting to get going have become a big complicated mess and not something I’d really feel comfortable trying to release as a tutorial (it’s more like a paper for a big graphics conference or something…) so I’ll keep thinking and see if I can’t come up with something that fits well into the tutorial format and maybe takes advantage of some new features in the 4.0 API.

On a somewhat related note, I got one of those new XBox 360 250GB editions, and it really is as whisper quiet as they have been advertising.

More nook Updates

January 24th, 2010

Well, the group that I am sort of an official part of now has gotten a new launcher that clones the functionality of the built in nook launcher but with the additions of being able to reorder the applications and to add more applications of which currently consist of:

  • nookBrowser – a simple browser application
  • nookLibrary – a replacement for the “my library” application that has more sorting and search options
  • trook – a free ebook downloader, feed reader, and application installer (these will be made into individual apps soon)

All in all things are moving along pretty fast. I have not done much of the major coding yet but have taken over a large part of the standardization and integration of the separate projects. I’m hoping to get more directly involved in coding some things now that i have everything in a more easily accessible setup for people new to nook development (which is pretty much everyone right now)

Emulated nook in the Android SDK

January 7th, 2010

So I just got my new nook and started to do some research on writing some apps for the thing and came across this blog post and this wiki post that help get the thing set up and running in the Android SDK emulator. The whole process was a bit complicated, but once I got the thing working on the Ubuntu side of things it was a simple trick of replacing the same file on windows and it ran perfectly there as well.

The only shortfall for me (who does most of my graphics development in DirectX technologies) is that because Android is Linux based, it only handles OpenGL, although the SDK does have some pretty easy quick hooks into the API so I may have to branch out a bit. We’ll see where it goes.

Homebrew Helper

July 8th, 2009

So I have been experimenting with WPF lately a bit and throwing around a lot of XAML and decided to put together something worth a damn out of my new knowledge and skills and have settled on a small data driven application for homebrew recipes. I have seen in the past a BeerXML format that a few people have worked on (very outdated now but a good idea at least) that I will probably also add to or rewrite to be more up to date with current XML standards and methods. It should be a good learning experience in putting together xml schemas as well as that is another area of Computer Science I have not yet delved into.

I’m using the Entity Framework for my DAL right now and it seems to be working out fairly well (at least in the Visual Studio 2010 Beta, which I hear has better EF versions going on). I’ll keep some progress reports coming. At the moment I just have a simple UI with login/register, add/edit recipes, and the ability to view all recipes or just your own. More to come.

Upgrade Complete…

April 5th, 2009

All of the tutorials have been fully updated and the source tags checked in for the changes implemented to help better deal with the multitouch device. The new architecture of the IHMComponent library should help make a lot of things easier to implement later on (or now if you found the functionality lacking before.)

Basically the engine is put together in the same manner as before, but with a lot more HMComponents to allow for more flexibility in putting together objects to be managed by the engine (like a Loadable, Updatable, Renderable HMInputDevice).

Now its on to really getting this multitouch project going!

Do NOT follow this link or you will be banned from the site!