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
Wednesday
Aug042010

Silverlight Blackjack for Windows Phone 7

Silverlight Blackjack for Windows Phone
Well, what would you do?

For no particular reason (perhaps because I’ve got lots of other, more important, things to do) I’ve been working on a version of Blackjack for Windows Phone 7. I’ve come across an interesting philosophical/moral problem.

At the moment my display has room for only five cards. If a player gets a lot of low cards then they can fall off the end of the screen. I can think of two ways to fix this.

  1. Spend some time re-arranging the display so that cards can overlap and I can fit up to 21 cards (the absolute limit given that you are playing with six decks in the shoe) on the screen.
  2. Make the fifth card you get always a king.
Tuesday
Aug032010

Creating Windows Phone apps on a Netbook

Capture

It does work, although you might want to attach a larger monitor...

I was wondering if it is possible to run Visual Studio 2010 and create Windows Phone applications on a very small machine, say a tiny MSI Wind netbook with a lowly Atom processor. Turns out that it is, and it is just about useable (as long as you take the precaution of upgrading the memory to 2G).

You can run Silverlight applications on the windows phone emulator but for XNA you need to find a machine with a bit more graphical grunt, since the graphical power in the phone is actually greater than the netbook, which therefore can’t properly emulate it.

Monday
Aug022010

Instant Green

image

If you want to know how to get “green credentials” for your organisation do what the US Government does with its forms. They have the “Printed on Recycled Paper” logo on the bottom of all their PDF documents so anyone that prints them out is automatically eco-friendly.

Monday
Aug022010

Imagine Cup Poland Final Pictures

imagine-cup2010_572_DSC4207

Maria took this picture. Brilliant.

The Imagine Cup World Finals in Poland seem a very long time ago, even though they were just last month. If you were there and want to relive the moment, or you just want to see some excellent photographs, head of to here:

http://mariabielik.zenfolio.com/imagine-cup2010

Maria was one of the judges, noted for her ready smile and the Nikon SLR that was always around her neck. She has posted some of her shots and they are really, really good.

Sunday
Aug012010

Windows Phone 7 Accelerometer Values

IMG_2120

I’ve been playing with the accelerometer in Windows Phone 7 and trying to make sense of the outputs. If you are interested (and, I guess if you are not) these are the values for the different orientations:

Flat on the desk: X=0, Y=0, Z=-1
Upside down on the desk:X=0, Y=0, Z=1
Standing like a tombstone: X=0,Y=-1, Z=0
Standing like an upside down tombstone: X=0,Y=1,Z=0
Landscape – controls on right: X=-1,Y=0,Z=0
Landscape – controls on left: X=1,Y=0,Z=0

The best way to visualise this is as a weight on a piece of string of unit length tied to the phone. If you hold the phone flat in portrait mode the the weight hangs straight down, giving X=0, Y=0 and Z=-1. Then as you tip the phone up to make it into a tombstone (as it were) the weight moves so that it is hanging directly below the phone, giving a Y of -1 and a Z of 0 and so on.

Apparently these values will be the same irrespective of how the program sets the orientation of the phone, i.e. they are set to give values as if you were using the phone in portrait mode. If you want to use different orientations you will have to transform these values.

I’ve found the readings to be quite accurate, at least as good as my real spirit level.