Posts

Showing posts with the label iain

Come to Mochi London on Saturday (27th August 2011)


In my last post I wrote about how the Flash community feels in need of a reboot, to align it better with Flash's new users, and its new role as a games technology. Well, events like Mochi London are probably a big part of that reboot. Mochi London is a free 1 day conference, being held this Saturday (27th August 2011) at King's College London.

I will be speaking there with a brand new session called Addictive Game Design - ok, I've borrowed a lot of the content from my 2010 Flash on the Beach talk ;)

The other speakers include Merlin Gore from Flash Game License, and Mike Jones from Adobe, as well as a whole bunch of other developers. It's free but you need a ticket, so grab one on Eventbrite while there are still spaces. There's also a pub gathering on Sunday, but I won't be able to make it to that. Hope to see you there!

Video of my talk "10 years, 30 lessons"


I gave this talk at #Digpen, which is a free, informal conference for digital people in the South West, run by Frankie Dolan. This was a brand new talk I wrote on the evening before the conference! I was supposed to do about 5 minutes apparently, but nobody seemed to have told me that, so I did about 15. You'll have to turn your speakers up a bit because I wasn't mic'd up. This was a really fun one to do!

What have I been up to?

I haven't updated the blog in a while as I've been a bit blah, so I thought to help organise my brain a bit better I'd write a list of everything I've been up to, and what's coming next. I'm also slightly hung-over, if that information helps. This is exactly the kind of post I set out not to write when I started my blog. Good blogging is about writing articles, I think. Ideally, they should be good enough to print them in a magazine that someone would buy. However, a few personal milestones have also gone by in the last couple of years with little fanfare, so it's probably past-time I got into a bit of reflection. (I failed to mark 10 years using Flash, 10 years in the industry, 3 years of blogging, 2 years running my own business and, more depressingly, turning 30 - oops.)



I've been a freelance Flash game developer, or as I like to call it "Managing Creative Director of my own company", for over 2 years now, since leaving Bloc. My main business is still developing games and game-like-things for clients, using Flash. I've played with other platforms like XNA/Windows Phone, JavaScript/Canvas and Unity3D, but each one just reminds me how much I love Flash, and how much my knowledge of the language and platform helps me get things done. Obviously, other developers have this feeling about other technologies, and that's great. But for me, for now, Flash still rules. I find flipping between Flash Develop for code and Flash Professional for layout to be a joyous way of working. Tools aside, one of the best things about Flash is that everyone can see your work without having to own an expensive smart phone, download anything or worry about what browser they are using. End users don't even know or care what Flash is. They just know that there are fun things on the web as well as the "information" that geeks tend to obsess about.


My most recent piece of released work is a physics toy I made for Muzy.com. Users have made all kinds of crazy scenes with it - you can look at them here. It uses the excellent Nape physics engine, which I love. I'm now working on a "generative art" application also for Muzy. It's not finished yet, but it can make things like this:


The graphics for both these projects were supplied by my occasional collaborator, my wife Amanda, who nicely fills in a lot of the gaps in my skill set, like realistic drawing. You can see a few more of her lovely pixels on her new website. Amanda is still finding her style as an illustrator after a previous life as a developer, so expect even prettier things from her in the future.

As well as keeping up the client work, I am now taking independent game development more seriously. I love making games, and I've been doing it for over 10 years, but when I look back at the output of my 10 year career, I don't see a body of work that represents a great deal about who I am, what I like or what I know about game design. Even though I'm vaguely notable on the Flash scene, nobody in the games world knows or cares who I am or what I do. And I don't have a single game that I could point them to that would convince them they should. Most of the work I do is "white label", which means I can't really talk about it, or sometimes even say that I did it. My biggest hits such as Zwok and Stackopolis were many years ago, and largely forgotten, and besides, they were team-efforts rather than my own particular visions. It's time I put my money where my mouth is, or as Joey deVilla puts it so beautifully, put a rocket up my ass.

Owl Spin

The next game you'll see from me is Owl Spin. That's a picture of it, there. With the spinning owl. It's a casual skill/puzzle game. I'm very happy with how it has turned out, and I've learned a lot making it. It's currently available for sponsorship offers on FlashGameLicense.com, but I just put it on "Last Call", so if you're a portal-owner, you'd better hurry if you want your name on it. While it probably won't make anything like the same money I'd have been paid had it been a client commission, it's still enough to convince me that I can develop games independently and not starve (I could do with losing an inch around the waist anyway).

I keep all the intellectual property, and I got to make the game how I wanted it to be. And I got to do the art myself - an itch that has remained largely unscratched since leaving university. (The interactive media business likes to pigeon-hole and force specialisation on people for reasons of efficiency, regardless of what they actually enjoy, hence how I somehow went from being a Junior Designer with a mixed portfolio of skills to a Head of Interactive who eats, drinks and sleeps ActionScript.) If I did some things wrong in development, I think it's these...

I probably did it a little bit too much in stealth mode. Nobody really knew I was working on a game, and then I announced that it was finished. This means there's not a great deal of anticipation or awareness of Owl Spin. From now on I'm going to try to be more open early on, perhaps get some earlier feedback on how the game plays, what could be improved, etc. I'm rectifying this by announcing my next game now.

I also probably misjudged the game portal market somewhat. Games about cute birds do well on mobile devices that have a broad, casual audience. But on reflection, I think the Flash portal audience is really more of a mini-hardcore audience. RPGs and action games with guns, zombies and wizards etc seem to be more popular than casual, cute bird-based titles. (The Flash equivalent of Angry Birds, Crush the Castle, features medieval weaponry and gory explosions!) There's no wish-fulfilment for a 14 year old kid in become an Owl with rotating wings, alas. I'm rectifying this with a load of guns.

Lastly, I don't think I made my dream game, the game I couldn't wait to play, if only it existed. So what kind of games do I enjoy playing? Fortuitously, I happen to like games with guns and wizards in. My favourite games at the moment are freeware sensation Super Crate Box and action-RPG Mass Effect 2. I also have very fond memories of games like Gunstar Heroes, Rocket Knight and Metal Slug. So I'm making something that's a bit like all these games, and I'm calling it Super Gun Kids.


I'm doing the art in the same really simple vector style as Owl Spin. It's quick to do, looks OK and animates well, and lets the player concentrate on the gameplay. While previewing Owl Spin I have had a few criticisms / suggestions about level design and gameplay, but nobody criticized the graphics, despite the fact that I knocked a whole games worth out in about one day. I'm also sticking with cuteness and blue skies. It worked for platform games in the 16-bit era, and I think it still works now. I'm hoping Super Gun Kids will be the game that catapults from jaded hired-gun to indie game hero, but who knows!?

Ok, so what else is happening with me? I'm getting more and more into teaching game design / development. I've been doing loads of guest lectures at colleges and universities, and I'm setting up an evening course in Flash games for complete beginners at Truro College, which will be starting in September, as long as 10 people sign-up. On the advanced level stuff, if there is enough interest from you guys, I will try to run some professional training in advanced gamedev with AS3 in London (or anywhere else it's wanted) this year. If you're interested in coming, please let me know so I can work out if it's worth doing. I'd also like to write a book on advanced gamedev, but I'm not sure if there's still a market for Flash books, and from what I understand it's a lot of work for not much reward (I found being tech reviewer for a book was pretty exhausting!)


I'm also involved with the Extended Play indie games meetup group in Plymouth. We get a great mix of lovely people coming along to talk, listen and show their games. There's going to be a bigger Extended Play festival down here in October, with proper visiting speakers, workshops etc, so I'll probably be trying to get you all down here after the summer! (or come sooner, there's great surfing). If you've ever thought about organising or attending an indie-dev meetup, do it, it's fun! The meetup has also introduced me to the guys from interactive studio Mutant Labs, who are not only freakishly talented, but also ruddy nice blokes. I've even some how convinced them to team up on a game with me in the near future (more info on that soon).

I'll be attending Game Camp in London in May - it's a 1-day unconference where lots of smart, friendly people will be talking to each other about games. There are still tickets left and they're only about £15! I would love to do Flash on the Beach again this year, but getting on the line-up is very competitive and organiser John is spoilt for choice with great speakers (so if you'd like to see me speak there, please let him know, he's @FOTB on twitter! hiiiiiint!)

Seb Lee-Delisle and I have also been doing The Creative Coding Podcast, where we talk about all types of creative development - games, game-like-things, visual programming, digital installations, experiments etc. It has been incredibly popular, and based on the great comments we get, it obviously fills some gap in the universe for hearing people talk about development from a creative perspective. Most episodes now have over 5000 downloads, which is a lot more people than read my blog or follow me on twitter, and I'm pretty sure it makes us one of the top developer podcasts.


I've probably burned through about 3 posts worth of content there - oh well! The next couple of blog posts from me will be the one announcing that Owl Spin has been released and a review of Away3D 3.6 Essentials, which the publisher has just sent me and I'm really looking forward to getting stuck in to. Let me know what you guys have been up to and where you're going next in the comments or on your own blogs if you got 'em. Thanks for reading!

Podcast Episode 4 - Flash Special (plus WebGL and Unity3D)



Flash is undead. It has been killed many times already - first by Ajax, then by Silverlight, then by web standards, then by Steve Jobs, then by HTML5 - and yet it moves! Watch in horror as this bloated, rotting zombie terrorizes the internet and Iain and Seb scramble to to find a cure before it is too late. Which is to say, go listen to the latest podcast.

Podcast Episode 2 - iOS, Android, Windows Phone 7 and more!



Me and Seb are back with another episode of The Creative Coding Podcast. This time it's a mobile devices special, with iOS, Android and Windows Phone 7 under the spotlight. For your aural pleasure: The Creative Coding Podcast - Episode 2. Enjoy!

Web games, HTML5 and Jangaroo on The Creative Coding Podcast



Me and Seb had nothing better to do at the weekend, so we had a chat about web games, HTML5 and Jangaroo, and we're releasing it as a podcast - hopefully the first of many to come! So here it is, The Creative Coding Podcast - Episode 1. Enjoy!

Cornwall Digital Meetup - Wednesday 20th October 2010


Another shout-out for people in Cornwall - do not miss the first meeting of Cornwall digital meetup group on Wednesday 20th October 2010 at Blue Bar in Porthtowan, details are at: http://www.meetup.com/Cornwall-Digital/

Flash on the Beach 2010 – This guy’s experience.


I’m writing this on the train home from Flash on the Beach. I should probably be coding a game like I did on the way to the conference, but I’m finding that after sensory overload from 3 days of sessions, a few late nights and the terror of doing two(!) sessions on stage, my brain is unable to do code right now.

My main session seemed to go very well, although I’m gutted for all the people who couldn’t get in because it was so packed. The demos from the session are already available at DullDudeGames.com/game-designer and I’m going to add a transcript of what I said and my slides very shortly. If you were an attendee there should be a video at some point, although I didn’t see any cameras so maybe it’s just a screen cast or something. It was my first full session at a big conference, and definitely an item ticked on my bucket list. I’m mega grateful to conference organiser John Davey for putting me up there, and Pokemon Trainer Seb-Lee Delisle for being my hype-man for the last 2 years. Without Seb, probably nobody would know who I am. He’s also a bloody ruddy nice bloke.


As happens at every talk I give (will they never learn!), some people asked me afterwards if I would share the source code from my talk. The demos are built on my work-in-progress game engine, so I can’t share the source to the games without also including the game-engine, which for business reasons I am not able to do, although a big chunk of it is already open-sourced in my Gamepad library.

The funny thing about geeks is, even when I do a session about design – purely the creative decision making side of games – geeks still just want to look under the hood! The main feedback was that people wanted to know the maths for the car handling physics, so I’m going to turn that into a tutorial and post that here on my blog. Also, if you’re more into the wizard stuff, I have the full source for a different Zelda-style wizard game that I made a while ago, that I am going to give away here too.

Slightly weirder was my last minute addition to the “jam throwdown” on the terrifying main stage. I was only asked to do it the night before, and had planned to show my complete greatest hits from the last 11 years of my work. Not having a chance to rehearse, I didn’t know that this was actually impossible, so what the attendees got was about the first 5 years, which was loads of terrible, daft lo-fi experimental Flash stuff and a few games. It seemed like people got the joke, but I did have a small bout of paranoia that everyone hated me straight after. Do not underestimate the social paranoia appearing at conferences can give you! I have had some nice feedback about the slot on twitter since though, so I feel ok about it now. People were probably just being nice, but thank you, I appreciate it!


(photo Copyright All rights reserved by oyvindnordhagen)

Even though I’m just a geek talking about geeky stuff, it’s really hard not to get a bit of a rush from making a whole auditorium of people laugh or go “oooh”. I wonder whether this is why people like Hoss Gifford and Brendan Dawes pack their sessions with jokes? I don’t think I got into speaking as a back door into stand-up comedy, but to be honest I have no idea why I did want to get into it. Certainly a large part of me finds the whole experience completely harrowing. What is “speaking” or being a “speaker”? Why do it? What is it for? I have genuinely no idea.

That’s enough about me though, what about all the talented speakers? Well it was a slightly strange one for me. For one thing, since last time I have become even more focussed on game development, and there wasn’t much representation for gamedev, so there weren’t many sessions that apply directly to what I do day-to-day. From the queue outside my talk and Jon Howard’s (excellent) session, there’s obviously a lot of pent-up demand for it among attendees. Maybe next year John could try to book some Flash gaming luminaries like Dan Cook or Adam Atatomic? I’ll definitely suggest it to him.

I want to word this next bit very carefully so that I don’t offend any of the amazing speakers who I saw and spoke to during the conference, and who are all some of the most talented and inspirational people you will meet in this industry. Here goes then: basically what I’ve noticed is that not every speaker can inspire you as much the second and third time you see as they do the first time you see them. Even though everyone updates their material regularly with new work, nobody has an unlimited supply of mind-blowingness. Ideas that are revolutionary when you first see them get synthesised into the way you see the world. The same idea can never inspire you again in the same way it did the first time. This is no reflection on the talent of the speaker, it’s just the nature of ideas.

And this is why I loved the elevator pitch so much. Twenty speakers from completely different disciplines blasting you with as much information as they can get into a 3 minute slot. I know from experience that each 3 minute speech has many hours, if not days and even weeks of preparation go into it. This shows through massively and you get exposed to more new ideas in this session than any other. Someone tweeted that speakers collect elevator pitchers like Pokemon. I kind of played Pokemon Trainer a bit this year, encouraging Andreas, Jasper and Tom to do the pitch. This reflects very well on how I choose my friends, because my Pokemon were easily 3 of the best in the whole session.

Andreas presented his DDConsole aka DoomsdayConsole which is a runtime tracing/hacking/debugging/tweaking console for Flash, inspired by the ones you find in games like Quake. It’s completely open source and completely ace. Through some wicked 8-bit graphics and animation, Tom presented his awesome sound effects generator AS3sfxr with such style that he also managed to subconsciously teach you how to do the creative side of sound design.

Jasper showed us all why Unity3D is the crown prince of 3D game engines by building his slide-deck as an Incpetion/Matrix inspired fly-through of a city falling into place. Nobody loves Unity as much as this guy. He’s thinking about it most the time. He’s probably thinking about it right now. What he didn’t tell you during his slot was that he taught himself to model in Maya just to make his presentation. And you’d never have noticed it, because his models looked awesome. I could tell that Jasper enjoyed the experience because I spoke to him after and he had a crazy look in his eye like someone who had just discovered crack. Anyways, if you went to the conference, please vote for these guys on your feedback form, they’re ace.


The stand-out session of the conference had to be Seb’s “What the flux?” There’s been a lot of mud thrown back and forth this year between Flash developers, HTML5/web standards advocates, and of course Apple, and Seb has spent a lot of time trying out these various competing technologies. He presented a some home truths that I don’t think everyone was ready to hear, but presented it a way that was optimistic, pragmatic and tried to build bridges. He had video interviews with some smart people from both camps, which he cut in with some political slogans, a game show skit and some jokes. I don’t actually agree with him that JavaScript and HTML5 are anywhere near ready to move into the immersive/experiential/flashy uses of Flash, but on everything else he was about right. He did point out that Flash is still the mofo daddy for web games.

Grant Skinner showed some cool physical device experiments like using Android phones as controllers for 8 player Asteroids and even as accelerator pedals for Scalextric. Also there was some marital aid hacking which raised a few eyebrows. In Grant’s session I began experimenting with starting rounds of applause, my first attempt failing and making it seem as if I was slow clapping, which was quite an amusing little moment that he dealt with like the pro he is. After that the audience really got into it, and through my further efforts I managed to increase the numbers of rounds of applause in all sessions I went to by at least a factor of 2 for the rest of the day. This is great for the atmosphere of the conference. If everyone is showing appreciation of a good speaker it actually increases the speaker’s confidence and makes for a better session. Towards the end of the conference I noticed an annoying trend that people were only clapping videos and not any other type of work that was shown. This is really silly and completely unfair on speakers who do different kinds of work, e.g. INTERACTIVE STUFF.

Other highlights were surrealist animator Cyriak Harris, design legend Stefan Sagmeister and designer/director Nando Costa who made this year’s amazing title sequence, which is frankly the sexiest form in which my name has ever been written. Watch it and see why. Nando showed some wicked film work he’d done with Modest Mouse (who I love) as well as other portfolio stuff. I chatted with Nando later about life in Portland and he’s a thoroughly nice bloke. I am now 1 degree of Kevin Bacon away from Modest Mouse which is a nice thought, although completely pointless.

I am completely exhausted now, so I’m going to get back to normality for the rest of the year, and take my Zero to Game Designer in 60 Minutes talk on the road in the new year. Thanks so much to everyone I met for being so supportive!

No Sleep Till Brighton


Ok, so. It's the week before Flash on the Beach 2010, which is my first full speaking engagement at a major conference, and I have a nice mix of excitement and dread. My talk, "Zero to Game Designer in 60 Minutes" is all written, and I've got 8 specially created interactive examples demonstrating different gameplay mechanics. Each demo has an avatar you can control, and a load of sliders and switches you can use to change variables and turn on and off different mechanics.

If you're coming along, and you bring your laptop, you can actually play along with the demos while I show them, which should make the session even more fun. And if you're not going, or you don't have a laptop, don't worry, because I'm going to put all the demos online from the minute my talk finishes.

See you in Brighton, or watch this space for the online release.

Introducing Gamepad.

Gamepad is a free, open source project by me, Iain Lobb, with the aim of greatly simplifying keyboard input for Flash games. The idea was born out of 2 realisations – first, that since key.isDown was removed from ActionScript it has been more work for game developers to handle keyboard input, and second – that developers, me included, were not working with keyboard input at a sufficient level of abstraction. Trust me, if you make Flash games, you need this in your life. Update: I've had some feedback that it's hard to see the download button on Github, so please CLICK HERE TO DOWNLOAD if you prefer.



What does it do?

Gamepad simulates an analog joystick input using the keyboard. Many times when we access key presses, what we are really doing is pretending that WASD, the arrow keys or some other combination are actually a D-pad or joystick with an X and Y axis, and 1 or 2 fire buttons. Gamepad handles the event capture, maths and other details of this for you, so you only have to think about how you want your game to respond to this input. A detailed explanation follows, but why not just download the source code and play around?



A simple example

First we create a gamepad. It needs a reference to the stage so it can capture keyboard events, and it needs to know whether it is simulating a circular movement space, like a thumb-stick, or a square one, like a flight-stick. This argument is called “isCircle” I’ll get into this distinction later.

var gamepad:Gamepad = new Gamepad(stage, false);

Then in your update / enterFrame function, you simply adjust to the position of your character based on the “x” and “y” values of your gamepad. The “x” and “y” values are always between -1 and 1, so x = -1 would be mean the virtual D-pad is pushed all the way to the left, and x = 1 would mean it would be pushed all the way to the right. I have chosen to use y = -1 as up and y = 1 as down, so that it matches Flash’s screen coordinate system.

character.x += gamepad.x * 5;
character.y += gamepad.y * 5;

And to access the fire buttons, we simply look at the “isDown” property of the “fire1” button.

if (gamepad.fire1.isDown) fire();

That’s it! Your character will now happily walk around the screen using the arrow keys and fire when you press the CTRL key. As Gamepad also has easing by default, the character will also accelerate and decelerate smoothly!

The “isCircle” property

A common mistake that developers make in top-down perspective games, is to allow the player to move too fast diagonally. They say “If the up key is pressed, move up 5 pixels, and if the left key is pressed, move left 5 pixels, so if both are pressed move up 5 pixels and left 5 pixels”. This is wrong! Pythagoras tells us that the speed of their character would now be the square root of five squared plus five squared, which is the square root of fifty, which is about seven. So now their character moves 5 pixels per frame horizontally or vertically, but 7 pixels per frame diagonally. Disaster. Once you know this you can handle it yourself, but Gamepad makes it easy by giving you the isCircle option on creation. When you create your gamepad, simply pass in true for the second argument:

var gamepad:Gamepad = new Gamepad(stage, true);

Now the “nub” of the virtual joystick is limited to a circular area, meaning if you hold the “down” and “right” key together, it will report values of roughly x=0.7 and y= 0.7, instead of x=1 and x=1, and movement speed will be equal in all directions. Typically you would use this option is arena shooters and Zelda-style adventure games, and you may want to use it in scrolling shmups, but that’s a greyer area in terms of “realism”, as your vehicle is already supposed to be moving at a high velocity.

The “ease” property

By default, gamepad will give you a nice easing motion. One advantage it brings is that the player can “tap” the keys to achieve the effect of a half press on an analog input such as the XBOX 360 thumb-stick. Often, though, you won’t actually want to use this. You can easily turn it off by passing in 0, or pass in some other value for more/less responsiveness. Typically you’ll want easing activated for simple games, but in more complex simulations you handle acceleration elsewhere, so you may want it deactivated. To deactivate easing:
var gamepad:Gamepad = new Gamepad(stage, false, 0);

The “autoStep” property.

Gamepad needs to update at the same rate as your game, so that the easing, and the “downTicks” and “upTicks” properties (which I’ll cover later) always keep in sync with your game. If you are simply using Event.ENTER_FRAME for your update, you don’t need to do anything, as this is the default. However, if you have some other system, you should pass in false for the autoStep property and manually call the public “step()” method every time you update.

I advocate using a frame-based tick, and using the “fix your timestep” methodology if you need to stay in sync with real time. This way your game is deterministic, you will have far fewer inconsistencies with collision detection, and you can safely use basic Euler calculations for acceleration. However, I understand that some developers, and some game engines, such as Flixel, use a deltaTime based approach. If you are using a time-based approach, you should use the “fix your timestep” principle with gamepad, by calling the “step()” function an appropriate number of times each update, based on how much time has passed since the user started the game.

The GamepadInput class.

Each Gamepad instance has a set of GamepadInput objects that represent individual “buttons” on a virtual joypad. These are up, down, left, right, fire1 and fire2. However, these do not map one-to-one with keys on the keyboard – one GamepadInput can be linked to one, two or more keys, so that you can easily provide simultaneous alternate control schemes. The classic example would be having both WASD and the arrow keys control your character, so that players can use whichever scheme they prefer without having to set any menu options.

For setting up keys, GamepadInput has the “mapKey” function. It takes two arguments: “keyCode” – an integer representing the key, for which you should use the constants in the handy “com.cheezeworld.utils.KeyCode” class - and “replaceAll” which specifies whether to overwrite existing mappings. If you want to have multiple keys mapped to the same input, pass in false.

In many cases, you will never need to call the “mapKey” function, as there are presets for the most popular configurations in the Gamepad class. These are the functions “useArrows”, “useWASD”, “useIJKL”, and “useZQSD” (which is for the French “AZERTY” keyboard layout, where WASD doesn’t work). All of these methods take a “replaceExisting” argument which specifies whether you want duplicate mappings, as discussed earlier.

Unfortunately, the keys developers use for fire buttons don’t seem to be as standardised, but I have done my best, by providing the methods: “useChevrons”, “useGH”, “useZX”, “useXY” (for German QWERTZ keyboard) and “useControlSpace”. These are all taken from popular Flash games, for example Nitrome’s “Double Edged” which handles 2 players by giving one player WASD for movement and GH for attacking, and the other player arrow keys for movement and chevrons, “<” and” >” for attacking. Gampad’s default: Arrow keys, CONTROL and SPACEBAR should be fairly safe for all players, but there are many, many issues around international keyboards, so it may be advisable to allow the player to set their own keys.

Once you have your inputs set up, you can get information about their state: “isDown” simply tells you if a key is being held down, “isPressed” tells you if a key was pressed this frame/tick/update, and should be used instead of listening for KEY_DOWN events, “isReleased” tells you if the key was released this frame/tick/update, and should be used instead of the KEY_UP event, and “upTicks” and “downTicks” tell you how long the key has been held or released for. Basically, “isDown” is your go-to, but the others are there when you need more info. Generally, you should use the x and y properties of Gamepad for movement, but sometimes you may want to access the D-pad as “buttons” instead, for example using “up” for jump.

The GamepadMulitInput class.

There are also a further set of “buttons” represented by GamePadMultiInput objects. These are special as they aggregate the inputs of multiple other “buttons”. These are “upLeft”, “downLeft”, “upRight” and “downRight”, which let you treat these combined directions as if they were individual inputs on an 8-way controller, and “anyDirection”, which lets you know whether the player is pressing in any direction on the D-pad.

The angle, rotation and magnitude properties.

You may need these additional properties from time to time: “angle” gives you the direction in which the stick is pointed as radians, “rotation” is the same value but expressed in degrees and “magnitude” is the scalar distance of the “nub” from the origin, ignoring the angle. For example, if you set the rotation of a character MovieClip to negative the rotation property of your gamepad, your character will face in the right direction when they move!

The GamepadView class

If you want to visually see what your gamepad is doing, simply create an instance of the handy GamepadView class, and initialise it with a reference to your gamepad and optionally a colour.

var gamepadView:GamepadView = new GamepadView();
gamepadView.init(gamepad, 0xFF6600);
addChild(gamepadView);

GamePadTester and PlatformGamePadTester

In with the source code, you will find two visual “tester” classes. It’s not quite test-driven development, but these are the classes I use to ensure all the functionality of Gamepad is working – they’re also great documentation for Gamepad’s APIs, or could even be the starting point for your own game! If you’re using the Flash IDE simply open GamepadTester.fla or PlatformGamePadTester.fla and publish. If you’re using the Flex compiler you’ll need to create a new project and set the “always compile” / document class to com.iainlobb.gamepadtesters.GamePadTester.as or com.iainlobb.gamepadtesters.PlatformGamePadTester.as.

GamePadTester shows the basics of doing car-style movement and top-down character movement. It also demonstrates duplicate controls, with both WASD and IJKL controlling the character. PlatformGamePadTester shows the basics of a two player platform game, including variable height jumps (although in the end it transpired that these are mostly handled outside of the gamepad class). It also shows how you can create two instances of the same character class with different control schemes, without a single “if” statement or use of polymorphism. Composition FTW!



Final thoughts

Well done, you have made it through all the Gamepad documentation! Please start using it and submit feedback to my blog, or on github. I’ve had versions of this class kicking around for almost 2 years, but I had no idea how much work it would be to actually pull it all together, test and document it to a state where I was happy to release it as an open source project. I have insane new levels of respect for anyone else out there running an open source library. The license is MIT, which basically means you can do whatever you like with it, as long as you don’t blame me when it goes wrong. I’d appreciate it if you didn’t change the package names, and removing the copyright notice is forbidden. There’s a sweet gamepad logo that you can add to your game if you like, but it’s by no means compulsorily, and if you want to hit up the donate button on github, I’m not going to stop you. Enjoy!

Oh yeah, follow me on twitter: http://twitter.com/iainlobb

Game Developers Radio podcast - Flash game design special (with me!)

I was recently on a special 2 hour edition of The Game Developers Radio podcast with host Joseph Burchett, Ryan Henson Creighton of Untold Entertainment, Daniel Cook of Lost Garden and indie developer Edmund McMillen. It was a great laugh to record and has some great pointers about making Flash games too - I learnt a lot recording it, hope you get just as much from listening, so listen here.

Video of my talk from Flash On The Beach

As I blogged previously, I gave a 3 minute "elevator pitch" at Flash on The Beach this year. I've already posted my notes and slides, and now for your viewing pleasure, here is the video:


FOTB09 - Elevator Pitch - Iain Lobb from John Davey on Vimeo.


You can see more elevator pitches and some other great talks by the likes of Grant Skinner and Mario Klingemann at:


A 3 minute lesson in game design (my talk from Flash on the Beach 09)



Update: You can now watch the video here.

I'm back from Flash on the Beach in Brighton. There are loads of great write-ups of the conference coming out, so you don't need another from me, but here are my slides and notes from my 3 minute "elevator pitch". While I'm writing I will just say it was great to meet all my fellow pitchers, and I think we gave a rockin' session - in the main theatre no less, so probably about 600(?) people saw it. Here's my slides (click on slide to advance):



Here's what I said:

I'm Iain, I make Flash games. Here are my tips for making Flash games, but hopefully you can apply them to whatever it is you do.

Make it fun.
  • When you're making games it's easy to get side-tracked by your awesome code framework or particle effect or whatever,
  • but if you don't make a fun experience for players, what's the point?

Make it obvious.
  • If you need to have an instructions screen on your game, you've already kinda failed.
  • Talk to your players through the language of games.
  • When you get the power-pill in PacMan, the ghosts go blue, their mouths go wobbly, they start running away.
  • The player thinks – ah that's different, maybe I can eat ghosts now – ah yes I can. No instructions necessary.
You've got 10 seconds to sell your game.
  • Players browse web games like they're flipping channels on cable TV.
  • If they're on a site like Kongregate they've got the choice of 18 thousand games.
  • So forget all the cut-scenes, menus and tutorials, get straight in to the action.
Match your control scheme to your audience.
  • Try not to mix mouse and keys. Pick one.
  • If you're making a casual puzzle game, just use the mouse.
  • If it's a platform game, stick to just arrow keys and spacebar.
  • Only if you're going for a pretty hardcore audience is it safe to use mouse and keys together.
Evolve your game.
  • I've worked on far too many projects that had months of planning, emails to clients, design documents, wire frames, PhotoShop mock-ups.
  • Not until two weeks before the deadline, you actually start developing.
  • The day before the deadline you finally finish it and play it through. Is it fun? No. But it's too late change it.
  • So throughout the process, make prototypes, iterate.
Stick a face on it.
  • There aren't many games that can survive without characters,
  • so even if you're making an abstract physics puzzle, you should be thinking about how you can make it feel human and approachable.
Playtest!
  • While there's still time to make changes, put your game in front of real players.
  • If you think you've got intuitive controls, players will be mashing the keyboard going “what do I do”?
  • If you think it's too easy, to a new player it's probably impossibly hard.
Respect the medium.
  • Don't just make games with Flash, make games for Flash.
  • Flash games have there own genres, like physics puzzles and tower defence that have evolved to suit the medium.
  • Don't copy other games, but work out what makes them fun.

Please help me give away my source code!

I have loads of great ActionScript snippets that I want to share with the Flash community. Unfortunately I cannot get code to appear in any decent way on Blogger. If anyone can help me get the cool snippet window which everyone else seems to have on wordpress to work on my blogger account, that would be sweet, and I will shower you all with great code. (well not that great, I wrote it).

Post answers and links in the comments PLLLLEEEEEEEEEEASE.

Help me Flash RSS junkies, you're my only hope.

UPDATE:
Here is a test of using http://formatmysourcecode.blogspot.com

public static function formatTime(seconds:int):String
{
seconds %= 86400;
var hours:int = seconds / 3600;
var minutes:int = (seconds / 60) - (hours*60);
var secs:int = seconds - (hours*3600) - (minutes * 60);
var timeString:String = ((hours<10)? "0"+hours : hours)+":"+((minutes<10)? "0"+minutes : minutes)+":"+((secs<10)? "0"+secs : secs);
return timeString;
}

I'm now available for freelance Flash work



It's a new career direction for me - from next week I will no longer be with Bloc and will be available for freelance Flash work, so if you've seen what I do and would be interested in working with me, please feel free to give me a shout at iainlobb[at]googlemail[dot]com

I've had a brilliant 4.5 years at Bloc, but I'm excited about getting out there and working with some new people, and maybe even fitting in some of my original gaming ideas too. Wish me luck everyone!

I've done a quick relaunch of iainlobb.com, to show some of my favourite projects while I work on a more creative portfolio site. Ooh, also I'm on linkedin now, so if we've met you can look me up on there too - http://www.linkedin.com/in/iainlobb

Designing and developing multi-user Flash games - my session at FlashBrighton on Tuesday (13th January 2009)



Seb of FlashBrighton / PaperVision / Plug-in Media fame has very kindly invited me to talk at the FlashBrighton user group, so I will be pontificating on multi-player games (like Zwok, above, the game I developed for Bloc/Sony) on Tuesday. Here's the details:

Iain will tell you everything you need know to start creating multi-user Flash games: from a humble high-scores screen to real-time game-play and persistent worlds. He'll show you design and development lessons learned from real-world projects. Specific topics will include:


  • Choosing a server platform;

  • Sign-up and log-in;

  • Community and chat;

  • Game lobbies and match making;

  • Turn-based vs. realtime gameplay; and;

  • A look at which kinds of games are most suitable for multi-user play.
Tuesday January 13, 2009 at 7:00pm
The Werks
45 Church Road
Hove, England BN3 2BE

Check out the upcoming page for more info.

Biography

Iain Lobb

Hello, I'm Iain. I've set up this blog so I can tell you what I know about designing and developing games with Adobe Flash. Here are my career highlights:

Companies

In January 2009 I embarked on a career as a freelance Flash developer. Before this I was the Head of Interactive at Bloc, an award-winning digital studio. During my time at Bloc I co-created some of the best-loved games on the web, including ZW0K!, Stackopolis and Pop Pirates and Meta4orce. Before joining Bloc in 2004 I worked on factual broadcast television for TwoFour, including several programmes for BBC1 and Channel 4. Before that I was a Flash-focussed designer/developer at specialmoves where I worked on many great interactive projects, including The Osbournes' award-winning site.

In print

My work has been featured in a few magazines, including Creative Review, Computer Arts, Computer Arts Projects, .net and The Daily Mail, and in two books: Web Design Studios 2 and Web Design: Music Sites, both published by Taschen. I've also been interviewed in .net magazine.

On the net

Projects I developed have been featured on a number of high profile sites including Kotaku, Jay is Games and theFWA, and I've worked on multiple projects which have made the digg.com front page.

Awards

My work has won awards from BIMA, theFWA, Cannes Lions, Webby, IMA, MiniClip, Kongregate and NewGrounds and received nominations from BAFTA.

Education

In 2003 I graduated with First Class Honours from the highly respected MediaLab Arts BSc at the University of Plymouth. I also have A-Levels in English, Maths, Physics and Photography.

Speaking about Flash and/or games

This is something I'm quite new to but really enjoy - so far I've given talks at the London Flash Platform User Group, FlashBrighton and Brunel University. If you'd like me to talk at your Flash or games related event, conference or user group, just drop a mail to iainlobb[at]googlemail[dot]com and I'll see what I can do!

Community
I try to stay involved with the UK Flash community, and you're likely to bump into me at LFPUG, Flash on the Beach and Poker Coder events - on the final table of course ;) I have also created NO JOY? - an informal campaign to get joystick support into Flash.

no joy