Friday, February 25, 2011

Week 1: Setting up and Installeering

This week was not the most exciting in terms of this project, but necessary nonetheless.  It was all about setting up my development environment and a bit of troubleshooting to get things working.

First of all, I grabbed a copy of Windows 7 professional and installed that into a Bootcamp partition on my iMac.  This didn't exactly go without a hitch, Windows 7 doesn't seem to include the right ATI driver for the graphics card in the late 2009 iMacs. So when you get to the third stage of the installation, the screen goes blank... not very helpful.  Thankfully there is a pretty simple work around that involves booting up in repair mode and deleting the ATI driver. This forces Windows to use a generic driver, but one that actually works.  So with that done I could complete the installation and then install the boot camp drivers to get a proper ATI driver for the graphics card.

From there it was a matter of installing some development tools.  I got Visual Studio Express Edition with Windows Phone Developer Tools, which in fact contains XNA Game Studio, not that you would know by the product name.  The install for this went without a hitch.  I also installed Git Extensions, however for some reason the Visual Studio plugin didn't work, I'm not too fussed about that though since I'll probably use the command line most of the time.

With all that setup, I fired up Visual Studio and created a new Windows game project, called Breakout, that I'll use for building my first game. This was simple enough but there was one hitch, I wasn't able to run the game within Parallels, I got an error saying there was no suitable device support HiDef.  Fortunately the Internet came to the rescue again.  Apparently this is caused by Parallels only supporting DirectX 9. The fix is pretty simple, you just need to right click on the Game project, select Properties, then change the Game Profile to "Use Reach ...", the game should now run and display a beautiful cornflower blue screen.


I also tried out VMWare Fusion as an alternative to Parallels, it also suffered from the same HiDef support problem, so there wasn't really any reason to switch.  I'll see how it goes with Parallels for while, I do get the sense that I'm eventually either going to need more RAM, or I'm going to have to reboot into Windows more often, but I'll see how it goes.


---


In order to get up to speed with C# I read through Intro to C# from Objective-C and Java. I've gotta say, it's not the best document.  I realise it is only 24 pages, but it seems to really skim over important language features at the expensive of talking about the CLR platform.  For example, it has a list of about 15 items that Java has but are different in C# or that C# has but Java doesn't, like indexers, different inheritance syntax, access restrictions on overriden members, clashing interface inheritance but it doesn't actually discuss how C# does it.  And yet there is a page and half on garbage collection, which is essentially the same between the two platforms.  Oh well, I'm sure I cope.


---


I've also setup a Github project at http://github.com/seangeo/breakout. It's a public project so anyone can grab the code, although at this stage there isn't much to see, hopefully it will get more interesting.


Next week I'm going to start getting familiar with the XNA API and draw some sprites.  If I get time I might make them move across the screen!

No comments: