60fps gameplay with Box2D and Starling

My post from a few weeks back may have piqued your curiosity. It showed the bare bones of a scrolling platform game built on top of Box2D and running with debug graphics. Since then I’ve been busy adding proper visuals to it using the Starling framework and can now reveal what the heck I’ve actually been working on. It’s a recreation of the Tomb Town level from Halfbrick Studios’ excellent Monster Dash game.

I really love the stuff Halfbrick produce and thought that recreating a level from Monster Dash would be an ideal way to learn more about game design. I used to work in the games industry years ago but only got back into games programming more seriously recently with the release of WeeWorld’s Match Mee for iOS. It was also another good excuse to see just what could be created with Adobe AIR. I’m happy to report that the video you see above shows my demo running on an iPad 1 at 60fps.

I’m pretty happy with the end result and while it’s certainly not a perfect recreation, I’m sure you’ll agree it’s pretty damn close.

Stage3D Online Conference

The Stage3D Online Conference took place last week and its organiser, Sergey Gonchar, has kindly posted a video of the entire five hours. It boasts an impressive line-up of speakers covering popular frameworks including Minko, Away3D, Genome2D, and Flare3D.

I managed to catch the first two hours (had to head off to see Indie Game: The Movie) and was pretty damn impressed by what was on offer. It’s clear some tremendous progress is being made with some of the 3D engines that are built on top of Stage3D, and there was talk from a few of the framework vendors of some big name publishers actively working on Flash and Stage3D-based web games.

Check out the conference video here and please also consider joining the Stage3D Facebook page.

Indie Game: The Movie

It took me long enough but I finally got around to seeing Indie Game: The Movie the other night at the Centre for Contemporary Arts (CCA) in Glasgow, and I must say I thoroughly enjoyed it. The film documents the development of independent games, through the story of three well known games: Braid, Super Meat Boy, and Fez.

While all three games were eventually released to critical acclaim, the development process was far from plain sailing. Struggling financially, and in some cases mentally, to keep up with the constant pressures of delivering a hugely anticipated game, the film paints a less than glamourous picture of what it’s like to write ambitious and creative software.

At the CCA with my three cohorts: Callum, Amanda and Ian.

Happily, it was worth the effort for these guys and all three definitely deserved their success. However, it would have been good to see the other side of the coin too. I’m pretty sure for every one or two man indie team that succeeds there must be hundreds who fail even though they put the same amount of love and effort into their creation.

If you’re in any doubt how hard it is to make a successful game, or you’d like to gain an insight into the creative minds that make such amazing titles then you should definitely check out Indie Game: The Movie. Highly recommended.

Match Mee Treasure Room Update

Just thought I’d let you guys know that we released an update to Match Mee with a bundle of new features and bug fixes. The major addition was a treasure room allowing the player to see their collected Idols. It’s something people had been asking for so we were more than happy to oblige.

From the treasure room you can also view information regarding the gems that you’ve collected. With there already being a Collected Gems leaderboard we thought it would be a nice addition for the player to be able to see how many of each gem type they’d collected.

We also made it easier to earn power-ups by posting to Facebook. In previous versions of the app it wasn’t so obvious what button to press in order to move to the Power-Ups screens. Hopefully it’s a little clearer now.

The latest version of Match Mee is available for FREE from the App Store for iPhone, iPod touch, and iPad. As always, all feedback welcome. Enjoy!

Endless Runner

Just thought I’d show off a video of something I’ve been working on over the last few weeks. It’s a work-in-progress and only has debug graphics in place but it should give you an idea of what I’m trying to do. If you’re still not sure where I’m heading with it then take a look at this post of mine from last year.

Basically I was looking for an excuse to muck around with some physics engine stuff. Originally I was going to use Nape but seeing as I’d just recently read through Emanuele Feronato’s Box2D for Flash Games book, I thought I’d go with Box2D instead. Now I just need to add some nice visuals in there using the Starling framework. I’ll keep you guys posted and hopefully I get it up and running on an iPad or something.

Adobe Abandon ActionScript Next

So Adobe made a series of announcements yesterday regarding changes to the Flash roadmap, and typically some of those decisions have had the Flash community up in arms again. Last year I made a conscious decision not to get involved in these often heated debates but I thought that one major piece of news from yesterday was worth blogging about. That news of course is the abandonment of ActionScript Next (AKA AS4) and the new accompanying virtual machine.

I was sooooooo looking forward to ActionScript 4. As far as I’m concerned, ActionScript performance is one of the last remaining bottlenecks and Adobe’s plans to eliminate that impediment via a new version of the language was a mouthwatering prospect. So as you can imagine, I was more than a little upset when I read over the new roadmap changes only to discover that there will be no new version of ActionScript.

For most, the development of ActionScript Next was a declaration of intent from Adobe. It showed a long term commitment to the Flash platform. Understandably yestreday’s news has once again got the community in a spin with many believing that this is another strategic move away from Flash. Perhaps it is. I just don’t know.

Now while I’m upset by the news, I actually find it quite hard to argue against Adobe’s decision. For the last six months or so I’ve had continuing nagging doubts regarding the validity of a new ActionScript. Here are a few of the things that were playing on my mind and I’m sure Adobe’s too.

Transitioning between language versions

The process of transitioning from one version of the language to another isn’t always smooth. I know many developers who never managed the leap from ActionScript 2 to 3. I even know people (mostly designers) who found the jump from ActionScript 1 too much.

Personally I was pretty late to take up ActionScript 3 due mostly to the fact that my work at the time was focussed on legacy AS2 code and the same could likely happen with AS Next. It’s not always easy convincing an organisation to ditch its existing codebase and start all over again. In fact, one of the reasons we adopted AIR for some of our mobile projects at WeeWorld was because we had an existing ActionScript 3 codebase to work from. ActionScript Next could have blown all that away making our case for using AIR weaker.

Lack of third-party libraries

A new version of the language brings about another problem. Initially there will be a distinct lack of third-party libraries. For starters, Starling, Feathers, and Away3D, which are all part of Adobe’s Gaming SDK, would all have to be re-written. I’d imagine it would have been highly unlikely that all three would have been ready for AS Next’s release. And that’s just for starters. What about other great libraries/frameworks such as Box2D, Nape, Citrus, Minko, Facebook’s Graph API, and Greensock’s tweening libraries? We could be waiting years for everyone to catch up, crippling those wishing to develop with the new language.

Classic display list

My final concern was Flash’s classic display list. There were rumours that ActionScript Next would completely forego the classic display list in favour of Stage3D. While I’m all for Stage3D, I think ditching the classic display list would have been a mistake. It’s perfect for prototyping and Flash Professional provides an excellent workflow.

Now I know the classic display list was never intended for mobile devices but it still has its place for many types of mobile applications and games. At WeeWorld we used Flash Professional quite heavily during the development of Match Mee for iOS. While we considered using Starling and Stage3D, we concluded that the classic display list was the better choice, mainly because it put the visuals and layout firmly in the hands of the designer rather than the developer.

Of course, if Adobe were to announce tooling for Starling that was similar to what Flash Professional provides then my opinion here may be different, but to date there have been no such announcements. In my opinion, completely dropping the classic display list would have been a mistake and would have driven more people away from the Flash platform.

Good or bad?

I’m still not sure whether dropping ActionScript Next is good or bad. If I was given the choice, I’d still rather it saw the light of day but sadly that will never happen. Perhaps we’ll see some incremental updates to the language over time but to be honest I find that I can get by with AS3 just the way it is. It’s significant performance improvements that I really want to see. Let’s hope Adobe can deliver on that front instead. Although perhaps AS3’s dynamic nature will make that unlikely.

There were a few other significant developments that came from the updated roadmap. If I find the time over the next few days then I might post my thoughts regarding a few of those too.

Frosby Learning Games 2

Matt at Frosby Games sent me over the follow-up to their Frosby Learning Games app. Designed for 2-5 year olds and approved by teachers, Frosby Learning Games 2 is packed full of fun mini-games that will keep your kids coming back for more.

Each game teaches children new skills through play, with fun activities that will kick-start their imagination and introduce them to problem solving. There’s a wide range of tasks to be completed including tickling sea monsters, spotting differences, building and driving cars, matching colours, negotiating mazes, and even making pizza!

Ultimately Frosby’s aim is to educate through the use of characters, storytelling, and humour. From watching my little nephew’s reaction as we played together on my iPad, it’s clear they have succeeded. While some of the later games are a little too advanced for him (he’s only two) he does seem to be thoroughly entertained by this app and is more than happy for Uncle Christopher to take the reigns for the more challenging mini-games. It’s definitely something he seems happy to keep coming back to.

From a technical point-of-view, I was impressed by Frosby’s integration of Box2D within many of their games. It reminded me somewhat of Toca Boca, who quite often put physics based play to excellent use within their own apps. Great stuff and another good example of what small development teams can make with the Flash platform.

Frosby Learning Games 2 is available on iTunes for iPad and iPhone.

Overlaying AIR 3.5 for Flash Professional CS5.5

Crikey, it’s hard to keep up! We’re now at version 3.5 of the AIR SDK and 3.6 is just around the corner. Since a few people had asked I thought I’d once again update my AIR Overlay tutorial for Flash Professional CS5.5.

So if you’re struggling to install the AIR 3.5 SDK into Flash Professional CS5.5 then just click through to this blog post. It should get you up and running.

By the way, if you’re using Flash Professional CS6 then it’s much easier to setup new versions of the AIR SDK. Here’s how it’s done.

Review: Box2D for Flash Games

It seems just about every game these days relies on physics. There are many engines available but probably the most popular is Box2D, which powers smash hits including Angry Birds and Tiny Wings. But if you’re looking to write your first physics based game then it can all feel rather daunting. Thankfully Packt Publishing’s latest book, Box2D for Flash Games, is aimed firmly at ActionScript 3 programmers looking to take their first steps with Box2D.

Intended as an introduction to Box2D, author Emanuele Feronato does a great job of guiding you through the fundamentals, relating each new concept to a handful of real-world games. Throughout the course of the book he’ll unlock the secrets of two popular games in particular: Angry Birds and Totem Destroyer. In fact Emanuele goes one step further, by leading you through the steps to actually create clones of each game. You’d be surprised at just how easy much of it is.

The first chapter will have you up and running relatively quickly, with Box2D installed and your first physics world running within Flash. By the end of the second chapter you’ll be adding content to your world and viewing your creation via Box2D’s debug drawing mode. The third shows you how to interact with your content and has you write a simple version of Totem Destroyer, making use of mouse interaction to remove physics bodies from the game world. By this point you’ll start to appreciate the possibilities that Box2D opens up to you as a games developer.

As you progress, the book addresses more advanced topics including applying forces, collision detection, joints, and motors. Everything is handled in a clear, straight forward manner, with simple code examples being used to cement each new concept. With the knowledge gained from these chapters not only will you have improved your Totem Destroyer clone but you will also have learned how to build the first level from Angry Birds!

The final two chapters are relatively short and tie up some loose ends. First you’ll learn how to replace Box2D’s debug graphics with your own custom artwork, before finishing up with some additional points regarding collision detection.

Spanning only eight chapters and coming in at under 200 pages in length, Box2D for Flash Games is a relatively quick read. In fact the book does seem to end rather abruptly but it does do exactly what it promises to do, which is provide a solid introduction to Box2D. Plus, unlike most books, it does this without the reader having to invest too much time. I was genuinely surprised and impressed by the number of practical examples the author manages to cram into such a short space.

There are a few other things worth noting. Although the book focusses on ActionScript development, it assumes the reader is using Flash Professional. If you use Flash Builder or some other alternative IDE then you should be able to get things up and running relatively easily, but its worth noting that you’ll be on your own. Also, while the Angry Birds and Totem Destroyer genres are covered, it would have been nice if some other popular game concepts were explored including endless runners such as Canabalt and simple 2D driving games like Hill Climb Racing.

These really are just minor gripes however. Box2D for Flash Games does an excellent job of introducing the reader to the exciting world of 2D physics engines. By the book’s end you’ll be in a position to start developing your own physics-based games with your new found knowledge. A highly recommended read.

You can purchase Box2D for Flash Games from Amazon and the Packt Publishing website.

Hello 2013

I used to suffer from a lack of motivation and sometimes just a complete lack of direction. It’s one of the reasons I started this blog. Just the act of writing out my thoughts seems to get things straight in my head, allowing me to actually be productive and learn new things.

I began 2012 by setting myself some goals and it seemed to work out quite well. Sure I didn’t achieve everything on my list but I did come pretty damn close. So I thought I’d do the same for 2013. You never know, maybe I’ll bag them all this year.

More Mobile Work

Last year saw the release of Match Mee, which was WeeWorld’s first iOS game written entirely in Adobe AIR. I’m no stranger to Flash mobile development (I’ve been doing it since the Flash Lite days) but most of my work has traditionally been prototyping, so it was good to actually work on a product that saw the light of day. There are a few updates planned for Match Mee this year and I’m hopeful that an Android version will make it onto the roadmap. We’ve already had Android builds running in-house – we just need the green light to push them out to users.

There’s also a very strong chance we’ll work on another brand new AIR mobile project this year, which is something I’m looking forward to. Of course, whether we use AIR or not really depends on the type of application/game that gets the go ahead. Hopefully whatever we chose to run with will align well with AIR’s strengths making it a candidate technology.

Outside of the office I’ve committed to producing a few working prototypes of a game concept that I’ve been working on with my buddy Alex. If you haven’t been following my posts, Alex is a kick-ass animator who has worked for the likes of DreamWorks and Pixar. Getting to team-up with him on a mobile project is actually pretty exciting and I’m looking forward to seeing what comes of it. Of course, I know how much time and effort these things take and I’m acutely aware of how little time both myself and Alex have. So I’ve decided to try and be realistic about what we can achieve and start small. We’ll see how the initial prototypes go before even considering doing the game for real.

3D Games Programming

Okay I admit it, my attempt at learning 3D games programming last year was a big fat fail. With the exception of a few weeks tinkering with Unreal Engine I didn’t really manage to find the time at all. So I’m adding this to the top of my 2013 resolutions list.

With so many great technologies and 3D engines/frameworks out there I’m not entirely sure where to start though. Should I continue with UDK or just jump straight into Unity? After all, I’ve been looking for a good excuse to do some C# coding so Unity would provide me with that opportunity. Of course I could just take the lazy option and look into Flare3D or Away3D but maybe I should try and move out of my usual Flash comfort zone.

HTML5 and Other Gubbins

I managed a few HTML5 demos last year and I’m going to make the time for a few more again this year. CreateJS continues to interest me and I’m also eager to play around with Turbulenz. We’re starting to see some increasingly impressive HTML5 games out there. In fact I was blown away by two of Denki’s offerings last year. Both Save the Day, and Word Quest were excellent.

Outside of HTML5, I’m hoping to find the time to do a little more C/C++ this year. However, given the fact I tend to bite off more than I can chew, I’ll make that an optional resolution.

More Tutorials

I was only going to support my Flash iOS Apps Cookbook for a year but there are probably a few things that I’d still like to address. The Adobe AIR SDK marches on at a relentless pace, and some things I cover in my book are now a little out of date. So I might update a few of the book’s recipes and make them available on this blog.

I wrote a few tutorials last year for various magazines. It was fun but in hindsight I’d rather just have provided that material on my blog. So unless an offer to write comes up that’s too good to refuse I’ll be focusing all my tutorial energy on this blog.

More of the Same Really

If you take a look at my plans for last year you’ll notice that my plans for this year aren’t really that different. I guess it’s all fairly familiar stuff and perhaps a little predictable but to be honest I learned a heck of a lot last year and I don’t think doing more of the same is necessarily a bad thing. Fingers crossed I actually stick to the 3D stuff this year though.