Thought for the Dazed

I've had to give up that Distance Learning course as I was having trouble seeing the teacher.

Flickr
www.flickr.com
RobMiles' items Go to RobMiles' photostream
Twitter
C# Yellow Book

Search entire site

Entries by Rob (3094)

Saturday
Jul252009

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.

Friday
Jul242009

Buying Nothing at Ikea

Has anyone ever gone into Ikea with the intention of spending nothing, and come out having spent less than fifty pounds? Anyone? We thought we’d managed it today, and we got nearly all the way round with an empty bag.

Oh well. The stuff we got is nice though.

Thursday
Jul232009

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…

Wednesday
Jul222009

Harry Potter and the Half Blood Prince Movie Review

This is the nth Harry Potter movie, in a series of n+2. I don’t know all the details about the numbering really I’m afraid. The movies, along with Harry, have changed a bit over the years, from an apple cheeked youngster getting into wizard scrapes we now have a somewhat more angular, and angst ridden youth who spends a whole film doing not very much.

That isn’t to say it is a bad film. The 153 minutes pass smoothly enough and there are some story developments although, like the last film, they all happen in the last twenty minutes or so. You get the feeling that this film (and probably the next one too) are treading water a bit until the real baddy turns up and we can get the big guns out. There are some things that seem to happen just to give a bit of light relief from all the unrequited love and gathering gloom and doom, but they are all very well done. Harry Potter, if nothing else, is a mark for a very high level of production quality and a whole bunch of excellent British character actors turn out to show their skills.

If you like Harry Potter, and have read the books, then the film is for you. If not, they you probably wouldn’t go near the film anyway.

Tuesday
Jul212009

Trip Hazard May Return

I’ve been busy with some XNA stuff for the last forever or so. But when I’ve done with the current crop of courseware I’m definitely going to rescue Trip Hazard from his present predicament.

Definitely.