Current Events

I'm working further into Aaron Reed's Learning XNA 4.0.  So far, it's been a very helpful introduction to XNA.  Unlike some other books, he focuses entirely on the framework's capabilities instead of wasting any time bringing people up to speed in the C# language.  Learning to design object oriented programs in vb.NET has allowed me to segue comfortably into C#, but I still have had to look up a few syntax and design choices in the language. 

For instance:  auto-implemented properties.  This isn't supported at all in vb.  It is a nice simple feature in C#.  If you don't need any extra logic in the accessors of a public property, then all you need is something like this:


     public int index { get; set; }

In vb.NET, you would have something like this:

     Private Shared _Index As Integer
     Public Shared Property Index() As Integer   

          Get
               Return _Index   

          End Get
          Set(ByVal value As Integer)   

               _Index = value   
          End Set
     End Property   

It is a nuisance typing out all that extra junk just to return a variable in vb.NET, even if Visual Studio is a lot of help.  I would never accuse C# of being as friendly as vb.NET, but that is handy. 

Today I have redesigned the code to make it more flexible and extensible.  There is a good class structure in place that will allow for quicker additions going forward.  I have a base Sprite class and the subclasses AutomatedSprite and UserControlledSprite. 

I've also begun to work with sound using the Microsoft Cross-Platform Audio Creation Tool (XACT).  It's a nice tool for integrating audio into the content pipeline.  A little clumsy in how files are added to a VS project, but once in, XACT allows for some nice design-time editing like volume control, looping, etc.  You have to embrace acronyms to survive in programming. 

I'm looking forward to adding some more functionality to the design that's being built with the help of Aaron's book.

No comments:

Post a Comment