True Story

I’ve not been writing all the time I suppose. Last week I had to take my computer in to the mender to have a working cpu board replaced with another working one.

Some time back, just hours before my trip to Cairo, my lovely MacBook became a lot less lovely by dropping dead on me. Fortunately I had a tiny spare machine in the form of my Advent notebook which did a sterling job of standing in for my shiny paperweight.

When I got back I took the laptop to the menders and they put a new cpu board in which worked fine. Unfortunately the board they fitted was the wrong one, and so last week I had to take two hour break from the courseware while my machine was back in the workshop having the board replaced with one that was 0.2 GHz faster. I’d like to be able to say that I can tell the difference, but I really can’t.

Writing

There should be a corollary to the old adage “Be careful what you wish for” which is “Be careful what you promise to do”.

Some time back I promised to write some XNA courseware. A whole course worth in fact, based on my XNA book.  This has turned out to be a non-trivial exercise. In fact I’ve been writing pretty much continuously for the last fortnight, around 10 hours a day, 7 days a week. And at the time of writing I’ve reached chapter 12.

Silly me.

The problem is that after a day of writing I don’t really feel that keen to trot out some fun prose about what kind of day I have had because, quite frankly, at the moment I can’t tell them apart. And I can’t even think of novel combinations of the “I have been mostly writing today”.

The good news is that some day soon you will be able to download and use my XNA course material. And I jolly well hope you find it useful.

Breaking Changes in XNA 3.1 SoundEffect

I hate breaking changes. They are like getting into your car and finding that the steering wheel is now the gear lever, and the seats are facing the other way.

Generally speaking the people who make the software try to avoid them too, which is as it should be. But every now and then they make the judgement call that somebody else’s pain is worth their gain, and so they go and move the universe around a bit.

They have done it with the move to XNA 3.1 from XNA 3.0. XNA 3.0 introduced a new SoundEffect type which made it much easier to make sound. Unfortunately, in its original incarnation this type also made it easy to inadvertently make sound that stole all the sound channels by mistake, and so they have fixed this in version 3.1.

Essentially, in XNA 3.0 the SoundEffect.Play() method used to return a reference to a SoundEffectInstance object, that you could then tweak to change some of the properties of the playing sound. This was kind of neat, except that if you ignored the return from Play it meant that the SoundEffectInstance that was created ended up being left hanging around, probably hogging a sound channel, until the garbage man got around to killing it off. If your game was well designed and looked after memory properly this may not happen of course, and so you would run out of sound channels for no good reason.

In XNA 3.1 the same Play method returns something different. It just sends back a boolean value that indicates that the sound is playing correctly. To get hold of a SoundEffectInstace you have to call the aptly named CreateInstance method on your SoundEffect. All very sensible, and much less likely to hog all the sound channels.

However, if you have just written a book which carefully describes the way that XNA 3.0 works in this respect (just like I have) then you are left wondering why they didn’t add an extra method (perhaps called QuickPlay or something) and leave the old Play intact…

Oh well.

Happy Birthday Me

Another year older and deeper in debt. As the saying goes. But at least I got to go to Alton Towers. (being the birthday boy and also the driver means that you do get some privileges it seems).

I’m not a big fan of big rides, I just like the attention to detail and the general atmosphere of these places. Of course Disney do it best, but Universal Studio and Alton run them a close second. Alton Towers doesn’t have a huge stable of TV and film back story to beef up its act, but it more than makes up for this with fantastic grounds around the park itself.

3763235990

A good place to be

We had a great time. I went on some of the less demanding rides and the weather was kind to us. What more can you ask?

Oh and many thanks to the people who flocked to my FaceBook page and wished me all the best. It almost makes me wish I posted stuff on there. Perhaps I will one day, just before it goes out of fashion…