FGF 0.1.2.0 Released with Gesture Recognition

New to the input engine within the Focused Games Framework is the gesture recognition capabilities, housed in the GestureTracker class. The gesture recognition class currently supports a small subset of the gestures I plan on supporting, but all are useful none-the-less. The included gestures are press, two fingered press, swipe, two fingered swipe, zoom and pinch. To use the gesture recognition, instantiate a GestureTracker object, add it to the IGame.Modules list and then listen to its GestureTracked even. You will also need an instance of the InputManager class added to the list of modules.

The following is a small sample taken from one of my games that handles some simple menu swiping (a full sample is on the way).

If you do happen to use FGF, I would love to hear what you think! Drop me a line via the Contact form or leave a comment here.

private void OnGestureTracked(object sender, GestureArgs args)
{
    // If it wasn't a swipe, we don't care!
    if (args.Gesture != Gesture.Swipe) return;

    // Get the direction of the swipe to determine what way
    // the menus should move
    if (args.Direction.X < 0)
    {
        // If we are capped at the right side of the menus, return
        if (current == menus.Length - 1) return;

        // Transition the menus
        menus[current].Transition(Menu.MoveDir.OffToLeft);

        current++;

        menus[current].Transition(Menu.MoveDir.OnFromRight);
    }
    else
    {
        if (current == 0) return;

        menus[current].Transition(Menu.MoveDir.OffToRight);

        current--;

        menus[current].Transition(Menu.MoveDir.OnFromLeft);
    }
}

 Download FGF 0.1.2.0 Bin

Continue reading

That’s Twitterific!

Are you new to Twitter? Are you looking for some interesting people to follow? What follows is an introduction to who you should be following on Twitter. It is by no means a complete compilation of who I think is important but rather the beginning.

  • XNA MVP List

    This is a compiled list of the XNA MVPs known to be twittering. If you are interested in XNA, you should be following these guys!

  • Michael Klucher

    Speaking of Klucher, he is the Lead Program Manager of the XNA Development Platform at Microsoft. Follow him for an interesting view of the daily life of a Microsoftie.

  • Paul Thurrott

    Best known for his website, Paul offers a fantastic viewpoint on the industry and is constantly on top of the latest products coming out of Redmond.

  • Bill Gates

    Gates is finally twittering! Follow him to stay up to date on his work and travels related to the Bill & Melinda Gates Foundation.

  • Shawn Hargreaves

    Shawn, famous for his cat based tutorials has one of the best XNA blogs out there. If you are an XNA developer and don’t know him, you’re living under a rock.

  • Sgt. Conker

    Keeping up to date on all things XNA can be a daunting task some times. Thankfully Sgt. Conker has got you covered! Follow these guys for the latest news, articles, videos and releases.

  • Ska Studios

    Dishwasher. Charlie Murder. GAME WITH ZOMBIES. What else needs to be said? The leader in XNA game development. Follow for news not just about their latest creation but gatos as well.