Mac Joystick Input in AIR

using Adobe Native Extensions

When super cool dude Kyle Pulver asked around for help getting native joystick input for his super cool baby throwing game Offspring Fling, I figured it would be a great opportunity to improve my Flash chops a bit and maybe even get a ‘world first’ in the Mac AIR apps scene. (Okay, not really, but it sounded like a fun challenge!)

MacJoyANE is the result of a week of sweat, code and tears. The project consists of three main parts:

  • An XCode Project – builds a Cocoa .framework library
  • Flash Builder Project – builds an ActionScript .swc library
  • Build shell script – Takes the two library and compiles the final .ane (Air Native Extension)
  • This project links directly into the IOHIDManager for MacOS X and so far no issues have arisen, but it’s early days yet. It’s open source and I’m happy to take contributions.

    MacJoystickANE Project on GitHub

    Posted in Announcements, Technical | Tagged , | Comments Off

    Flash, HTML5, WebGL and Unity

    I’m a bit late to the party here, but the internet has been buzzing a lot lately with the ‘news’ that Adobe has killed Flash. Well, not quite.

    First off let’s put this into perspective. They’ve killed Flash Mobile, more specifically the plug-in that comes with mobile phones in their browser. Does this mean Flash on mobile and tablet platforms is completely dead and gone? No, in fact the majority of Flash experiences on mobile and desktop will likely move to AIR.

    Can AIR3 save Flash?

    Android phones can still use AIR, as will the RIM Playbook (ha ha.) iOS apps built with Flash are built in a different way, essentially having a version of AIR compiled into them – and iOS never permitted in-browser Flash – so it’s completely irrelevant to that platform anyway.

    Matter of fact I would say this announcement is a good thing. First of all, Android and Playbook will still get Flash Player 11, which is way advanced for a browser plug-in for your phone. Still I think the Flash pipeline is starting to breach into some really cool territory, with fully fledged 3D hardware acceleration and the ability to finally produce fully native apps (see Captive AIR Runtimes and other AIR3 features.)

    At least for the immediate future, AIR3 is a great step forward for game devs in Flash because it gives them a way to get their awesome experiences out to the world with minimal fuss.

    Still, stigma is a big thing on the web. HTML5 is the future, primarily because the number is higher than HTML4. It has exciting things available like Canvas and WebGL which mean Flash will soon be redundant. Well. Someday.

    HTML - The Future.. sort of

    See, we’re not quite there yet. For games, HTML5 relies heavily on WebGL to deliver good performance. The Canvas element (while cool) isn’t really up to speed in the performance arena. You can also resort to moving images around the screen with JavaScript and CSS, which is kind of a nasty hack in my opinion. But WebGL can do some really cool stuff!

    WebGL Demo

    Awesome WebGL Water FX

    Hopefully you can see that properly, it’s a really cool rippling water demo in WebGL (see preview image at right.) If you can’t – well – WebGL isn’t available to everyone for a few reasons. One would be that not all platforms and browsers support it. On one particularly important platform, it’s proprietary and only available to advertisers. Actually one other browser manufacturer that makes up fully 40% of the browsing world has no plans whatsoever to support it.

    There’s a number of other issues – incomplete HTML5 implementations aside, we’re plagued with other problems like people who don’t or can’t upgrade their browserperformance and inconsistent behaviour (see above.) But we’re getting there. Still, it’s hard to understand why we’re accepting these drawbacks now when we have a plug-in (Flash) that all but eliminates these problems.

    OK. So the word “Flash” isn’t sexy anymore in the tech world, especially not in the web world. More and more we’re seeing developers jump ship before the spectre of Steve Jobs crushes Flash for good. Personally I feel the jump to another platform is premature – especially HTML5 – but it seems to be raising awareness of another not-so-new contender in the web games arena, Unity.

    Unity 3D - Powerful, Easy, Awesome.

    Briefly stated Unity has some advantages over WebGL for game development that may allow it to really shine right now. For one, it performs consistently and quickly across all platforms. You’re not restricted to the browser – you can publish native apps for just about any platform, including all the popular consoles. It is a game engine and editor first – not simply a graphics library – so it can really help companies and developers play with ideas and publish something quickly. It does 2D handily as well as 3D, so it’s worth anyone’s time really.

    There’s a couple caveats to this post I’ve written. Probably the biggest one is that yes, HTML5 really is the future. For web browsing. That’s important – just as important as it was to move on from frame-based websites and table layouts to HTML4. It’s a good thing we’re moving on. It really is. There are also tools emerging which will make game creation for HTML5 less painful – Stencyl (not yet but soon,) Construct, GameSalad and others are all great programs to keep your eye on if you’re someone curious about game development and the fantastic new world of compliant browsers. Flash is also really good if you’re exporting native apps – nobody has to know that you bundled AIR in there and you can certainly make excellent experiences with it. Plus Flash already has some support for HTML5 and you can expect them to build upon that in the future. The bottom line is that Flash has a great pipeline for animation into code and you can still make incredible experiences with it. If you’re concerned about what is industry sexy though, it may pay to learn a new trick or two!

    Posted in Industry News, Technical | Tagged , , , , , | Comments Off

    PEGJam and SUPER BUSKER

    So let’s get one thing straight. PEGJam 2.0 was incredible, and I highly encourage anyone looking to attend in the years to come to set aside the time to do so. Despite roasting in quite possibly 40°C+ conditions, the talent was so densely packed in this room that you could stir it with a spoon.

    Moving on. As you probably know the purpose of these here ‘Jam’ thingies is to create something new, awesome and fun. There were lots of incredible entries and I encourage you to find them … somehow. I’m not exactly sure how, there’s no central PEGJam game listing.  Alas.

    Super Busker Title Screen

    Super Busker

    SUPER BUSKER is my contribution to the madness. It puts you in the shoes of a panhandler trying to earn his way to the very top of the busker income ranks. Look for this to show up on a portal of some kind soon.

    Posted in Announcements, Inspiration, Work in Progress | Tagged , , | Comments Off

    Eternity Gameplay Preview

    Since the last update quite a bit of work has gone into Eternity. The AI has been updated with both improvements to the current enemies and the addition of passive “Trader” NPCs. Planets also got a bunch of work and now you can land on planets and visit the Starport to trade in for a sweet new ship. There’s still a lot to be done of course! But in the meantime I had a little fun and put together a preview video for my game:

    Posted in Work in Progress | Tagged , , | Comments Off

    Separating Axis Theorem

    The Separating Axis Theorem (SAT) is a staple of pretty much any physics engine in video games these days. Unfortunately so many sites breeze over it with a poor explanation and bunch of ambiguous code.

    This morning I set out to write up my own collision detection for convex polygons rather than relying on others’ premade packages. I think everyone has read the amazing metanet tutorial on collision detection, but if you’re looking for something a little clearer or just written in a different style this blog might help you out. Anyway, mission accomplished – I have a perfectly functioning OBB collision detector set up now for use in Eternity.

    Posted in Technical | Tagged , , , | Comments Off

    Eternity

    As usually happens a few times a year, a really fun project idea has bitten me and won’t let go. This one is already looking really solid. Ladies and gentlemen, I humbly introduce to you Eternity:

    Eternity Title Screen

    Choosing a target

    Basically this game will be a jump into the space exploration genre, taking after Escape Velocity which was one of my favorite games as a kid. It’s a nice break from the usual platformers and such that take heavy handed collision engines. Ideally I’d like to take this game to a level I’ve never achieved before, allowing some really cool emergent gameplay with the player able to visit different systems and trade items.. AI ships will travel from system to system, and they will range from civilian traders to rogue pirates to military vessels enforcing the peace.

    Where it stands right now is that you start in a small shuttle, and as you cross a procedurally generated galaxy you may encounter pirate ships. You can dogfight with them and they explode into tasty particle engine goodness.

    Enemy vaporized

    The galaxy is recursively generated, beginning with a central star system and branching outwards, each solar system spawning a layer of children and so forth, as ‘space’ permits (ha, ha.) This produces some pretty interesting constellation-like formations in the overview of the galaxy.

    Each star system may have planets, and each planet may have moons. As well each system has a unique star backdrop that is generated upon your entry into the system. I may have to drop this feature though, because it seems to slow down some computers rather harshly.

    Anyway, if space  exploration is your cup of tea, keep your eyes on this one.

    Posted in Work in Progress | Tagged , | Comments Off

    Game Jam for Developers, Artists, Designers..

    Are you Canadian? Are you interested in spending a day or two with a bunch of other wild and crazy Canadians who like to make games? No? Then don’t go here:

    Game Jam in Edmonton, Alberta

    For the rest of us, it’s an excellent opportunity to network, socialize and of course improve game development skills. I don’t know if I can make this particular one, but there is another coming up soon in Winnipeg (sometime in May.) Whether you’re an accomplished programmer or a total neophyte designer, it’s a good experience.

    Posted in Announcements, Inspiration | Tagged , | Comments Off

    GiraffeRPG

    I’ve started work on another new project, a collaboration with one of the artists I’ve met through TIGSource. It’s under the tentative title of GiraffeRPG for reasons I am sure you can hypothesize on your lonesome. For the man known only as “J.R. Hill”, it is an outlet for his desire to draw giraffes. Many of them. Cute ones. My own ambitions were simply to create an RPG. I think that sums it up.

    GiraffeRPG in Development

    Right now GiraffeRPG has a working Tile Map Editor written for Adobe AIR. It’s also built on Flex 4, so I’ve been fiddling around with the new Spark components. Flex to me is far too cumbersome in most cases and I’m not even sure I really like it here. On the other hand, it did make rapid development of a functional editor quite easy and the ability (thanks to AIR) to access local files is really, really handy.

    Next phase of the game is to start working on building out some areas for Giraffey to walk around and some collision code to accommodate the various edge types. After that we will move onto ‘entities’, which include the characters and enemies of the game.

    If you’re interested in some of J.R. Hill’s artwork, check out his site Time For Cute.

    Posted in Announcements, Work in Progress | Tagged , , , , | Comments Off

    Rock, Paper, Zombie Playable

    Well, I think we’ve sat on this long enough. Go ahead, jump on in.

    The only weird thing you might see is this fuschia coloured button.. click it to flag yourself as ‘ready to battle’. The next person who clicks it will be paired up with you.

    Posted in Uncategorized | Tagged , | Comments Off

    Rock, Paper, Zombie

    While Mushroomer is being judged, I’ve started work on a new project that was originally penciled out several months ago. The concept is simple: Rock, Paper, Scissors… with Zombies.

    Now of course there’s more to it than that!

    Sadly, for the moment I’ll have to leave you with just a tiny hint of what’s to come. Enjoy.

    Rock Paper Zombie Logo

    Rock Paper Zombie Logo

    Posted in Announcements | Tagged , | Comments Off