Password Panic

DSCF0680_1_2.jpg

Seems like my Twitter password, along with 250,000 others has been stolen. Well, not the password as such, but the encrypted version that Twitter store. This is probably not a huge problem for me. When I give my password to Twitter they pass it through a “one way” algorithm that turns it into meaningless gibberish. The idea is that it is very hard (or hopefully impossible) to take the gibberish and turn it back into the super secret phrase that I dreamt up all that time ago.

For me the biggest problem now is that I have to think up a new password. I’ve found that the best way to invent passwords is to think about them a long way away from the computer, maybe when you are doing the vacuuming, and then type them in later. If you can’t remember the password that you thought up a little while ago when doing the living room carpet it is probably not a good choice after all. My present approach, which works for me when a site will let me do it, is to run a bunch of words together. Perhaps “runabunchofwordstogether” would actually make quite a good password. Perhaps not. Anyhoo, I’ve changed my password and can now resume life.

The thing that really worries me about password breaches like this is that they provide a good context for these nasty “Your account has been compromised” emails that spammers send out to try and trick you into logging in to fix your account. Then again, that might be why the steal the names in the first place.

Ex NA

image

Things you might not know about me. I’m fluent in Algol 68. I know the George III Operating System (and its amazing editor) really well. If you ever need a VMS System Manager, I’m your man. I can write Modular II and Coral 66 programs, use Forth and Turbo Pascal with aplomb and and perform low level programming of the 6522 PIA (Programmable Interface Adapter chip) in 6502 machine code, should you ever need someone to do that.

Of course these skills are pretty much useless these days, as the above technologies are well past their sell by date. The good news, for me at least, is that all of these skills translate into useful ones using today’s technology. I know about operating systems, programming languages and low level interfacing. And although the relentless march of change has forced me to pick up new skills over the years, I’ve never lost sight of the fact that working with computers is just taking a machine that can do stuff and making it useful.

Today Microsoft formally started to pull the shutters on XNA. I was there at the start and I’ve followed the technology ever since. I’ve loved making games with it, and loved what other people have made with it. When Version 4.0 came out I remember thinking that they had put so much into it that the only way was down. My big concern was that they would keep on adding things until it became too complex and cumbersome to be useful.

XNA has done great things for programming and we’ve used it to good effect at Hull for many years. In reality it is not going away, it will still be possible to make XNA programs and distribute them, and the folks at MonoGame will take the XNA torch and carry it on to great things. However XNA will no longer have the seal of Microsoft support. It’s sad that Microsoft have moved on, but I think it was kind of inevitable. From a business point of view I never really understood how it could make a profit for the company, and in these tough times that probably spelt the end for the technology as a Microsoft product.

However, I don’t think that anyone who has built up a skill set in XNA has wasted their time. All games work in fundamentally the same way and all game developers need to address the same problems irrespective of the platform they are using. You just need to take a leaf out of my book (which I’ve had a while) and move the things you have learnt into a shiny new context. Take a look at Unity for some very interesting new directions. And find out more about MonoGame, which I think is wonderful.

Using Speech with Windows Phone 8

DSCF0579_80_81.jpg

I said yesterday that I’d submitted my latest version of Voice Music to Microsoft for certification.

It failed (sad face).

The reason it failed is interesting if you write speech applications for Windows Phone 8. It has to do with what happens if you interrupt the speech playback. One of the principles of the Windows Phone UI is that at any point when you are using a program you should be able to press the Windows Key on the phone and go off and do something else. Then, when you have finished doing the something else, you press the back key and return to the previous program. If your program doesn’t work like this it will fail certification, since this is a required behaviour.

It turns out that my version of Voice Music had a problem if the user pressed the Windows Key while it was announcing a message. They could go off and do something else, but when they pressed Back they did not return to Voice Music. This was a fairly nasty bug to spot, in that it only occurs when the program is running “in the wild”, i.e. when it is in the phone and not attached to the Visual Studio debugger. It also made finding the bug tricky, in that as soon as I tried to look for it the program started working again. Which was not very nice.

Eventually I used a technique that has worked before. I asked for help. And it turns out that the answer is quite simple. When a speaking program is interrupted by the user pressing the Windows Button (or generally moving away from the application) it will throw an exception when the program is next restarted by someone returning to it. The exception is thrown by the SpeakTextAsync method. If your program doesn’t catch this exception it will fail to restart. The exception has a particular type that you can check for if you wish:

try
{
    SpeechSynthesizer synth = new SpeechSynthesizer();
     await synth.SpeakTextAsync("Hello cheeky.");
 }
catch (Exception ex)
{
     if (((uint)ex.HResult == 0x80045508)) 
     {
        // System Call Interrupted thrown by Speech 
     }
 }

My program just ignores the exception, which seems to have fixed the problem. You can do more clever things if you wish. I’ve resubmitted it for certification. Fingers crossed….

Voice Command on Nokia Conversations

VoiceMusic

Last week Rob Crocombe, one of our students, was featured on Nokia Conversations, talking about the things that he has been doing with Windows Phone during his time in the department at Hull. Now it’s my turn. You can find the post here. It contains a fairly shameless plug for Voice Music, my little program that lets you select music on your Windows Phone 8 device simply by asking for it. A new version is presently working its way through Marketplace certification.

Catching Heartbeats with the Gadgeteer

image

I reckon the Gadgeteer has more interfaces than just about any other embedded framework. Including neat things like this Pulse Oximeter from Seeed. They make the point on the product description that you should not use this as a medical instrument but, what with the theme of GlobalGameJam being heartbeats, and me having one to play with, the temptation to use it in our game was very hard to resist.

Using it is very easy indeed. You can bind to events that fire when connected (i.e. someone has put their finger into the sensor), disconnected (when someone has pulled their finger out, so to speak) and on a pulse detected event. You can also read the sensor object to find out pulse rate, blood oxygen levels and signal strength.

This is my code to bind methods to the sensor events:

pulseOximeter.ProbeAttached += 
   new PulseOximeter.ProbeAttachedHandler(pulseOximeter_ProbeAttached);
pulseOximeter.ProbeDetached += 
   new PulseOximeter.ProbeDetachedHandler(pulseOximeter_ProbeDetached);
pulseOximeter.Heartbeat += 
    new PulseOximeter.HeartbeatHandler(pulseOximeter_Heartbeat);

The handlers then do all the work:

void pulseOximeter_Heartbeat(PulseOximeter sender, 
PulseOximeter.Reading reading) { sendMessage("P" + reading.PulseRate.ToString()); }

The sendMessage method takes a string and sends it on to the game via a serial port interface that is also connected to the Gadgeteer device. The sensor has proved to be quite sensitive and works rather well. It is quite unnerving to be playing a game and find that the gameplay matches your heartbeat.

Buying a Computer is Hard Work

image

Last week I decided that I needed a new computer. Specifically a Sony Ultrabook. While I love my Samsung Slate to bits it has hardly any internal storage and the behaviour of the USB drivers when you turn on hardware virtualisation is less than exemplary. So I went down to a well known computer store (they have a World of PCs there) and tried to buy one. This was not a good experience.

In the first branch I tried they had the computer I wanted proudly on display. But of course they had none in stock. And according to the salesman (I use the term loosely) there were none to be found this side of York (although he could order one for me for delivery – just like I could from Amazon).

Of course, when I go on to the internets and check stock levels I find lots of local branches showing the item. So I head for one of those. Yes, they have one in stock. No, they can’t sell it for the price advertised. This is because, as a special service to customers, they’ve taken it out of the box, set it up and then made a backup CD. Which costs twenty quid extra. So they want me to pay for a service I don’t want or need. When I refused to pay the extra they were miraculously able to track down another device that hasn’t had this treatment, and so I actually managed to get the one that I wanted at the price advertised. At this point I thought I was out of the woods. But no.

I now had an experience not unlike the uncomfortable ones that I used to have at school when I went to see my headmaster to be told off. The salesman sat at one side of a desk and I sat the other side feeling defensive. He then tried to sell me services that I didn’t want for a computer that shouldn’t need them, implying that I was taking a risk in not going for the extended warranty and other gubbins that they are all undoubtedly under great pressure to sell.

Finally I managed to escape with the goods. I’m loving the new machine. Very, very useful. I’ve been horrible to it already, plugging and unplugging devices, and using it as if I didn’t care how much is left in the battery when I charge it, and generally just opening it, using it a lot, and closing it again. And it has taken the punishment with aplomb. I’ve got an extra 4G of memory for it from Crucial and it fair whizzes along.

But I must admit that I fear for the future of shops selling hardware if my experience is anything to go by. At a number of points in the process I felt I was being told stuff that was at best a bending of the truth, purely to serve the agenda of the person and company I was buying from. I’m pretty sure I’d have had a much better experience buying from an Apple Store and of course if I’d gone to Amazon I could have cut out the person completely. And given the hassle that I had, there is now an even greater chance that I’ll do that.

GlobalGameJam Hull Results

Judging was a really frenzied effort. Two teams of judges, videos to take and show and final presentation right at the end of the day, with the coach for the Grimsby crew waiting outside with the engine running…

I went round with one of the judging teams and took some of the videos, Simon did the rest. If you want to find them and take a look at the wonderful stuff that was built you can search YouTube here. At the time of writing some of the videos were still being uploaded, but they should all be online soon.

After the judging, we had prizes. I took pictures of most of the prize winners, but for some reason I didn’t get pictures of everyone, sorry about that.

First up we had the special awards. These are teams who have excelled in specific competition categories.

DSCF0554.jpg

“Heart Attack Team” with their Social Media awardDSCF0555.jpg

“3 Old Robots and an Englishman” with their Diversifier award

DSCF0556.jpg

“50 Shades of Simon Grey” with their Art award

DSCF0557.jpg

“Blimbu” with their Project Management award

DSCF0558.jpg

Lifeline team with their Collaboration Award

Now it was time for the top three teams.

DSCF0559.jpg

“Across the Border” came third with a lovely heart powered jetpack game. Well done guys

In second place we had the “Heart Attack” team with a single finger controlled sideways scroller that has the player boosting their heart and avoiding circular saws. Sorry guys, I didn’t get a picture of you all.  But you are in the one above for your social media integration…

DSCF0561.jpg

The winners were “50 Shades of Simon Grey”, who designed, built and then textured an entire haunted mansion for their terrifying game where a ghostly presence stalks multiple players as they search the rooms to try and exorcise the evil that lurks there. The game uses 3D sound to play the hearbeat of the avenging ghost as he comes up behind you for the kill. Great,and very atmospheric, stuff.

Then it was time to pack up and head out. Thanks to Simon and Tom for making it work, Hull College for letting us have the use of their amazing Hull Studio School venue and all the folks who turned up. A great time was had by all, and we will definitely do all this again. HullGlobalGameJam will be back. Once we’ve had a lie down….

Heart Attack Lives

HeartAttack

This shows a tense moment in the game, you can’t see the amazing shader ripple effect, but when the game is running it looks amazing. I’ll see if we can put a video up somewhere.

We got the game working. Thanks to Lewis for some stonking artwork and everyone else for the bits that they did. Which were many. It was really great to forget everything else for a while and concentrate on just one program. This is the first time I’ve actually done the development thing in one of our competitions. It definitely won’t be the last.

Saturday GameJam

DSCF0528.jpg

When David drove us home last night we noticed that the snow was beginning to pile up. This morning there was a lot of it about. We managed to get into the GameJam around 8:00 am anyway, to greet Simon who had been up all night making the game. And we had a game, with the not too original name of “Heart Attack”. Bad things move menacingly towards a beating heart, which fires antibodies to dispatch them. Things are made even more interesting by the way that the baddies are only visible as the “pulse wave” of the players heartbeat passes by them. Simon assured us he could write a really funky shader that would show the effect.

So we sent him home to bed and we set to work. The first thing to do was to get the heartbeat values out of the Gadgeteer device and into the game. Turns out that’s what USB serial ports are for and so after putting together a tiny serial protocol we had that working. Then it as just a matter of the two Davids and me creating assets and building gameplay and sound. Which was great fun. I did find time to take some pictures too.

DSCF0538.jpg

Where we are working

DSCF0543.jpg

Having our pictures taken…

DSCF0546.jpg

Oooh. Old school.

DSCF0533.jpg

Inflatable bed, 10 quid from Tesco. Guess who’s using it….

You can find more shots here.

Global GameJam Hull Gets Going

DSCF0509.jpg

Waiting for the theme…..

When we started off with Global GameJam Hull we were very worried that nobody would turn up. Every meeting ended with an anxious discussion focused on “Bums on Seats”. As you can see above, we ended up with plenty of folks, which was great. The competition started with a couple of excellent videos setting the scene (and reminding everyone about the power of deodorant) and then we got the theme. No pictures, no words. Just the sound of a human heartbeat. Genius.

Then it was off to form teams and get cracking. I ended up in a team with two David’s and a Simon. We named ourselves “The Simon Grey Glee Club” and started casting around for ideas. During the discussion I mentioned that I happened to have a Gadgeteer Heart Rate Interface, although I’d lent it to James to do some Imagine Cup stuff. Could we make a game which made use of the heart rate of the player?  The answer was yes, so I was instantly on the phone to James who was kind enough to swing by and drop off the hardware and his sample code.

By the end of the evening I’d got the interface working and verified that we could get heart beats and pulse rates from it. Tomorrow I’ll make an interface to get those values into the game. I’m not working overnight on this, but I will be there really early in the morning.

MonoGame at the Global Game Jam Briefing

Pics (1 of 2)-Edit.jpg
Another day, another room full of smiling faces. Or something.

You can excuse the audience for looking a bit shell shocked. They had just sat through a whole bunch of game development stuff. I started proceedings, with a fifteen minute section that I retrospectively titled “Watching Rob fail to get his tablet to work in lots of different ways”. After I got a picture on the screen and a keyboard and mouse that worked (something that turned out to be surprisingly difficult and worthy of a blog post all to itself) I did some stuff about how easy it is to get MonoGamae working Windows 8. You can find my slides and sample code here.

Then it was the turn of Simon to talk about good practice for game development and creating sprite sheets. Before this talk we had engaged in a game of “PowerPoint Chicken”. The game is very simple, the one who is the latest to have their slides ready for a presentation wins. I thought I was in with a good chance of winning, what with having my slides ready less than five minutes before the talk. Of course this left me no time to test my tablet, hence the pain at the start, Simon beat me easily, I think he was writing his deck while I was speaking. Which is probably cheating. Anyhoo, it all passed off well enough, with plenty of failing demos to keep the audience amused.

A word from the wise here, PowerPoint chicken is a dangerous game.

Finally Louis, one of our students, turned up and gave the best presentation of the day all about Unity. I’m really going to spend some quality time with this framework, it looks excellent. I’ll put slides and sample code from the other presentations later on.

Now it is full steam ahead for Global Game Jam Hull. We have over 100 folks registered, a bus full of folks coming over from Grimsby, a load of our students. And some games to make.

Applicant Day Meeting

Pics (1 of 3)-Edit.jpg
Some of the folks at the briefing. Sorry if I missed you off the shot.

The university is soon going to be starting the round of Applicant Open Days for this year. Perhaps you’ve been invited. As part of the preparation we had a meeting today about what we are going to be doing on campus to make sure everyone has a good time and learns a lot. And I was asked to say a few words about what we do in our department (but not to tell any jokes). I told a joke anyway, as you do, and learned a few things that we can add to our open day experience, which was nice.

Cheese Lander is Coming To Windows 8

Untitled

I spent some time today (lunchtime actually) playing with the latest version of MonoGame 3.0. This is the awesome framework that lets you take XNA games and run them on a growing number of platforms. I was interested in seeing if I could get a game to run on my Microsoft Surface. And I did. Behold, above you can see the venerable Cheese Lander actually running on my machine. Works a treat, and you can remote debug over WiFi. I’ll be talking more about this in my Rather Useful Seminar tomorrow.

Using Everything Everywhere at Hull

8385841041_c81500b918_b.jpg

To be honest, I don’t use my phone much to talk to people. But when I do, I expect it to work. Last week it didn’t. And text messages didn’t get through either. Most annoying and embarrassing. I’ve had this problem before on the university campus, with a number of different phones. I thought it was just me until I spoke to James, who is also with EE (Everything Everywhere, a result of the merger of Orange and T-Mobile).

The good news is I think I’ve solved it. Delving into the mobile network settings on the handset I found that the Network selection option was set to “Automatic”. This means (I think) that the phone will search through available mobile networks and find one it is able to use. I wondered what would happen if I changed this to manually force the phone to select my network. So I brought up the menu to pick the network and found a couple of EE networks in the list. I tried each one in turn and, sure enough, one of them rejected calls and bounced text messages, while the other seems to work fine. So I’ve left the phone set to that version of EE.

I’m not sure if there is any downside here, my theory is that Orange and T-Mobile have “merged” their networks by simply giving them both the same name and one of them doesn’t work properly. This might mean I’m only using one network, rather than both of them, but I haven’t lost a call (that I know of) or failed to send a text message since I made the switch, which is definitely an improvement.

Printing Lumia Cases

DSCF0423.jpg
My printed case, and Joanna. The cutout for the camera fits absolutely perfectly.

BrianT popped a comment on the blog last week about the Lumia printing templates that Nokia have just released. They can be used with a 3D printer to allow you to print your own shells for the Lumia 820 phone. You get designs for the shell plus the buttons. You can download them here. What with having a Nokia 820 and a 3D printer to play with I thought I’d had a go. Initial results weren’t successful because the back section is very slightly curved in the original Nokia designs, which for a 3D printer like mine is impossible to print (although other kinds of printers will do this kind of shape). However, a chap on Thingiverse has created a Makerbot version of the case with a flat bottom. This prints a treat, as you can see above. The only thing I don’t like is the Makerbot logo, what with me having an Ultimaker printer and all.  But I can fix that by spending a few minutes in FreeCAD. In fact I can put whatever I like on there. In any colour I like.

The shell snaps onto the phone just like a “proper” one and I was very surprised to find that even the tiny buttons fit well and work OK, although I’m going to have to do a bit of trimming to make them move smoothly.

Remember that the lack of a 3D printer doesn’t stop you from making your own unique phone cases. Places like Sculpteo will take your designs and print them, including full colour if you really want it. Kudos to Nokia for making these drawings available for anyone to use.

Young Developers Launch Session

YD

Hi to everyone!

I actually met up (over Skype) with the Young Developers today for the first time. They are taking part in a programme being run by Seton Hall University in New Jersey which aims to teach programming using Windows Phone as the target platform. A great bunch. They even laughed at my jokes.

I’m looking forward to working with you all over the coming weeks as we get started on the course. Feel free to get in touch and let me know what you want to build for your phone. This is going to be such fun.

Do Not Press This Button Unless You Mean To

image

I got into trouble yesterday because I pressed a button when I shouldn’t have.

Did the same today.

The fun started when I got an email from Kurt, who likes my Voice Music program (as well he might). But (and there is always a but) there was one improvement that he thought would be a good idea, and one bit that he had noticed didn’t work. So I had a look, and he was right on both counts. It took me a couple of minutes to change the feature and find and fix the bug, and then I wanted to update the application on the Windows Phone Marketplace.

I was working at speed at this point, because for some reason I wanted to watch Silent Witness and it was nearly nine o’clock. The Windows Phone Marketplace application submission page beckoned and at the bottom was the Submit button. Which I just pressed, thinking (or perhaps not thinking) that I’d be asked about uploading a replacement version on the next screen. Of course there was no next screen. That’s what submit means. I’d just started the resubmission process using the original version of the program. Wah. What a stupid thing to do. I cursed and went off to watch an hour of daft telly.

Fortunately it is not a huge problem. Since the application hasn’t changed and it was certified OK last time it won’t take long to certify again. Then I can resubmit the fixed program.

So, the lesson here folks is that you need to upload the new version of your XAP file before you hit Submit. Common sense really.

How To Break a Cube (and how to mend it)

WP_20130117_001.jpg
Nice to see the rev counter above zero…

I did something terrible to my Cube on Tuesday. At the time I never thought, but you never do, do you? I started it up to go to work, and then changed my mind about using the car and turned it off again within a minute or two. Which you should never, ever, do to an engine. Ever.

Of course, I paid for this mistake today. The Cube has a button start, which means that rather than turn a fuddy duddy old key, with the Cube I just press a button and the engine starts. I’ve often wondered what would happen if the engine didn’t start. Today I found out. It spins for around 15 seconds and then stops. So you press the button again and the same thing happens. Stupid me. I knew instantly what was wrong, but I was less sure how to fix it. The car was flooded. This means that the engine was full of petrol and not much air. So no combustion and no working engine.

To understand the problem you have to know what happens when a car engine is first started. To get things going it is best to put in lots, and I mean lots, of petrol. Older cars had a thing called “the choke” that did just that, blocking off the air supply and squirting extra fuel in. You had to pull the choke when the engine was cold otherwise it wouldn’t start. Once the engine had fired up you’d then push the choke back in as the engine got warmer and warmer. Of course modern cars don’t have any of this choke nonsense, they have a clever engine management system that pumps in lots of petrol when the engine is cold and then reduces this as it warms up. On Tuesday morning the engine was still in the middle of doing this when I turned it off, leaving the cylinders full of petrol. Wind forward to this morning and the engine wakes up, pumps in whole bunch more petrol hey presto, flooded. Wah.

In an old car the only thing you could do was close the choke and progressively floor the accelerator while the engine turned over to force lots of air into the engine and hopefully clear out the petrol. In a new car you don’t have this level of control because your pedal is just connected to the engine management system. Fortunately the makers of the Cube have thought of this, and they let you do the same kind of thing to fix it. So I eventually got the car going and drove to work. And all at six degrees below zero. And its been fine since because I haven’t been stupid since.

So, if you start a car in this weather, let it run for at least five minutes before you turn it off again. And if you flood it, i.e. it turns over but nothing is happening, then try pushing the accelerator down gradually as you turn the engine over.