Tues 1st June: Unit Testing

May 28th, 2010

David Holmes scrolled through a window of code. He and his colleague Dr. Seb Watson had been brought in to hunt bugs in an ActionScript project by their client, a wealthy London design house. Noticing something, Holmes bent towards the screen and squinted.

‘Do you see this Watson? BakerView.as, line 221, “isHome = true;”.’

‘Yes Holmes, and I think I’m right in saying that Boolean flag denotes whether BakerView is the root or not,’ replied Watson.

Homes looked away from the monitor. ‘Other people’s observations cloud the mind Watson. If BakerView.isHome is set to false, every other class could change, causing errors all over the app. It should always be true, so we must set up a unit test to monitor it.’

‘Unit test?’ replied a perplexed Watson.

‘Yes Watson. Unit tests are validation checks which ensure that discreet units of code run as expected. In this case the unit test will ensure that inHome equals true. Take a hansom cab to Shoreditch and tell the client we will spend the week writing unit tests. Then meet me at The Werks at 7pm on Tuesday 1st of June, where I will show you what unit tests, integration tests, mocks and TDD are and why we need them. In the meanwhile I shall develop a simple Flash application, and write some tests to verify its behaviour. If all goes well, I’ll demonstrate the use of FlexUnit, mocking classes through inheritance and using FlexMonkey to automate the testing of the whole application.’

‘Right away Holmes,’ puffed Watson, moustache bristling. ‘See you on Tuesday!’

As a single strand of human hair fell through a shaft of sunlight and alighted on top of the monitor, Holmes returned to scrutinising the code.

Bookmark and Share

Robot Wars III – Results

May 26th, 2010

Match 1

Game 1 – Rich (Richard Willis)
Game 2 – Swingpants (Jon Howard)
Game 3 – Harry Carrie (Paul Hayes)

Match 2

Game 1 – Jaime (Jaime Dominguez)
Game 2 – Harry Carrie (Paul Hayes)
Game 3 – Jaime (Jaime Dominguez)

Final – Harry Carrie vs Jaime

WINNER: HARRY CARRIE (PAUL HAYES)

Well done Paul and thanks to all the contestants. The videos are up on demand at live.flashbrighton.org (apologies for the loudness).

Bookmark and Share

How To Make Your Own Bot for Robot Wars III

May 22nd, 2010

The Tournament

Create your own fighting robot in AS3 and watch it battle it out in FlashBrighton’s third Robot Wars tournament. It will be held on Tuesday 25th May 2010 at 19:00 BST at The Werks in Hove. The event will also be streamed live at live.flashbrighton.org.

Submission

If you wish to compete, send your Bot and BotController classes to legojoe [at] gmail.com. The deadline for submissions is Tuesday 25th May 17:00 BST. UPDATE: There will be a one hour coding session before the tournament, so the deadline is now 20:00.

Quick Start

  1. Download the source and add it to your ActionScript 3 (FP10) project.
  2. In org/flashbrighton/as3bots/bots/ create a new class that extends BaseBot.
  3. Create another class that implements IBotController.
  4. Use the code from JoesBot and JoesBotController to get a good idea of where to start.
  5. In Main.as create a new instance of your bot in the addBots() method.
  6. Compile and watch!

Read the rest of this entry »

Bookmark and Share

Tues 18th May: haXe Workshop

May 17th, 2010

Lee McColl Sylvester will be joining us at FlashBrighton, providing a workshop that will cover the basics of haXe and working toward developing a simple multiplayer game by writing both a frontend Flash SWF and a simple backend socket server using the same code base.

This will include how to create a haXe compile script, integrating asset files, working with haXe entry points, outputting to multiple target platforms and seemlessly communicating across those platforms with the haXe remoting framework.

Sign up on Upcoming and come along to The Werks in Hove at 7pm on Tuesday 18th May 2010.

Bookmark and Share

Tues 4th May: Blender Character Animation

April 27th, 2010

Tim Jobs strode out onto the darkened stage dressed in his trademark grey polo neck. The soft murmur of anticipation was replaced by whoops & applause as the iconic Apple&Gate logo appeared on the screen behind him. As the noise slowly died away he began his address.

‘I’ve been looking forward to today. We’ve been working on an incredible new experience. It’s a real game changer, let me show you. BOOM!’

He pressed a small handheld device and walked to the side of the stage. The noise in the hall started to rise. The rotating armature of a 3D character replaced the logo onscreen. A texture map wrapped itself around the armature as it continued to spin. The final piece of texture – the character’s face – coincided with the rotation ending, and the character walking across the screen. Wild applause broke out as Jobs strode back into the limelight.

‘Isn’t that awesome? We did that with Blender, and it’s now very simple to import that character into programs like Unity3D,‘ he said, looking up at a rapt auditorium. ‘We want that demonstration to sink in for a while, so stick the Apple Mac in the car park, then join me at The Werks in Hove at 7pm on Tuesday 4th of May, and I’ll show you how.’

Cat calls & cheering accompanied Jobs’ exit from the stage, as the crowd savoured the Blender character animation demo to come.

Bookmark and Share

Tues 27th Apr: Introduction to Unity3D

April 20th, 2010

No one would have believed in the first decade of the twenty-first century that the world of Flash 3D was being watched keenly by a 3D system immeasurably superior to ours. Yet across the timeless voids of the Internet the creators of Unity3D regarded our world with envious eyes, and slowly and surely they drew their plans against us.

The Unitians’ mathematical learning is evidently far in excess of ours. Had our instruments permitted it, we might have seen their powerful IDE, their Terrain Toolkit for generating and editing terrain, and their Detonator framework for parametric explosions. We might have understood how simple they make synthesising and manipulating 3D physics.

I might not have heard of Unity3D at all had I not met Iestyn Ogilvy, the well-known Flash developer. Ogilvy had landed on the planet Unity3D in the latter half of 2009, and the knowledge he had gained with his spectroscope of its capabilities and powers had allowed him to create two promotional games with it for Iron Man 2.

‘I have discovered much about the threat Unity3D poses,’ he said. ‘The chances of anything like these games coming from Flash are a million to one. Come to my lecture at The Werks on Tuesday 27th April and I tell you more about its 3D physics, its Terrain Toolkit & Detonator framework, and its IDE. And I will show you how I used it to create these two games.’

Amazing pieces of software had been emanating from Unity3D for the past year. I decided Ogilvy’s invitation was too good to refuse and immediately took him up on it. It turned out to be a fortunate decision as at the time no one in the Flash community had dreamed of what Unity3D would eventually bring us.

We would be soon to find out.

Bookmark and Share

Tues 20th Apr: OpenFrameworks with Hellicar & Lewis

April 13th, 2010

My name is Primo Mentiroso. I live in a part of Bishopsgate in London where a fragment of dry stone wall still stands*, which I can see from my kitchen window. It curves beyond a modern office block fifty metres away, with a sweep that suggests it might go on forever. Wondering if this might be true, I have tried many times to approach the wall, but to no avail. The passageways that surround it always led me away, towards a main road.

One morning, a stranger who was stood at the entrance to one of these passageways introduced himself to me.

‘I am Joel Gethin Lewis,’ he said. ‘I have seen you trying to find the wall, but only those who know its secret know how to find it. It is built with OpenFrameworks, an open source C++ toolkit for creative coding. Follow me and I will show you.’

I followed him around a left turn I had somehow never noticed before and we emerged into the shaded space in front of the wall. A second man stood on the other side. Although the wall was made of solid stone, the outline of his body appeared on our side of the wall. The shape his body cast began to multiply and feedback, disintegrating into an complex array of coloured forms.

‘I’m Pete Hellicar‘ he said. ‘Joel and I are artists, and work together at Hellicar & Lewis. We have brought you here to see our projections. These silhouettes are our “NZ Projection“, the regenerated forms come from our “Feedback” project, and this is our “Hello Wall“.

Although I could see much more of the wall from where I stood, it still appeared to have no end and no beginning. The projections too could have begun and ended anywhere. My head swam with dizzying implications. Though I feared the answer, I was compelled to ask ‘Where does it start?’

Pete directs the art, and the art directs my OpenFrameworks development,’ explained Joel. ‘It’s an infinite loop, a perpetual motion machine. We put people in the moment, because the moment is all we have. Come to The Werks at 7pm on Tuesday 20th April and we will tell you more, including an introduction to OpenFrameworks.’

* – The wall in question may be the one mentioned by Wolfgang Erfunden on page 147 of the first edition of his ‘History of the Saxon People’. Erfunden is quick to point out that although the wall can be said to date from around 100AD and lies on the route of the original London Wall, the dry stone technique used was not in common usage with the Romans, and copper artifacts recovered from a site 500 yards to the north where similar stone were found reveal a degree of filigree and glasswork known chiefly to be associated with the coastal folk of Northumbria. It is worthwhile reading Erfunden on this, as the opinions of a lowly Argentine scribe are not to be ventured on subjects of which he knows nothing, such as Celtic knotwork and Roman walls.

Bookmark and Share

Tues 13th Apr: iPhone Dev (part 2 of 2)

April 6th, 2010

M looked up as Paulo Bond entered his office.

Good job on the Orient, Bond. Sorry about that Nash chap, MI5 hadn’t pinned him as a Ruski.’

‘Not at all M. One needs the practice from time to time. He was… interesting, shall we say?’

‘Hmm, interesting, yes,’ mused M abstractly as he shuffled some papers. ‘Listen Bond, New problem on the horizon I’m afraid; a Dr Gorner, illegal pharmaceuticals or something. Your work with the iPhone was excellent. We need you to continue with that. We need you to show the new recruits what you’re planning.’

He looked up with a furrowed brow. ‘What are you planning, Bond?’

Building on the previous session, I shall build a Flash app that loads bus times from a third-party API and integrates them with Google Maps. Then I’ll then do the same for the iPhone. We know about Gorner’s business. We timed the last bus, and we believe we can track his movements with the iPhone app.’

‘Good. I want you to build it live, Bond, so we can all watch. Same time, same place: Tuesday 13th April, 7pm, at The Werks in Hove.’

Bond nodded and got up to leave. M called after him. ‘Oh Bond, where’s the Russian girl you brought back from Istanbul? Did you hand her over to Guildford?’

‘She was South African, M. And I don’t know where she is, I haven’t seen her since breakfast this morning.’

Smiling, Bond turned the door handle and let himself out.

Bookmark and Share

Tues 6th Apr: iPhone Dev (part 1 of 2)

March 30th, 2010

‘The name’s Bond. Paulo Bond.’

Bond stood aboard the Orient Express. The train came around sixteen coaches long, and Bond shook the hand of the man who had just stepped onto it. His beige moustache and well-worn Macintosh gave him away as an English agent. Bond found himself staring into cold eyes that gave nothing away.

‘I’m Captain Nash, old man. M sent me personally. What’s this business about?’

As the train began to pull out of Belgrade, Bond slipped a sleek device out of his inside pocket. ‘This is an iPhone, Nash, the latest thing in mobile communications. Q tells me it can be programmed with both AS3 and Objective-C. I’m to show you the basics of the Objective-C method, and compare and contrast it with the AS3 method.’

Nash gazed coolly out at the city sliding by. ‘I have a contact to meet in Venice, old man. Can this wait?’

Bond slipped a gold-banded cigarette out of his silver case and lit it. ‘Of course, Nash. We’ll be in England in five days. I have a safehouse away from London we can use. Meet me at 7pm on Tuesday 6th April at The Werks in Hove and we’ll go through this together. Oh, incidentally this will be just the first of two such briefings. Make it on the 6th and a week later I can expand on it. Can’t tell you quite how yet – you never know who’s listening – but if you turn up on the 6th perhaps you’ll find out.’

‘Paulo, can’t you come back to bed?’ called a female voice from the cabin behind Bond. It might have been Russian, or South African. It was hard to tell. Bond smiled enigmatically.

‘If you’ll excuse me, Nash.’

Bookmark and Share

How we stream our meetings

March 28th, 2010

Branden Hall at FlashBrighton

I’ve just written a post for Influxis explaining how we used their TVStation app, to broadcast Branden Hall’s remote Hype presentation last week.

Streaming a remote presentation with TVStation

Bookmark and Share