Weather Pro – iPhone

Since I was young I’ve always been interested in the weather, no doubt instilled by my father’s experience at the Met Office. I fondly remember poring over cloud charts, and having isobars, warm fronts, and cold fronts explained, although I must admit I haven’t retained much knowledge of that. When a  storm-chasing colleage of mine recently showed me Weather Pro, I was rather taken by the satellite and radar views of Europe. Sadly no isobars here, but there are rather nice animated satellite and radar maps:

Satellite Radar

It’s also a pretty handy gague of the weather each day, with a forecast for your location every 3 hours:

Weather Pro

I’ve recently found this app very handy, what with our typical unsettled British summer! My iPhone wakes me up in the morning, I check Twitter, check BBC News, check my email, check the weather so I know what to wear, then get up. I’d be lost without my iPhone..

So in summary, Weather pro is OK. It’s nothing special, only covers Europe, and the satellite and radar views are chronologcally a little short. It does the job though. I wouldn’t mind finding a better weather app. If you know of one, let me know!

Bookmark and Share

Space Deadbeef – iPhone game

I have a real soft spot for scrolling shooters, even more so for ones with spaceships and big explosions. I think this comes from playing Xenon 2: Megablast literally hundreds of times when I was young – it was the most impressive game for my Dell 316SX – a 386 running at an almighty 16Mhz with 640K RAM. The music was divine – considering my computer didn’t have a soundcard, just the onboard speaker. I’m still amazed how they managed to get Xenon 2 running on a machine like that. The Bitmap Brothers were real heroes of mine; Gods of game programming.

Anyway, this post isn’t about Xenon 2, it’s about the absurdly named “Space Deadbeef“, a side-scrolling shooter by Yuri Yashuhara of IDP. It’s a great looking game, and the gameplay is reasonably satisfying. Where it fails is the control of the player ship. I like the idea behind the mechanism, but it doesn’t quite work. Movement is dictated by the vertical position of your finger on the screen; you can only move vertically, which is rather odd. Firing depends where you touch the screen – if your finger is over your ship, you can build up a powerful blast (similar to R-Type), or if you swipe your finger over enemies, it locks on a number of missiles that are then fired when you release your finger.  It kind of works – but doesn’t feel 100% right.  The game is also too short, it’s just one stage which you can play over and over again, with it getting tougher each time.

Space Deadbeef

Despite the negative comments about the control of the ship, it’s definitely worth downloading, as it’s absolutely free, and a good taste of what’s to come on the iPhone.

On a final note, I honestly think the iPhone would really benefit from an additonal controller for gaming, as some types of games just don’t work well on the iPhone.  I hope we’ll see an official one soon – perhaps it could include an extra battery too..

Bookmark and Share

Electronics Workshop with Mitch Altman

RobotBrighton and The Skiff hosted an excellent electronics workshop today with Mitch Altman – the guy who invented the TV-B-Gone and the Brain Machine – who kindy decided to visit us in Brighton during his stay in the UK.

It’s been many years since I’ve done any soldering, and to be fair I was never that good at it, so it was good to have an expert on hand to show how it’s done.

Mitch had a few kits with him for sale, I bought a Mignonette game kit to help me practice my soldering, and a Brain Machine kit that I’ll put together soon. I had a go on one of the pre-built Brain Machines, and they are very strange..

I haz made Yey for making stuff

More photos on Flickr.

Bookmark and Share

iBomber – iPhone game

Here’s another great game for the iPhone: iBomber! You play the part of a bomber in the Pacific in 1943. It’s top-down, and movement is controlled by tilting the iPhone. Bombs are dropped by hitting the ‘Bombs Away’ button. There’s a number of different powerups you can collect by touching them. The aim is to destroy pretty much everything. Ships, submarines, aircraft carriers, planes, AA guns, fuel dumps and so on.

There’s several levels, with achievements for each one. I’ve played a good few hours of it, and it’s definitely worth a paltry £1.19.

ibomber

Bookmark and Share

Star Defense – iPhone

If you’re a fan of tower defense games, then I can highly recommend Star Defense for the iPhone. You know the drill: Different types of turret, upgrades, waves of different enemies – it’s not deviating from the standard formula at all, but it’s presented nicely, seems quite balanced, and the 3D graphics are quite impresive for an iPhone. It’s definitely worth £3.49 – and it absolutely kills train journeys.

star_defense

star_defense

Bookmark and Share

AS3 BitmapData.hitTest() with rotation

I saw a tweet from @mesh today, asking about hitTest when one object is rotated. A bit of horrible hackery, and here’s the result. Warning, nasty thrown-together code! ;)

var red:Sprite = new Sprite();
red.graphics.beginFill(0xFF0000);
red.graphics.lineTo(40, 0);
red.graphics.lineTo(40, 150);
red.graphics.lineTo(0,150);
red.graphics.lineTo(0,0);

red.x = 40;
red.y = 40;

addChild(red);

var green:Sprite = new Sprite();

green.graphics.beginFill(0x00FF00);
green.graphics.lineTo(40, 0);
green.graphics.lineTo(40, 150);
green.graphics.lineTo(0,150);
green.graphics.lineTo(0,0);

green.x = 300;
green.y = 40;

addChild(green);

var useRotation:Number=10;

var redBmpData = new BitmapData(red.width, red.height, true, 0);
redBmpData.draw(red);

var useDimension:int = Math.ceil(Math.sqrt((green.width * green.width) + (green.height * green.height)));
var diffWidth:int = useDimension - green.width;
var diffHeight:int = useDimension - green.height;
var newBD:BitmapData = new BitmapData(useDimension,useDimension,true,0);
var angle_in_radians:Number = Math.PI * 2 * (useRotation / 360);
var m:Matrix = new Matrix();
m.translate((green.width / 2) * -1, (green.height / 2) * -1);
m.rotate(angle_in_radians);
m.translate(green.width / 2, green.height / 2);
m.translate(diffWidth / 2, diffHeight / 2);
var translatedPoint:Point = m.transformPoint(new Point(0,0));

trace(useDimension);
var greenBmpData = new BitmapData(useDimension,useDimension,true,0);
greenBmpData.draw(green,m);

/*var sampleGreen:Bitmap =new Bitmap(greenBmpData);
addChild(sampleGreen);
sampleGreen.x=200;
sampleGreen.y=200;
*/
green.rotation=useRotation;

stage.addEventListener(MouseEvent.MOUSE_MOVE, onMouseMove);

function onMouseMove(e:MouseEvent):void {
	green.x = mouseX;
	green.y = mouseY;

	if (redBmpData.hitTest(new Point(red.x, red.y),
	255,
	greenBmpData,
	new Point(green.x-translatedPoint.x, green.y-translatedPoint.y),
	255

	  )) {
		trace("hit");
		red.filters = [new GlowFilter()];
	} else {
		red.filters = [];
	}
}

I’ll blog a better example of this, with comments and an explanation of what it’s doing in the next few days.

Bookmark and Share

iPhone camera – 3GS vs 3G

Here’s a quick comparison of the iPhone 3GS camera versus the old 3G camera. The 3GS has a macro function, so it’s not a fair test by any means :)

New iPhone 3GS:

Photo with new iPhone 3GS using Macro

…and here’s a shot from the old 3G:

Photo with old iPhone 3G

That’s quite a difference!

However, it’s nowhere near as good as the camera on the N95, and there are some great photos taken with that phone. Still, it’s a vast, welcome improvement.

Bookmark and Share

Useful stuff: Papervision GUI, AS3 Code Snippet, UML editor, Firefox Plugin

Here’s a few useful things I’ve seen recently. Thought I’d share..

VizualPV3D

A GUI for Papervision! It looks rather similar to Lightwave, although orders of magnitude less powerful. I’ll be interested to see how this evolves. Could come in handy one day!
http://www.juxtinteractive.com/work/vizualpv3d/

Swf Class Explorer

This was a useful utility on a recent project, as there’s no “ApplicationDomain.getAllDefinitions():Array”. Worth bookmarking.
http://flassari.is/2008/07/swf-class-explorer-for-as3/

Violet UML Editor

Jon from Unwrong showed me this rather nifty UML editor. Great for drawing quick, simple diagrams. Cross-platform, and free.
http://alexdp.free.fr/violetumleditor/page.php

Talon: Firefox Plugin

A great plugin for Firefox, which allows you to right-click and capture a page (or region). From there you can upload/share/edit on Aviary, copy to clipboard, or save to desktop.
http://www.readwriteweb.com/archives/aviarys_talon_a_drool-worthy_firefox_plug-in_for_e.php

Bookmark and Share

North Wales Photos

Rachel and I spent a long weekend with my parents in North Wales, staying at my uncle’s house. Once again I was stunned by the natural beauty of the landscape.

Cwm Bychan was as spectacular as usual, and I visited Dinas Oleu for the first time, which is definitely worth visiting if you’re in the area.

As usual, I took a number of photos. Here’s some to bore you ;) I recommend going full-screen.

Bookmark and Share

Fluid Dynamics in Flash

This is one of the most entrancing Flash experiments I’ve ever seen. Eugine Zatepyakin, a Flash Developer in Moscow, has created a rather stunning fluid simulation in AS3.  It’s a fantastic toy, and really quite inspiring. I must take a look through the code when I get some time.

Fluid dynamics

Simply stunning.

It’s based on work by Mehmet Akten, which in turn is based on this paper: Real-Time Fluid Dynamics for Games.

Bookmark and Share