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!