Heartotron Wins Microsoft UK Global Game Jam Competition

StoreScreen

I always tell students to enter all the competitions they can because, you never know what might happen. You probably won’t win. But then again, if you don’t enter you definitely won’t win.

Simon, David, David, Lewis and myself formed a team to take part in the Global Game Jam earlier this year. The theme was heartbeats and, after a little discussion, we decided that a game which pits your heart against all kinds of incoming bad things might hit the spot. Our game was made even more interesting because we also managed to capture heartbeats and synchronise the gameplay to them, which was nice.

After the competition was over David and Simon kept working on the game, submitted it to Windows Store and then entered it in a Microsoft competition.

And we won. A Windows Phone, some cash, a T shirt, a nice pen and key ring each. And a chance to go down to Reading to visit Microsoft UK. Amazing.

I’m actually feeling kind of guilty at this point. After Simon and David took over I didn’t really contribute a great deal to the on-going project. But my background music is in there and they have still based the game on some of my suggestions. I think I was the one that said “We should colour the blood some shade of red….”

If you own a Windows 8 device you can get hold of our prize winning entry by searching the store for “Heartotron”. If you think you can do better, then enter next time….

Thanks so much to Microsoft to organising the competition and choosing our entry. Great stuff.

Rather Useful Seminar: Start your own business

image

If you want to find out more about starting your own business and how to develop ideas, then you should come along to the Rather Useful Seminar on Wednesday this week. Liz Johnson of the university Knowledge Exchange will be giving tips on product development and business formation.

If you’ve got some applications out there, or an idea for a product, or are looking for a way to get started, then you will find the presentation extremely valuable. Especially if you are thinking of setting something up over the summer break.

The session is on Wednesday 24th April at the usual Rather Useful Seminar time, 1:15 pm, in the usual place, Robert Blackburn Building LTD.

Make a Font from your Handwriting

FontDemo

I came across this a while back, via a tweet from Ed and the website The Cheese Thief. Today I actually got around to playing with it. It works rather well, as you can see above.

All you have to do is download the form, fill in the boxes, scan the form and send it to the web site. You get back a TrueType font of your own handwriting. All for free. Go here to make your own personalised font.

Sprites and Distances

Space Killlers Backdrop

At the moment quite a few of the first year are working on a “Space Killers” game. Above you can see my sample screenshot from the specification. You can see that my graphical design abilities are around the same as usual.

The idea is that the player (the green object) must survive in brightly coloured space while all around are trying to kill. Collision with any game object is instant death. Survive until the clock counts down to zero and you are rewarded with another level with more, and nastier, things in it.

One of the game objects is the “Master”. This is the one that looks a bit like a fried egg in the above screenshot. (Note to graphics department, fix that please).

Anyhoo, a Master sprite will sit and do nothing unless you get too close. Then it wakes up and chases you. To make this work the game needs to be able to work out how far the master is from the player. In my solution I have a sprite class:

public class Sprite
{
    public Texture2D SpriteTexture;
    public Rectangle SpriteRectangle;
    public Vector2 SpritePosition;
    public Color SpriteColor;
}

This contains stuff that we need to position and draw the sprite. The Update method for the parent sprite just uses the position vector (which I use to decide where the sprite is on the screen) to set the SpriteRectangle value (which I use to decide where to draw the sprite).

public virtual void Update(SpaceKillersGame game)
{
    SpriteRectangle.X = (int)(SpritePosition.X + 0.5f);
    SpriteRectangle.Y = (int)(SpritePosition.Y + 0.5f);
}

My sprite also contains another method, DistanceFrom, which is used by code in the Master sprite to decide how close it is to the player.

public float DistanceFrom(Sprite otherSprite)
{
    float dx = SpriteRectangle.Center.X -
               otherSprite.SpriteRectangle.Center.X;
    float dy = SpriteRectangle.Center.Y - 
               otherSprite.SpriteRectangle.Center.Y;
    return (float) Math.Sqrt((dx * dx) + (dy * dy));
}

This is how it works. It turns out that the Rectangle class contains a Point value which gives the coordinates of the centre of the rectangle. I can use the X and Y components from this to work out the difference in x and y between the two rectangles. I can then use Pythagoras Theorem to work out the distance between the sprites. Pythagoras said “The sum of the squares of the sides of a right angled triangle is equal to the square of the hypotenuse”.  My code works out the sum of the squares and then takes the square root of this to work out the distance value.

image

Hopefully the above diagram will make it all clear. If not, just enjoy the pretty colours.

My Master sprite then contains the following statement in its Update method (Update is called on the sprite to make it update itself. It is given a reference to the game that is currently active).

if (DistanceFrom(game.Player) < MasterRadarRange)
{
    ChaseActive = true;
}
MasterRadarRange is a value which controls how far the Master can “see”. If a player gets closer than the radar range the flag ChaseActive is set to true, which triggers the chase behaviour in the Master sprite.

Useful 3D Printing Text

image

Chris (the author the above) was kind enough to send me a copy to take a look at. You can download your own from Amazon for the princely sum of 2 pounds 22 pence. If you want to know what 3D printing is all about, how it works, and some ideas about how you could build a business based on 3D printing technology I reckon it is well worth a look.

This kind of text is perfect for electronic publishing as the field is very fast moving and I hope that Chris is able to keep it up to date. The writing style is conversational and the content is packed with little nuggets of information that must have taken quite a while to put together.

Hull Digital April Meetup

DSCF0444_5_6.jpg

Just a week after the event, some notes from the Hull Digital April Meetup on the 11th.

I was a bit late arriving, but I did get to see some interesting stuff about Model View Controller (MVC) in JavaScript from Duncan McMillan. He’s a web designer and developer at Art and Soul. MVC is a very popular way to structure an application, and it was interesting to see how it can be employed when you are writing a web based client program with complex behaviours. If you want to find out more about this technology Duncan suggested the site todomvc.com as a good place to start.

Of equal interest, to me at least, was the Paper application that Duncan used to present his talk. This made for some lovely looking slides. The application is interesting for another reason too; they are using the “freemium” model to sell the program. The starter version costs nothing, but before long you are paying for extras to give you different fonts and sketching tools. I rather like this way of selling a program. It means that you can only pay for the things that you are going to use. It also means that you will take the trouble to learn how to use a feature once you have paid for it, and that you are not overwhelmed with features in the program when you first start using it.

Next up was a chat from Stephen Lewis who was talking about the latest developments in PHP. I first used this ages ago. I’m so old that I can remember that PHP stands for “Personal Home Page”. It is a server side scripting language of great power, that integrates really well with databases. I used it to run PHPBB, a bulletin board system that for many years powered the forum in our department. Stephen was telling us that the language is still moving forwards, with object oriented support and lots of other goodies goodies. I’m not sure his talk will send me back to writing PHP again, but it is interesting to see that such things are still moving forwards.

All in all an interesting evening. And I even got a free drink.

Raspberry Pi Take 2

DSCF1580-Edit.jpg 
The audience, still smiling at the start of the session.

We had our second Raspberry Pi session today. Good to see more people keen on spreading the word about the fun you can have with computers. And the Raspberry Pi is a great vehicle for that. If you want a really nice guide to getting started with the Pi, one of the folks that came to see us yesterday, Mark, has put together a most excellent guide which you can find here. You can also find the notes from the last session, along with another set of smiling faces, here.

Black Marble Wisdom

DSCF1577.jpg
Steve Spencer and Rob (Boss) Hogg get down to business

We were very lucky enough to have Steve and Rob from Black Marble come over to Hull today to tell us about the business of software development. I think everyone should see talks like those, particularly people who think that creating software solutions is a technical problem. Because it isn’t. It’s pretty much an “everything else” problem with a bit of technology thrown in to make it work. Steve and Rob give about the best exposition of this that I have ever seen. They can talk about the mistakes that developers and managers make because they are candid enough to admit that they have made most of them over their time in business.

The staggering number of software projects that fail in the real world is down to human frailty as much as anything else, and what Steve and Rob do is point out the behaviours to watch for and the strategies that you can use to mitigate the problems.

My only regret about the talk was that we did not have more students there to get the benefit of it. Folks, if you thought about going but didn’t bother in the end, you have seriously missed out. With a bit of luck Rob and Steve will be back again next year, and you can get the benefit then.

Raspberry Pi Introductory Session

DSCF1572-Edit.jpg 
Just as we were getting started.

Tonight Emma-Jane, Simon, Neil and myself did our first “Raspberry Pi” event. Thanks to Emma-Jane’s special trip to the supermarket we even had some actual raspberry pi’s to eat, which was nice.

The event was organised for local schools and colleges who want to find out more about the platform and how it can be used for teaching and fun. Simon showed off the neat way that you can interact with Minecraft from within a Python program and I told my polar bear joke. Again. It was nice to see so many people who were keen to work with this splendid little piece of technology. You can download the slide deck for the presentation from here. If you want to find out more about my Raspberry Pi powered arcade table you can find out here. And yes, it is still “nearly finished”…

We are repeating the whole thing tomorrow, including probably the polar bear joke….

Software War Stories from Black Marble

image

If you’ve ever wondered what software development is really all about then you should come along to our next “Rather Useful Seminar” on Wednesday this week. Robert Hogg and Steve Spencer of Black Marble, a local software company which works closely with the Department and has recruited many of our graduates, are giving a seminar on Wednesday 17 April where they will be sharing their experiences of software engineering in the real world.

Robert and Steve are entertaining speakers and have a great deal of experience of real-world software development and running a software business. The presentation will be at 14:15 in RB-LTA. This is a slightly different time and venue from previous seminars. All are welcome, particularly Year 1 and Year 2 students.

My Lego City Secret

image

I’m working my way through Lego City Undercover on the Wii U and thoroughly enjoying it. I still don’t like the loading times, but I’ve got used to the cranky car handling and I’m now ploughing my way through the missions. With the help of the above text. Yes, I’ve now reached the stage in my life where I’m using a cheat guide for a game which was created for eight year olds to play…

In my defence I’m only using it for when I get really stuck, in fact I’ve asked number one wife to look things up for me, so that I don’t get tempted to “cheat in advance”.

Class Design for Shops

IMG_6213_4_5.jpg

At the moment lots of our students are working on their first year coursework. This year they can make either a game, which I’ve called “Space Killers” or a management system for a record shop, which I’ve called “Vinyl Destination” (turns out that there actually is a shop with that name – which only goes to show that great minds think alike sometimes). By the way, a record is what very old people used to buy music on. They are pressed out of plastic, usually 7 or 12 inches in diameter, easy to scratch and becoming fashionable again, which is nice.

Anyhoo, one of the central design decisions that has to be made is just how to store information about the records that the shop has in stock. We have been discussing this in the lectures, and it is interesting to reflect how the business needs of the customer affect the organisation of their data. Lots of shops have things to sell, but the way that you would hold their stock information varies from one business to another. I’ve broken these down to three broad categories which I’ve called “Art Gallery”, “Car Showroom” and “Supermarket”.

Art Gallery: In an art gallery each item of stock is unique. Or at least it better had be. Turning up with a second copy of the “Mona Lisa” would probably raise one or two eyebrows. Every item in the gallery has properties such as the artist or artists that made it, the date, the description and the price, but this information would be held for each individual piece in stock. To store the data for this application we would design a class, perhaps called “StockItem”, and then create an instance of this class for each of the pieces that is held in stock.

Car Showroom: This situation is slightly different. The showroom will hold a large number of cars, but they will be of particular models. They will hold a large number of “Ford Fiestas”, but each of them will have different trim levels, colours, ages and prices. If we held the data about our cars in the same way as we hold the data in the art gallery we would store a lot of the same data multiple times. Every individual StockItem would hold its own copy of the name, the manufacturer and lots of other information common to all Ford Fiesta models. A better way to design the system might be to have a class, perhaps called “CarModel”, which holds all the information about the type of car (all the “Ford Fiesta” parts) and then have the “CarModel” class hold a list of all “StockItems”. The StockItem class would hold all the information about a particular car, including things like colour, mileage and price. The CarModel class could hold a list of the StockItems of that particular model. For example, if the garage had a red Ford Fiesta and a blue Ford Fiesta there would be a CarModel object for Ford Fiesta which holds a list containing two items, a StockItem for the red one and a StockItem for the blue one.

Supermarket: In the case of a supermarket which is selling cans of beans, all the cans of beans of a particular type are identical. In this case we don’t need to store information about any individual can, instead we just want to know how many we have in stock. So for the supermarket we just need an object that holds a description of the item and also contains a counter that tells the system how many of that item are in stock.

If you are building a system for a customer, it is worth considering which of the three arrangements makes most sense. In terms of Vinyl Destination I reckon that because the you can get records of different quality it is more like a garage or an art gallery. The shop may have several copies of “Abbey Road” by The Beatles, but some will be in pristine condition (and therefore worth more) than others.

Addicted to 3D Printing

IMG_6505.jpg

You know you are an experienced 3D printer when:

  • Strangely shaped bits of coloured plastic from failed print jobs are no longer fascinating to you.
  • Your bedroom carpet is covered in strangely shaped bits of coloured plastic.
  • You can get hold of strands of plastic at 200 degrees centigrade and think "Ooops" rather than dancing round the room holding your hand and swearing.
  • Your hands acquire some funny looking scars and blisters as a result of this.
  • You start to make up tunes inspired by the noises your printer makes when it is working.
  • Whenever something works you instantly try to print out a bigger one. Or a smaller one. Or a red one.
  • You start to like the smell of molten plastic.
  • You feel that you are at the cutting edge of technology, even when your wife asks "What's that meant to be?"
  • You think a little plastic bust of yourself would make an ideal wedding present for someone.
  • You begin to plan your social life around eight hour print jobs.
  • You don't know what PLA stands for, but you know exactly the temperature it melts in your machine. In five different colours.
  • The word "plug" becomes a swear word.
  • People start giving you designs they’d like to have printed out.
  • You start to wonder if there might be a business model in this…..

Free Windows Phone Dev. Training

image

You don’t get much for free these days. Except that sometimes you do. Getting training on things computing is often a horribly expensive business. But now and then you get some astonishing offers. Nokia and Microsoft have teamed up to set up some training days in London which are free to developers with an interest in Windows Phone development. There is one this Saturday, and another on the 11th May. Click on the dates to find our more and register.

I know they are going to be high quality because Andy Wigley is doing the training. If you have coding smarts and a good idea for an app,  but have never written for Windows Phone, then you should go along and get some great insights into mobile development. Tell them I sent you.

Will the real Percy Pig stand up

WP_20130331_001.jpg

It has come to my attention that I’ve made a terrible error. I’ve been writing posts extoling the virtues of Percy Pig sweets, (which I’ve been buying from Sugar Sugar Sweets – three for two on Wednesday) when it turns out that these are really Porky Pig sweets. The real Percy Pig is a trademark of Marks and Spencer as you can see above. I found this out when I bought a pig for number one wife for easter. The chocolate tastes great, but we are having a real problem eating Percy, shorts and all as we don’t like saying things like “I’ll have his leg, looks delicious…”.

We’ve solved this by convincing ourselves that this is actually a model of Percy, who is alive and well and living happily in a sty in Bournemouth. Oh yes he is.

Fun with HDR Photography

DSCF1398_399_400.jpg

I’m getting quite into this HDR photography lark. It doesn’t always result in photographs which are lifelike, see above, but I quite like the effect and anyway, it’s my blog…

This picture was produced by the Photomatix program which you can get from HDRsoft for less than the price of a video game. The only real pain is having to take three copies of each photograph, an underexposed one and an overexposed one which are then combined with the software. If you are into photography and you haven’t had a go at it, then I’d recommend that you give it a whirl. It transforms quite dull scenes into much more interesting ones.

TechEd 2013 here I come

image

I was very pleased to find out a little while back that I’ve been invited to deliver a couple of sessions at TechEd USA in June. I’m doing two sessions on Windows Phone 8, one about using background agents and the other about adding speech to Windows Phone 8 applications. I’m really looking forward to going out to New Orleans and taking to the stage. It was even nicer to find that my old partner in crime, Andy Wigley, is also giving some sessions on phone development. It looks like it is going to be great conference. And I hear it can be quite warm out there. I might even pack my shorts…..