Thursday, 18 October 2012

Create a Simple Asteroids Game Using Component-Based Entities


I recently wrote a tutorial for GameDevTuts+ where I show how to set up an entity composition system in ActionScript3 and use it to create a simple asteroids-style game. If that gets you excited, go read it!

Part 1: Avoiding the Blob Antipattern: A Pragmatic Approach to Entity Composition

Part 2: Create a Simple Asteroids Game Using Component-Based Entities

Full source on Github

Tuesday, 18 September 2012

Dungeon of Math - an Adventure Time game we made in 48 hours


Me and Amanda made this game over the weekend for the Fantastic Arcade Game Making Frenzy Adventure Time Game Jam (wow, that's a mouthful!). Enjoy: http://www.adventuretimegamejam.com/submissions/69-dungeon-of-math

Friday, 22 June 2012

Mochi London 2012 - Come meet me!

I spoke at Mochi London last year, and I'm pleased to say I'll be back this year with a brand new talk (all about the making of Super Gun Kids). The main conference is on Saturday 15th September 2012 at King's College London, which is a great space, and it's completely FREE! Come meet the UK Flash game developer community!

http://mochilondon2012-estw.eventbrite.com/

Thursday, 31 May 2012

Super Gun Kids: Progress Report



About two years ago, I decided that I want to gradually transition from being a freelance Flash dev to being an indie games dev – a full time one, if possible. I can now assure you, friends,  it’s not as easy as it looks! After a couple of false starts, I’m finally working full time on my own game, with a pretty healthy timescale and high spirits. But jeez Louise, it’s scary. Seriously, it take takes stones of steel! Here’s my progress...

Firstly, where’s Alice?


I spent a big chunk of November and December working on a prototype for Alice: Beyond The Looking Glass, which is a linear puzzle-platformer adventure. I came up with some cool stuff technologically, developing a 2D bones animation system, and getting Flash to do 1080p resolution at 30fps without hardware acceleration, which wasn’t easy. But as Xmas approached, I started to have doubts about the project. I think the theme, setting and gameplay were totally wrong for the Flash portals I was developing for. Despite my best efforts, without hardware acceleration I could never quite get the visual smoothness and impact I was going for. And even though I love Amanda’s character designs, I started to have doubts about the monochrome visual style we were doing. I lost my mojo, man. Fudge!



I put Alice on ice, and took a freelance contract in London, returning with my mojo restored (and some money). So I came back to do Super Gun Kids, the platform-shooter-RPG I’ve had planned since finishing Owl Spin, when I vowed to give all future games MOAR GUNS. Alice isn’t dead – Amanda is going to rethink the visual style and I’m going to move the code over to HaxeNME so I can get the smooth HD visuals I was aiming for, and make it a cross-platform downloadable game. But anyway, that’s the future (hopefully not too distant) – the present is all about kids with guns. I was able to merge most of the engine development work I did on Alice into SGK, so it wasn’t totally wasted effort, thank Zeus. I’ve still only spent less than 3 months on Super Gun Kids, which in indie game terms is the blink of an eye (games like Fez and Braid had incubation/dev periods spanning many years, not that I’m comparing my little Flash game to those juggernauts). But still, staying motivated for many months, working on your own, is challenging. That’s why I made this Spotify playlist of motivational 80s movie montage music! Glob knows how people keep motivated for multiple years on one game. Knowing you have funding must help a lot. I’d recommend you have 6 months to 1 year’s living/business expenses saved before embarking on a full time indie project. I didn’t, but you should!

Animation


My bones animation system parses MovieClip timelines and stores the position and rotation of each body part in an array. I can then play this animation back at different speeds, and even merge multiple animations. This way I can have a single skeleton for each character that can be styled in any way and perform any action animation. Unlike most of the game, this feature is finished and it works. Anatomical!



Styling


A big part of the SGK gameplay is levelling, upgrading and customising your character, so I’ve put a lot of work into the inventory system. Player characters have a base naked body with a choice of boy/girl, five different skin tones and loads of different faces. On top of this sit their clothes and weapons. This also makes it very easy to make humanoid enemies, so expect a lot of them. So far I have zombies working, and they’re quite amusing.





2 Player


Super Gun Kids will be fully playable in 2 player local co-op mode. As far as possible I’ve tried to make it so that the two players are equal in how the game treats them, but I've had to make a couple of compromises. The main issue is that I've had to address is what to do if the players walk away from each other so that they end up of opposite sides of the screen/level. To allow some freedom to do this, I zoom the camera out, but I can’t keep zooming out til the characters look like ants, so when the players reach a certain distance apart, I have to teleport player 2 back to the position of player 1. It works pretty well, and for fairness you can swap which player is “player 1” at any time. Easy as childbirth. As full-screen mode doesn't support the full keyboard in the version of Flash I’m using, you won’t be able to play full-screen co-op in the browser. I know this sucks massively, and I’m probably going to do some kind of downloadable version (with AIR) in the future where this feature works. I need to make sure when I negotiate with sponsors that I leave this avenue open. I wouldn’t expect to make any real money from it, but it would be nice to know that  a “definitive” version of the game exists somewhere. The same goes for joypad support.


Pathfinding


Many platform games have really dumb enemies that can’t do much more than stand in one place shooting, or patrol left and right. Sometimes you want this, but sometimes it would be cool to have enemies that can chase you, no matter where you go. Par exemple, SGK has ninjas. Do you think a ninja is going to walk back and forth while you bound overhead across platforms? No, she’s going to race right up those platforms and slit your throat! By defining a web of nodes and connections in the level editor (I’m just using Flash CS5 as the level editor), enemies in SGK can have a good understanding of the terrain. Combined with AStar pathfinding, they know how to get from any point in the level to anywhere else, or they can freely wander the level, looking for targets (you). I’ve also implemented traditional patrol routes, so I think I’ve covered all the bases. Zing!


Weapons


I’m most of the way there with the weapons system now. I’m aiming to have about 30 weapons, I wasn’t sure at first whether to go with the Super Crate Box idea, that each weapon is like a unique character, or the more standard RPG approach of dozens of weapons each just slightly different. In the end it’s probably somewhere in-between. I have the first 15 or so weapons finished and balanced pretty well against zombies. It was useful to think about weapons in terms of how many shots it would take to down a zombie. So if I want the double-barrel shotgun to kill in 1 shot, then working backwards a normal shotgun can be 2 shots, the magnum in 3 shots, normal pistol in 4 shots, and baseball bat in 5. That feels about right. To keep the ammo system manageable, I’m trying to stick to 5 basic types: bullets, shotgun shells, explosives, gasoline and batteries. Explosives will power all the things that go boom including mines, rockets and grenades. Batteries are for the energy weapons. Gas is for the chainsaw and flamethrower. Bullets and shells should be obvious. I also have the shop basically finished now. After lots of deliberation, I decided in the end that you can sell weapons without penalty. I think this will encourage experimentation with different weapon combos, and hopefully keep the lower-powered weapons in rotation for a bit longer. Enemies’ random loot drops can include any of the ammo types, so I’m hoping the best strategy will be to keep at least one weapon for each type, rather than just using your favourite weapon through the whole game.


Sound


I’ve sourced all the music for the game and I’m really happy with it. For future games I’d like to work with a composer to get an original score, but for this game I’m happy with what I have lined up. I have songs! I’ve rewritten my sound player class to make it more usable, and I’m going to open source it (in fact if you can’t wait, here it is) because I hate the stupid hoops AS3 makes you jump through just to play sounds and set their volume. Sourcing sound effects is a really laborious process, involving trawling literally thousands of sounds on SoundRangers.com and xxxxxx, but I’m hoping to get a chunk of it done this week.

Violence


Something I’ve had to think a lot about is the level of violence in the game. Even though it’s a game about guns, my inner-Nintendo wants to keep the violence cartoonish and minimal. Crazy, huh!? Anyways, I found that I need to have a few impact splats to “sell” the effect of getting shot, but as a compromise, I’ve made it pink rather than red, so it’s “life force” rather than blood.

Level design


I must admit, I don’t have a lot of this done yet, other than a couple of ideas on trusty graph paper, but I can reveal the game has 3 locations to explore – city, haunted house and factory. Standard tropes all the way for this game! What did you expect, originality? Amanda is doing the background parallax layers for each level, which should look ace. To be honest, level design is the bit I’m least comfortable with, but I’m hoping by the end of this project I’ll have learned to love it.


Logo and box art

Thanks to Amanda, SGK now has a great logo and wicked “box art” which will also be the intro to the game. Amanda has also designed the map screen, which I was originally going to do with vectors, but looks so much better with her digital painting jazz.

It’s all fun and games until I run out of money

So that’s Super Gun Kids for now. I’m busting my bones to try and get the game finished before we run out of money to live on. Frugality is one of the greatest virtues of an independent developer. We’ve swapped driving and shopping at Sainsbury’s for riding our bikes and shopping at Aldi, and already massively reduced our overheads. I hope to launch the game across Flash portals at some point in the summer. If it’s a success I’ll no doubt return for endless sequels. If it’s a failure, well I tried my best and I’ll just come back with something else (whilst weeping into my pillow). This project has made me find out a lot about myself and the kind of games I want to make, and I’ve really come to realise that performance of the software renderer in Flash is really out of scale with the things I want to do. I’d love to follow up Super Gun Kids with a HaxeNME or Stage3D driven sequel, but another important indie lesson: do one project at a time... and finish it!

Bye now!

Iain

Thursday, 23 February 2012

Help me make this Canvas benchmark faster

I'm doing another round of benchmarks at the moment. This new one is called PirateMark. It tests how many big rotating sprites can run on a particular engine/platform at 960x720 resolution, at 60fps. So far it's not looking very promising for HTML5 canvas - I can't get 60fps even with just 1 sprite, and at 30fps I can only get 10 sprites going. But as you may know, I'm not really a canvas/javascript expert, so maybe you can help. JavaScripters - I am laying down the gauntlet! Make this faster! Please leave suggestions and links to your own version in the comments. Because there's no native sprites with rotation in canvas, the code uses a light framework I wrote at Seb's creative JS course. It may be that I'm doing it hopelessly wrong.

Tuesday, 21 February 2012

Celebrating 20 Episodes of The Creative Coding Podcast



Last January, me and Seb Lee-Delisle had an idea to record our Skype chats, and launched The Creative Coding Podcast. Here we are just over a year later, and we've got 20 episodes! We've had an amazing year, been nominated for a .net magazine award for best podcast, had 18 world-class guests and been downloaded almost 200,000 times! Please enjoy the latest episode or have a browse through the archives for something that takes your fancy.

Episode 1 – Web games, HTML5 and Jangaroo
Episode 2 – Mobile Devices Special
Episode 3 – Molehill and Processing with Jer Thorp
Episode 4 – Flash Special (plus WebGL and Unity3D)
Episode 5 – Game Design and Conference Etiquette with Ryan Henson Creighton
Episode 6 – openFrameworks, Adobe CS5.5 and multi-touch gaming
Episode 7 – openFrameworks and Open Source with Pete Hellicar and Joel Gethin Lewis
Episode 8 – Rome, Chrome and Angry Birds
Episode 9 – Processing and Cinder with Robert Hodgin (Flight404)
Episode 10 – Teaching Game Development, Stencyl and New York
Episode 11 – Eyeo Festival with Golan Levin and Ben Fry
Episode 12 – Art from code with Casey Reas and Marius Watz
Episode 13 – JavaScript, Corona and Seb’s jumbotron
Episode 14 – Live from Flash on the Beach! With Lee Brimelow, John Davey and Keith Peters
Episode 15 – Unity3D with Aras Pranckevičius
Episode 16 – Flashageddon with Stacey Mulcahy
Episode 17 – coding a platform game, haXe NME and Big Spaceship’s Joshua Hirsh
Episode 18 – How to teach programming, with Daniel Shiffman
Episode 19 – Trolling, jQuery and Open Frameworks with Joshua Noble
Episode 20 – CSS Special with Val Head

Monday, 13 February 2012

I'm speaking at Flash Gaming Summit in San Francisco



If you're in San Francisco on March 4th 2012 for GDC (or any other reason) you can come along to Flash Gaming Summit and hear a brand new talk from me called "Two Dimensions of Awesome", where I'll be presenting the research and development work I've been doing for Super Gun Kids and Alice: Beyond the Looking Glass. Drop me a tweet if you want to grab a coffee!

Here's the sessions description:


Two Dimensions of Awesome - Advanced ActionScript for Platform Games

Stunning console games Limbo and Rayman Origins have shown a glimpse of what is possible in two dimensions. It is my goal to take 2D Flash games beyond the retro pixelated aesthetics of Flixel and create rich immersive worlds closer to the state of the art found on games consoles. In this session I will present my research into advanced 2D game development, including: •Collision detection beyond tile-based maps - irregular shaped terrain. •Using Flash Professional as an advanced level editor. •Moving from sprite sheet animations to dynamic bones animation. •Managing screens, input and audio with better APIs. •Tweaking game variables at runtime. •Creating an immersive 2D camera with parallax scrolling. •Striving for 60fps with Starling and haXe NME.

Thursday, 6 October 2011

What I learned on Seb's creative JavaScript course



A few weeks ago I went along to Seb Lee-Delisle's Creative JavaScript course in Brighton. Don't worry, I'm not thinking about moving away from Flash - I just wanted to see 1st hand what was possible with the new HTML5 canvas capabilities and the JavaScript language, and prepare a bit for my new part-time job as associate lecturer at Plymouth University (where I give an introduction to web technologies). Here are my take-aways:

  • Pretty much all the stuff that first got me into Director/Flash, you can now do with canvas (although Flash has gained many new abilities since then). All the old demos like generative trees and particle effects are still really fun to play around with. A lot of this stuff is completely new to JavaScript devs, so I think it's a great thing that so many of them are going along to Seb's courses. The favourite effect I made was jelly asteroids (left it a bit broken unfortunately).
  • I'm not giving up Flash anytime soon. I've been learning some JQuery and think that's a lot of fun, and a great solution for image galleries etc, and I also think canvas has many good use cases, but for web games I think Flash is still the way to go. Canvas rendering speed (e.g. for rotating bitmaps) and the lack of decent audio support are probably biggest issues at the moment, but I expect both of those to be resolved fairly soon.

  • JavaScript hasn't got any better, but my skill as a programmer has, so I now write much better JS than I did when I last did any significant work with it (8 years ago?!). There are now also commonly accepted "patterns" for working in a semi-object oriented way (or you can also use a 3rd party framework like prototype). Overall I quite like JavaScript, especially the fact that you don't have to give a type to your variables - it makes the code very concise and readable.

  • Without static typing you obviously miss out on some tooling and debugging abilities, but having a good IDE helps a lot. Jetbrains have a couple of IDEs that do a really good job for auto completion etc, but for ease of use I actually preferred using Netbeans (download the PHP version) which also has the advantage of being free. Dreamweaver also did a pretty good job. Any of those options is way better than just typing into Notepad. 

  • The web developer tools in Chrome are amazingly awesome - hit CTRL-SHIFT-J on PC to access them.
  • Seb is an awesome teacher. I'm teaching a bit at the moment myself - 1 day a week to 1st year university students and 1 evening a week to people learning gamedev as a hobby. I'm improving (I hope) but I still get pretty nervous, and probably seem pretty flustered at times. Seb remains cool as a cucumber throughout. Gotta work out how he does that!

  • I know there are already many other (better, more complete) frameworks out there, but I had a go at building my own mini-framework for canvas, with a base "class" for sprites/game objects and a base "class" for games. View a demo / steal it here.






Friday, 2 September 2011

Learn Flash Games Development in Cornwall


A few months ago I had the crazy idea that it might be fun to teach an evening course about Flash games, here in Cornwall. Thanks to the awesome people at Truro college, it's happening - and it's starting just 2 weeks from now, on Tuesday the 20th of September 2011. The really great part is that thanks to the magic of government subsidies, the whole 10 week course is just £75 . What, £75 for the whole thing? That's AMAZING VALUE!!! So if you live in Cornwall (or Devon) and want to learn some ActionScript3 programming to make your own computer games - go sign-up.

Monday, 22 August 2011

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!

Friday, 5 August 2011

The Flash community needs a complete reboot

This is a cross-post from my Google Plus account. Join in the original discussion on there.

The Flash community needs a complete reboot. From Seb Lee-Delisle to Keith Peters to Jesse Freeman to Ricardo Cabello (mrdoob) many of the most well know Flash developers have either branched out to new technologies, or abandoned Flash completely. While I wish these guys all the best, this obviously has quite a negative effect on the Flash community. For young developers looking on, it must surely seem that Flash is dying, and anyone with any sense is jumping ship for the gold-paved streets of iOS or HTML5. And at the same time, the link-baiting tech tabloids are publishing more and more negative stories about the "obsolete" technology Flash, largely unchallenged by Adobe's former poster boys. Flash is surely dying.

But of course this isn't true. For many applications, such as casual/social games, media players and online advertising, Flash is still the dominant force. And the good news for Adobe is that new talent is entering the Flash world all the time. There has never been a better time to start-up as a game developer, and Flash can claim many of the hottest developers such as Zynga, Vlambeer and Bezerk Studios amongst its users. And while WebGL is having its moment in the sun right now, the bigger reach of Flash Stage3D will surely steal the browser 3D crown when Flash Player 11 is finally released.

What can Adobe do to fix the perception problem? Well for a start they need to reach out and embrace the new generation of Flash users. Why aren't framework developers like Adam (Atomic) Saltsman or Chevy Ray Johnston invited to talk at MAX? They are doing way more for Flash than an old guard who have clearly lost the faith.

The other thing Adobe need to do is start supporting the amazing open-source Flash community with some hard cash. Flash Develop, Away3D, Box2D, TweenMax, Flixel, FlashPunk and many more fine projects all deserve some financial support from the mothership. The Flash open-source community is strong, but how much more could it achieve with the resources it deserves?

Wednesday, 29 June 2011

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!

Monday, 13 June 2011

Contribute a character texture to a free indie game!


Contribute a character texture to a free indie game! Explay's Dan Stubbs needs 100 textures for his game "Go! Commando Go!". The textures are pretty simple so even a 2D artist should find it easy. Click the download below.

http://dl.dropbox.com/u/3542646/Go%21Commando%21Go%21%20Texture.png

Send completed images to: http://twitter.com/#!/dan_stubbs

More info on the Explay Facebook group: http://www.facebook.com/home.php?sk=group_148159575222493&id=209145229123927

Friday, 10 June 2011

Flash game development book ideas

I've been mulling over the idea of writing some kind of book or eBook in the future. Rather than being a set of example games like most Flash games books seem to be, it would arm you with the techniques to create your own games, so when you are stuck on a specific topic it is quick to look up.

The book would be almost completely source-code based (with plenty of comments). There would be almost no "waffle" sections of description. It would be more of a look-up (or copy-paste!) technique reference than a traditional "blah-blah-blah" book. Due to this format I think it would be better as an ebook than a dead-tree book. What do you guys think about that?

Anyway, here are my topic ideas. Could you please let me know if there's anything that should or shouldn't be in there?

Input
- Keyboard input and control (from scratch and using Gamepad library)
- Mouse input and control

View
- Top down (+2D Camera)
- Side-on (+parallax)
- Zelda style (+Depth sorting)
- 3D third person (using Away3D)
- 3D first person (using Away3D)
- Mini-map / radar

Rendering
- Blitting
- Using DisplayObjects efficiently

Maths
- Useful maths
- Vector maths

Security
- Site-locking a game

Game engine
- Time steps (basic, deltaTime, fix your timestep)
- Game loop (and pausing)
- Entity systems (inheritance-based, and component-based)
- Object pooling

Collision detection and Reaction
- Circle-circle
- Square-square
- Square-circle
- Line-line
- Line-square
- Line-circle
- Separating axis
- Using hitTestPoint
- Using bitmapdata getPixel
- Using bitmapdata hitTest
- Collision reaction for platform games (player and projectile)
- Collision reaction for top-down games (player and projectile)

Physics
- Top-down car physics
- Platform physics
- Projectile physics
- Using a 3rd party physics engine (Nape)

Environments
- Tile-based techniques
- Using Flash as a level editor - parsing etc
- Creating an in-game level-editor.
- Procedural level generation

Animation
- Bones animation
- MovieClip animations
- Creating your own simple tweening system (+ easing, springs)
- Using a 3rd party tweening engine in-game (TweenMax)
- Sprites sheet / image sequence animations

Audio
- Creating a reusable sound manager
- playing sounds and music
- mute button / volume controls

Gameplay
- Scoring, achievements and saving your game.
- RPG characters - inventory, stats, health, buffs/debuffs.
- Weapon management

User Interface
- HUD
- level select menu
- Main menu
- Shop

Thursday, 2 June 2011

Away3D 3.6 Essentials – Book Review

Ok, so here’s a book I definitely can recommend! ;-) Away3D 3.6 Essentials by Matthew Casperson (published by Packt) is a really great introduction to creating 3D content in Flash with the free and open source Away3D library.



For a brief time in the summer of 2008 I was the golden-boy of Flash 3D after my team at Bloc launched the Papervision-powered game/transmedia experiential play-node called Meta4orce, which I documented to launch my new blog. While my experience and high google ranking for the term “papervision developer” (#2 – boom!) earned me a couple more PV3D gigs, it all tailed off by the end of 2009. The fact that the Papervision3D team pretty-much abandoned development and moved on to new projects didn’t help, but there was also a sense that the novelty of 3D Flash content was wearing off (especially with such jaw-dropping competition as Unity3D’s island demo).

But 3D Flash content was not in fact dead, and the Away3D engine very ably filled the gap left by the demise of Papervision. I never kept up with developments in the Away3D world, so this book was a great re-introduction. So what I have I learned? Well one nice thing to see is that many of the techniques I had to manually create in my Papervision3D work are actually integrated into the Away3D engine itself. This includes things like:
  • level-of-detail (LOD) model-swapping, so that when objects are far away they use a simpler mesh.
  • flat sprites and multi-directional sprites like you see in Doom and Duke Nukem 3D.
  • splitting objects into individual layers and display objects, to solve triangle-sorting issues when a model sits on top of the ground.
  • skyboxes.
  • isometric camera.
  • depth of field effects using sequences of sprites at different levels of blur.
Matthew’s book gives a good explanation of the theory behind these techniques (and many more – the book is incredibly thorough and comprehensive), as well as how to apply them using Away3D. I also learned a bit of general 3D theory about things like UV mapping, triangle Z-sorting and effects like normal mapping and bump mapping. On the whole, though, this book is very much a practical manual of how to use each of Away3D’s features. If I have any criticism, it is that there’s not too much there that you couldn’t get through scouring the documentation and source code, and it doesn’t ever pulled together all the strands to make one amazing demo at the end. That’s up you to go off and do yourself I guess. One really nice addition is that this book does document Away3D’s bugs and offers work-arounds, which could well prevent you from pulling your hair out a few times.

Reading Away3D 3.6 Essentials has really re-opened my interest in Flash 3D, and I think I’m going to do a few experiments with Away3D in its current form, so that when the hardware accelerated magic of Stage3D and Away3D v4 hit Flash, I’m not playing catch-up.

Tuesday, 31 May 2011

Flash Game Development by Example – Book Review

Tech publishers Packt have sent me a copy of Flash Game Development by Example by Emanuele Feronato, to review. Packt seem like a really awesome publisher – I love the short, punchy format of their books and their twitter account @PacktExplorer is single-handedly bringing the tech publishing industry into the social media age (honestly, they’re definitely worth following). I’m currently also working my way through their book Away 3.6 Essentials by Matthew Casperson, which is excellent and will be getting a full review on this blog shortly. For reasons that will become apparent however, I was able to get this review of Emanuele’s book out a bit more quickly...

Unfortunately, this isn’t really a book that I can recommend. Emanuele Feronato is a legend in the Flash blogging scene, tirelessly giving away tutorial after tutorial, covering everything from Box2D to Flashpunk. These tutorials are great for beginners who don’t know where to start with a new technique or library, or are new to Flash. I think Emanuele does a great service to the Flash community and I hope he doesn't take this review too badly if he reads it. As Emanuele gets a lot of content out very quickly, the quality and style of this code can be quite quick-and-dirty. There’s not a lot of object-oriented code or best practices in evidence. Now this is fine for a free tutorial (what do you expect for free?!), but once you stick a £28 price tag on something, I think it must be held to a higher standard.

While it gets the job done, the code in this book is quite messy and throw-away. I really feel the technical reviewers dropped the ball here. I was a tech reviewer on a book myself last year, and I really came down hard on the authors coding style, getting them to rewrite many of their variable names to be more descriptive and enforce some standard Flash coding conventions. We all write weird looking code sometimes, but I think a book needs to set a better example. Here are some basic style conventions the book should have used, but doesn't:

  • Variable and function names are made up of full words (or, very rarely, accepted common abbreviations such as “config” and “init”).
  • Variable names are written in “camel case”, starting with a lowercase letter but with the first letter of each new word being capitalised. An example might be a function called findClosestEnemy().
  • Classes start with an upper case letter and each word should have its first letter capitalised, e.g. you might have a class called FastEnemyShip. I believe this convention should also be applied to the class names you give Flash symbols when linking them in the library.
  • The only place you should use an underscore is at the start of private variable name that is returned by a public getter function. Never in the middle of a variable name.
  • Operators such as = and > should have a space either side, so:
    if (x > 50) isDead = true;
    NOT:
    if(x>50)isDead=true;
    This will still compile but it’s a lot harder to read.

Obviously these are only conventions and you can code however you like, but I think that if you are teaching or writing a book you should pay attention to these things. While coding style is only superficial, my next criticism is more fundamental – many the games this book teaches you to make are not the ones you should be learning to make.

So what have we got?

  • The match-the-pairs memory card game “concentration” - this was old-hat when I started in Flash games 10 years ago – at this point it’s prehistoric.
  • Minesweeper is making a resurgence with indie titles like Desktop Dungeons so that’s a decent addition.
  • Connect Four is really only fun as a multiplayer game, so that’s not very useful .
  • Snake is a very old-school and basic game – too basic to be successful in today’s increasingly sophisticated Flash games scene.
  • Tetris is so much of a classic that there are already too many clones out there.
  • “Astro-PANIC” is a Space Invaders-like shoot ‘em which is worth knowing how to make.
  • Bejewelled and Puzzle Bobble are both classics with potential to go in new directions, so they’re ok to see.
  • And BallBalance is a design so unique that it doesn’t really offer any techniques that are worth pursuing in your own games.
In summary then, 4 games out of the 9 are worth learning about. If you need to make one of these games, and you can’t already find a tutorial online, then this book might be worth it, otherwise I’d avoid it.

On a more general note, I really think that a lot of game developers around my age group (e.g. 25 and older) are stuck in the past somewhat with their ideas of what constitutes a computer game. The new generation of players grew up with Pokemon and Xbox Live, and have never played a game that doesn’t save their progress as they go and feature achievements, upgrades, collectables, item shops and other RPG elements. I think that any future Flash gamedev books that come out need to understand this fact and capitalize on it with a focus on implementing modern game design ideas. Also, I notice that most books teaching Flash game programming seem to be broken up into individual games, whereas I think a more logical approach is to break the book up by topic, so each chapter covers a different game programming problem, such as collision detection, saving a game, physics etc. Then when you are stuck on a particular problem, you know where to turn.

Monday, 16 May 2011

Takeaways from GameCamp 4


GameCamp4 was definitely the most fun I've had at a conference in a long time. The fact that it was held on a weekend, that people were there for love and not work, the democratic unconference format, the fact that there was a nice mix of male and female attendees - it all added up to a very pleasant day out. There were no dark auditoriums, no videos or keynotes - just lively debate, Nerf guns, zombies, rubber swords, obscure board games and lots of chat about videogames. Here are my takeaways (the ones that I can remember) from the sessions I went to:

The Distillation of Gameplay
  • A lively debate that ended up filling two sessions, yet somehow I remember very little of what we discussed.
  • Limbo is a brilliantly distilled game as it dispenses with many of the trappings of games, such as a HUD/GUI, stats, scores, lives etc.
  • Farmville and World of Warcraft both essentially rely on the same hooks of progression, leveling up and loot drops, rather than "gameplay" to keep players engaged.
  • Social games are spoiled by an over-emphasis on monetization and viral hooks.
  • Boss battles are a chance to introduce interesting enemy characters into a game rather than faceless drones, but many players find bosses frustrating or boring.
  • Bosses provide satisfying conclusions to levels.
  • Some games, like Mass Effect 2, are all about the story.
2D Art - Pixel vs. Vector vs. Painting
  • I hosted this session as I'm really interested in this topic at the moment. It went OK. but it would have been better if we'd had more artists voices in the room.
  • Lo-fi super-upscaled pixel art is popular for a confluence of reasons: it is quick and easy to produce, it is highly symbolised and allows the player to fill in the gaps with their imagination, it evokes a nostalgia for the past, it scales well between devices with small screens and HD monitors. It is also a fashion thing among indie developers, and marks your game out as having a particular set of cultural values.
  • There is no such thing as programmer art. If you make the art, you are the artist.
  • Detailed full-colour, 1-to-1 scale pixel art is great and getting a lot of detail into a small space but is very difficult to port across different devices as it cannot be rescaled.
  • I'm a huge fan of vector art and believe it is just as easy to produce as pixel based art, but gives a greater palette of shapes to work with - triangles and circles, not just squares.
  • Most limited-palette, lo-fi pixel art looks like it was made by the same person, meaning there isn't much of an individual voice.
  • Games like Machinarium, Aquaria and Braid that use painting-style artwork look unique and memorable, but it is very labour intensive, which is why you don't see it very often.
  • Minecraft shows that indie developers can branch out into 3D games without needing complex 3D artwork.
  • Photography is an underused medium in 2D games.
What is the new hotness?
  • A fun but pretty random session that weaved it's way around videogames, TV and social media.
  • The first phase of Kinect hacking was technical, the next will be creative.
  • There's a lot of excitement and expectation around the upcoming Kinect game Child of Eden.
  • Social "back channels" are become increasingly mainstream. We watch TV and discuss it on twitter at the same time, the voice-over on TV shows like Come Dine With Me and Total Wipe Out openly joins us in mocking the on-screen action. How can this trend towards live-tweeting come to gaming?
  • We enjoy the process of getting excited about games that aren't out yet as it is a social activity, while gaming itself tends to be quite solitary.
  • TV gameshows are becoming increasingly arbitrary random number guessing games.
  • Games to check out at the moment include League of Legends.
What are indie games?
  • As it came to the last session of the day and there wasn't anything I wanted to see, I added this topic to the board, and it attracted a pretty large crowd, including a bunch of people from the retail games industry whose voices were really useful to the discussion. It was a very light-hearted but lively debate and was probably my favourite session of the day.
  • The term "indie" means different things to different people.
  • Indie is a business model - small teams or individuals releasing their own games without publisher backing or funding. However, not everyone doing this is considered "indie" by the games press. There are other cultural factors.
  • Indie is a spirit. Being the person who has the final say over what goes into the game seems to be important. Games like Castle Crashers and Fez have indie spirit, even if they end up signed to publishing deals with big studios.
  • Indie is a culture. There are a number of media outlets and organisations who set the indie-agenda. TIGSource, IndieGames.com, The IGF, Bytejacker. These guys are looking for a particular type of game - ideas that aren't mainstream.
  • Being considered indie may well have something to do with being a hipster.
  • Some indie game ideas, especially those from game-jams and contests, can end up being "innovative" purely because they are doing ideas that nobody else would actually want.
  • Developers who work for triple-a games studios would love to talk more about their work but are often prevented from doing so by non-disclosure agreements. This could mean that indie game designers are more likely to become "famous".
Flash Games: Design and Business
  • Myself and Tom Vian from Super Flash Brothers set this one up when there was nothing else we wanted to see and our friends deserted us to play a zombie boardgame called Last Night on Earth (there were too many players for us to join in). It was hopefully an informative session - I certainly learned some things from Tom.
  • Developing Flash games is probably a safer bet than developing for iOS as you don't need a marketing budget - games will find their audience naturally once released onto portals.
  • There has been a considerable deflation in the value of Flash games since so many developers have entered the market. 10 years ago I made a very basic "track and field" game based on The Six Million Dollar Man to promote the DVD release, and the client paid my employers £2000 for it. These days, to get £2000 for a game on FlashGameLicense, you have to work your ass off and produce something as big in scope as Angry Birds or Super Mario Brothers.
  • Flash gaming is very hit-based, and how much sponsorship money your games attract has as much to do with your past successes as the game itself.
  • Although very rare, it's good to establish a retainer relationship with a sponsor who will guarantee to sponsor all your games.
  • There is no barrier to entry for making Flash games.
  • Making seasonal games such as Halloween or xmas themes is a big gamble but can pay of massively if your game goes viral. On the other hand, if it doesn't then it has little year-round appeal. Who wants to play an xmas game in June?
Emergent Storytelling
  • This isn't what I was expecting at all. It was actually the Zombie Larp team talking about their Nerf-based live action roleplaying game. I am completely obsessed with Nerf though, so I was in the right place.
  • Their games last just 7 minutes each, after which most players are dead.
  • Live action games can give you experiences that digital games just can't, such as fear!
LARP 101
  • I actually went larping a couple of times as a young teenager, so I didn't really need the introduction, I just couldn't resist the chance to handle the beautifully hand-crafted rubber weaponry.
Sorry if I missed out any sessions, I'll add them later if I remember them. I definitely recommend going along to future GameCamps - it was a blast. On a related note, I'm also definitely going to check out the brand new Indie Dev Day at Develop conference in Brighton in July - tickets are £50.


Tuesday, 10 May 2011

Go play Owl Spin right now!



Good news! Owl Spin is live on Kongregate. Go play it at your leisure. As always, voting things 5 stars makes me happy.

Even though it's just a silly casual game, it was a monumental game for me because it's the one that made me decide to cut down on the client work and go full time indie. Can't wait to see how it does...

Tuesday, 3 May 2011

Advice for conference speakers

I was recently asked for some advice by someone starting out at conference speaking. I'm no expert, but I've had a bit of a crash-course in this over the last couple of years, so here's my advice:
  • Make sure you have your session timed-out to last exactly 1 hour, with an additional 15 minutes of bonus content in case nerves make you burn through your slides too fast (as I did!). Similarly, make sure that you've covered all your main points by 45 minutes in, in case you run out of time.
  • Have your slides on your laptop, on a USB stick and on dropbox / gmail / somewhere on the internet. Plan for complete technical malfunction! Test your your presentation / content on multiple computers just in case.
  • If possible, find out what the resolution of the projector is before designing your presentation. If not, assume 800x600.
  • People expect a humorous session with plenty of jokes (you can try to tailor these to the content/audience of your talk, so, at FOTB, jokes at the expense of Adobe, the competition and/or yourself will do well). Visual jokes, silly cat pictures from google images and youtube videos are also a cheap way to score some laughs and get people on your side.
  • Move about the stage a bit and try to be as animated and enthusiastic as your personality allows. Smile!
  • Make sure your slides are well designed with nice images and clear diagrams, and just enough text to sign-post what you are talking about (no long passages of text). Use a big, legible font and avoid clichés like clip art and default PowerPoint themes.
  • People want to see things moving around, so have videos and/or interactive demos as a big part of your presentation. Videos with a music soundtrack pretty much ALWAYS get a round of applause, even if they are a 2 minute loop of paint drying.
  • People want to see code, but keep it to big, readable code "quotes" (e.g. speedX = Math.sin(angle) * speed) rather than huge blocks of code. I don't advise attempts to live-code anything! It is bound to either go wrong or take longer than you think, and attendees generally aren't that wowed by it or regard it as a good use of their time. Producing a nice diagram showing how your classes are organised is way better than randomly clicking through the package structure in Eclipse.
  • Rehearse like crazy before the event so that you know what you are saying off by heart, but don't worry about saying it all exactly how you had it written. In fact, I'm pretty sure that you'll assimilate the content better by saying it in a different way each time. You should never read off a script, you should just have some bullet points to remind you what's happening.
  • Don't underestimate how much content you can pack into an hour. Some Flash on the Beach Elevator Pitchers (who have just 3 minutes on stage each) manage to cover almost as much information as speakers with a full hour - this is NOT an exaggeration.
  • Focus on takeaways, not blowing your own trumpet. Not that I think you would, but avoid long self-aggrandising speeches about the history of your company or how your got into the industry, etc. Only the very best speakers can pull this kind of stuff off, even then they can still come off seeming a bit arrogant / self-obsessed. Instead pack your talk with "takeaways" - nuggets of information or inspiration that will actually be useful to the audience in their day-to-day work / life.
  • Don't assume anyone knows what you're talking about. For example, don't just fire straight into statements like "TDD allows us to deploy an agile methodology, focussing on stand-up meetings and UAT, which increases our client's ROI while reducing our overheads". Explain in plain English what you are talking about. Most ideas are way simpler than experts make them sound.
  • If you really want to leave an impression, try focussing on ideas that will change the way the audience sees the world! Easy, right? ;)
  • It can be hard to make technical session seem interesting, so perhaps emphasise real-world application of technical topics.
  • Finally, to reiterate: focus on spreading good ideas that the audience won't have heard before and that will make them better at what they do.
I hope this is useful to someone. Speaking at conferences, user-groups and universities can be quite scary, but it can also be quite rewarding, and I'd advise anyone to at least give it a try. The Flash on the Beach Elevator Pitch is a great place to get started - email elevator@flashonthebeach.com to apply. There are 20 slots each year so it's surprisingly easy to get a slot! I'd love to hear anyone else's tips too - leave a comment!

Monday, 18 April 2011

Is Flash Cool?

Fab Five Freddie told me everybody’s fly,
DJ’s Spinning, I said “My! my!”,
Flash is fast, Flash is cool.
- Blondie
A couple of days ago I saw a really great bit of Flash work – Magnum Pleasure Hunt which was flying around twitter. It’s a really fun (silly) bit of interactive media combining gaming, video and animation in a seamless way that only Flash can do on the web at the moment. It’s a classic theFWA-style Flash site. A couple of years ago I used to check these kinds of sites out all the time. Now, not so much. Why is that? Is it just me reaching a jaded, “I’ve seen it all” phase? Or has the world moved on? Is Flash still cool?

So I turned to you guys on twitter and asked the simple question #isflashcool? (and give it a score out of 10 to be scientific)/ Here are your thoughts...

For many respondents, Flash developers themselves are the thing that keeps Flash cool:

Kyle Rodgers offered the pragmatic “8/10 - It's still far more capable than the alternatives (except unity) and filled with hilariously talented people”. James Whiteley: "Flash is 10/10 cool. The coolest people I know are flashers!" François Gillet: "Flash is cool because I use it and I'm the coolest guy in the world!"

For others, technology is irrelevant. Dan Stubbs: "Doing anything more creative than veging on a sofa, eating food from a packet & watching X-Factor is cool". One repsondant has never really got over his first love, Adam Montandon: "Is director cool? It's had 3d and physics for years!(wipes tear from eye)".

For some, Flash needs to work a bit harder to move with the times, and keep up with the competition. Miguel Arias: "I would say 7/10, it still has its space but needs to adapt to this new era." Simon Rohrbach: "Flash is an brilliant piece of technology, but its era is over. 0/10, but I'll give it a 1/10 because it ruled my childhood." Dan Rogers: "I'd give it 5/10, because it still has a place, but coolness is dropping."Mark Grossnickle: "7/10. Flash Needs to perform better on mobile. Future is promising with Molehill". Squize: "I think Clint Eastwood is cool, I think Flash is a means to an end and whose star is waning due to real competition". joseeight: "#IsFlashCool - it used to be 5 years ago; #IsHTML5cool - yes, it's the shizzle"

Although my twitter followers skew heavily towards Flash developers, there were still a fair share of detractors. Jon Gold: "Flash is as cool as Coldplay. 0/10". And we also had some jokers in there, like graham milton: "Flash is [THIS_CONTENT_REQUIRES_FLASH_PLUG-IN] cool".

Some rejected the premise of the question: Paulo Fierro: "I'm with @cspelsor. the tools don't matter, its what you do with them". Grant Garrett "It's ALL about how you use your tool!"

For some, the word “cool” was a bit of a stumbling block. Martin Darby: "Is this not a bit like saying are chisels cool?-Well if you want to carve wood yes. If you want to bake a cake, no." Matt Pearson: "Skateboarding = cool. Swearing = cool. Snorting drugs offa Angelina Jolie's back = cool. Can Flash do these? No." Chris Pelsor: "Wow, nice to see Twitter has made that final digression back to high school... it's called getting old. You reach a point where what's cool is your kid getting excited that they flew a kite for the first time."

But anyone who knows me, will know that I’m not really interested in “cool” in the sense of Ugg Boots or Ray Bans – I’m talking about cool in the intangible sense that The Millennium Falcon is cool, or doing a good deed is cool, or yes, flying a kite with your kid is cool. You look at it and say “cool!” But it terms of the highschool meaning of cool, many people noticed that Flash didn’t have the best public perception right now. Mark Burvill: "I'd give it 1/10 right now. But that's kinda why I love it more than ever. Being cool usually means you're a dick."

Richard Lord seemed to pinpoint the indefinable concept of cool the best, so I'll let him have the last word:

Flash is not cool, and hasn't been for some time (5/10). But it gets stuff done, which is more important. Boringly, iOS is still cool. Unity is cool. Kinect is cool. Scala is cool. On the other hand, Flash, C#, jQuery, XNA are not cool, despite being very good at what they do. I don't equate cool with useful, effective or high quality, which are more important in the tools I use. Don't chase the cool, build the cool.
I can't say it better than that!

Monday, 11 April 2011

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!

Thursday, 17 March 2011

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.

Tuesday, 8 March 2011

Jam games, card games and panini - another great show-and-tell in Plymouth

This is a cross-post from http://explay.tumblr.com/...

Extended Play meetup

We had another friendly and awesome meet-up last night, with demos from Gareth Williams, György Straub, myself and almost Dan Stubbs, as well as a gallery of concept art from some of our other talented members. Gareth showed a badass prototype where you control a snake who has to eat different music samples to build up a beat. Gareth’s demos are great because he invites suggestions for improvements and always gets a good debate going.

Gareth

György showed his work from the last Plymouth game jam, which was an inspired reversal of the tower-defence genre, where you have to defend the helpless monsters from being slaughtered by the evil towers.

Tower Offense

I showed the work-in-progress of my forthcoming game Owl Spin, which will be available to play very soon. Thank you all for your kind words about it, and cheers Alex for being only the 3rd person to play it! I also showed the creative physics toy I made for muzy.com – which you can play with here.
Owl Spin

I also experimented by running a 26-player card game, which actually went quite well. Somehow I even got all my playing cards back at the end of it - what an honest bunch we are! This is how it worked: As everyone arrived I gave each person 2 playing cards and asked them not to look at them or show anyone else. To start the game, I just announced the simple objective – whoever can come to me first with 4 of a kind, wins (a copy of classic movie Gamer). The bar immediately erupted into the trading floor of the New York stock exchange, which was exactly what I hoped would happen, and it was all over in about 60 seconds.

Dan's obscure Japanese card game

The game was inspired by this game design lecture from YouTube and Ryan Creighton’s shenanigans at GDC. Speaking of GDC, Extended Play regulars Ella Romanos and Luke Davies were both out there this year, so hopefully we’ll get field reports from them at the next meeting.
Once again massive thanks to Ria Hartley and the Mutant Labs guys for making it all happen.

Hack the planet

Iain

Tuesday, 1 March 2011

Yet more game development tips!

Are you sick of game development tips yet? Between the endless array of indie game blogs and the myriad of developers shooting their mouths off on Flash Mind Meld, you probably are by now. But in case you're not, I wrote some tips for Microsoft's Ubelly blog. You may read them. They also have a contest to make an HTML(5) game or creative app with some cash prizes etc. Please note -you may not use any plugins for the contest, not even VRML.

Monday, 28 February 2011

Podcast Episode 3 - Molehill and Processing with Jer Thorp



The unstoppable juggernaut that is The Creative Coding Podcast continues on its inevitable rampage of destruction, this week flattening Molehill and making mince meat out of Processing. Special guest Jer Thorp jumps on board to crush those who would oppose us. Listen now!

Friday, 25 February 2011

Hackathon contest winners announced!


A while back I announced a Flash game contest I was helping to judge, and gave away some source code to get you started. Over 500 people downloaded the source code - however not one of those people managed to enter the contest! No matter though - six intrepid developers did get their games finished and in front of the judges eyeballs. Head over to Mark's blog to find out who won and play the games. If you didn't win - don't worry, there was something to like about all the games, and all entrants get a copy of FDT.

Tuesday, 22 February 2011

How to make a whole game in one day

There are game jams and Flash game competitions seemingly every weekend these days. While I don't really like the idea of pinning my eyes open with matchsticks and coding all night, I do like the idea of getting a complete game finished and released in a single day. I sometimes get a day or two of downtime between client projects, and rather than using this time to experiment on bunnies, I've been trying to work out how feasible it is to release 1 or even 2 games in these gaps.

My first couple of attempts have overrun by about double, and still aren't released (I'll keep you posted), but I have learned a few things along the way that I thought were worth sharing. I've also picked the brains of some other friendly developers for some suggestions (you know who you are, so thanks!)

Here's what I've worked out so far:
  • The game can't have more than 1 level that you need to design. So a single maze like Pacman would be ok, but you can't have every level be different.
  • You can't require any complex artwork. You need to use either free art, cheap stock art, art you already have kicking around, or art you can put together in 1 or 2 hours.
  • You need a game engine to start off with. Flixel and Flashpunk might work for you, but I prefer to use my own engine, which I have been revising and improving for well over a year. It's still nowhere near "finished", but I'm not writing much low-level code for each new game.
  • You need a template .fla and/or FlashDevelop template already set up so you don't have to write any boilerplate for Mochi-ads, screen management, preloading etc
  • Your game must have a way of automatically progressing - with either randomly generated levels, or a simple way of getting progressively harder automatically. Players expect to go on a journey of increasing peril, but that's hard to "author" in just a few hours, so automating it is the only way to go.
  • Your game can't introduce you to any programming techniques that you've never done before - e.g. new type of collision detection. Learning a new technique is a fine way to spend an afternoon, just don't expect a game at the end of it.
  • The game must have reasonably similar gameplay to an existing game, so you're not working every aspect of game design out from scratch. If you add even one or two elements to a game that are completely novel, you've done more than most. Combining game mechanics from different games that you enjoy seems like a logical starting point.
  • Don't try to make all the code you write reusable - just get the game done, you can always come and copy bits out of it later.
  • Don't throw your idea out half-way. Once you come up with your idea and started coding, you might as stick with it and do the best job you can to make it fun. Even if it doesn't turn out to be the new Tetris, at least you will have another completed game under your belt.
If you've got any more suggestions and lessons-learned from your own game-jam experience, please post them in the comments.

Thursday, 17 February 2011

BunnyMark compiled from ActionScript to HTML5 with Jangaroo


Jangaroo is a cool opensource project that lets you compile AS3 source code into JavaScript, and as it emulates a subset of Flash player features, you can even use it to port existing Flash games and apps to HTML5 Canvas. I talked about my experiments trying to get it working in the first episode of my and Seb's podcast. I wasn't having much luck at that point, but since then Frank from the Jangaroo team has given me loads of help to get all my demos working, even editing my code and fixing parts of the compiler for me! What I think I didn't stress enough on the podcast was that this project is still very much a work in progress / public alpha - I think it has a lot of potential.

So here I present BunnyMark via Jangaroo and HTML5 Canvas!

BunnyMark - blitted version - 30fps (Windows Vista / Chrome) - Pretty fast!
BunnyMark - bitmap version - 8fps - Really slow for some reason. (any ideas Frank?)
BunnyLandMark - blitted version - 30fps - Pretty fast!


How to communicate between game objects.

Over on Richard “PhotonStorm” Davey’s blog he proposed a simple way to communicate between objects in your game using a “Registry” a class with static variables storing all the major systems of your game. So, for example if you wanted to create a spray of blood when an enemy is hit, in the enemy’s hit() function you would include the line Registry.fx.sprayBlood(x, y) and the FX object stored in the Registry.fx variable would create the blood spray and handle updating etc.

In the comments on Richard’s post, I pointed out that this isn’t a very object-oriented approach: these are basically global variables by a different name. I have used a similar approach myself on quite a few games projects, and overall it works well and is a quick way of getting things done. I have, however, encountered two problems with it.

Firstly, you can end up with all you code in one huge blob or “god class”. For example, if the FX class is responsible for handling any possible visual effect you would want to create, it could end up getting very big. But, other than academic notions of “good” and “bad” code, there’s nothing especially wrong with having big classes. They may be a bit harder to maintain and reuse, but nothing to worry about too much.

Secondly, using static/global variables as a communication method means you can be limited to having only one “game” in a single project. Now in most scenarios this wouldn’t be a problem, but it’s normally best not to assume you will only ever have one of a particular class of object. I’ve worked on several Flash projects that were collections of minigames in a single swf. Where I was relying on static variables in some of my base-classes and utility classes, I started to see clashes between the different games.

Ok so how do I handle the same problems? Well, say an enemy needs a reference to the player in order to chase after them. Rather than looking up Registry.player, I would just have a “player” variable in my enemy class and I would pass in the value of player when I create the enemy, or once I know the player exists. Or if the enemy needed more than a couple of different references from game in order to work, I would just pass in a reference to the game itself, and let the object access whatever information it needs. As Richard points out, the downside to this approach is that you end up with a lot of references in different places. This isn’t really a problem if you null your references when destroying objects, but it is more work, and you can leak memory if you’re sloppy with it.

Secondly, pretty much everything in my game extends a base Entity class. I have a main Game class that manages all these entities. Game has a method called addEntity(entity:Entity) which adds any new entities I create to the array of entities. Every frame I loop through all my entities and call their public update() function (to pause the game, I just don’t run this loop).

So say I have a SpaceShip object that creates a Bullet object every time it fires. How would I let the game know? I wouldn’t call Game.instance.addEntity() because I may have more than one mini-game that extends my base Game class in a single project. Instead, the base Entity class has a function addEntity(entity:Entity) which dispatches an AS3Signal with the entity value. My game is listening for this signal, and directs the entity to its own addEntity function. You could also use an event to achieve the same effect. Now any Entity can itself create more entities and add them to the game.

How would I use this to solve the problem of creating a spray of blood? I would create two Entity classes. One class is BloodDrop which is a single particle of blood. Every update() it moves based on its speed and falls with gravity, and after 30 frames it fades out and destroys itself. The other class is BloodSpray, which lives for a single frame, and in that frame just runs a loop creating 100 instances of BloodDrop, setting their initial position and speed, and calling addEntity(bloodDrop). Now to add my spray of blood in the enemy’s hit() function, I simply create a new BloodSpray, set its position to match the enemies position and call addEntity(bloodSpray). All the entities know how to update and destroy themselves and are pooled for reuse.

This won’t solve all the communication problems in your game, but it will solve a big chunk of them, and now your code is neatly organised into distinct Entity classes which each perform a single purpose.

Happy coding! I think my next conference/user group talk might have to be one about organising game code :)