Time for action – play SquareChase!

  1. Run your game by clicking on Start Debugging from the Debug menu or hit F5 on the keyboard.
  2. Play an exciting game of SquareChase by holding down the mouse button and trying to catch the squares with your mouse cursor:
    Time for action – play SquareChase!

What just happened?

You just finished your first XNA game, that's what!

Granted it is not exactly the next blockbuster, but at only 33 lines of code, it implements a simple game mechanic, user input, score tracking and display, and clock-based timing. Not bad for a few minutes work.

Have a go hero

As simple as it is, here are a couple of enhancements you could make to SquareChase:

  • Vary the size of the ...

Get XNA 4.0 Game Development by Example Beginner's Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.