CHAPTER 14
Closing Words

If you've reached this page, you've probably read the entire book, and may be wondering what the next steps are. What should you do to sharpen your XNA knowledge further to create the next generation of games? That's the purpose of this final chapter: to give you some insights and tips on where to go from here.

Before we do so, we would like to thank you for your confidence in buying our book, and we hope that you had as much fun playing around with the samples and games as we did writing them.

If you didn't have fun, please let us know what we can do better, so our next books can meet suit your expectations and needs. (You can find our latest contact information at http://www.apress.com.)

Where You Are Now

At this point, you should have created a few games: Rock Rain, a simple 2D game running on the Windows and Xbox 360 platforms; Rock Rain Live, a network-enabled version; Rock Rain Zune, a Zune version; and XNA TPS, a simple 3D third-person shooter game. If you've followed along, you should be familiar with game programming terms and have a basic knowledge of the XNA Framework.

By following our instructions, you have experienced the real effort that goes into planning and coding complete 2D and 3D games. Along the way, we have stressed some important points regarding game development:

Creating a game is more than just a good idea:
Creating a game is a team effort, or, if you will, a multidisciplinary effort. In addition to a good idea and clean code, you need neat graphics, cool sound effects, effective testing, and more. You'll need to wear a few different hats if you want to do it all yourself.
Use the framework; don't re-create the wheel:
XNA is not a game engine, but it does provides basic classes for calculating collisions (such as Rectangle, BoundingBox, and BoundingSphere), for doing vector and matrix operations, and much more.
Know where you stand:
Are you just interested in creating casual games, or do you want to enter the game industry as a creator of sophisticated pieces of software? You'll need to study and practice different things for each case.
Consider extending the Content Pipeline:
Animating 3D models is far easier to do with modeling tools than in XNA. Don't let the Content Pipeline's lack of native support for animations hold you back! Also consider creating helper tools to position 3D objects in your scenes. You can save those configurations to a file, and then write Content Pipeline extensions to read them.
Keep on coding:
The bad news is that your first few games will probably be crap—everyone starts out with some bad games. The fact is that creating games is something that you learn, exclusively, by creating games. The good news is that with XNA, you can create a new game every week. So what you are waiting for?
Write games, not engines:
The best way to stay motivated is to see the actual results of your work. Create a simple game, and then improve and polish it until it's ready to be the new LIVE Community Game blockbuster!

We recommend that you go back and have a quick look at each chapter's summary, so you can refresh your memory about the material presented, and note topics that you didn't understand well or want to revisit.

And remember that you can find the most recent code for this book's examples, as well as any text and code errata at the Apress web site (http://www.apress.com). Just go to this book's details page, and click the appropriate link.

When you're sure that you've gotten everything you can from this book, you can proceed further.

Where Do You Go from Here?

If you search for "XNA" in any common Internet search engine, you'll get (as of February 2009) around four million hits. When you narrow down the search to "XNA Tutorial," you'll get about half a million results, without quotation marks, and about thirty thousand results with them. So, forget about searching the Internet for your next steps, unless you know exactly what you need!

Riemer Grootjans presents a variety of XNA tutorials that may help you go a step further in exploring new XNA horizons at his site (http://www.riemers.net). We also recommend Riemer's excellent XNA 3.0 Game Programming Recipes book (Apress, 2009).

Note If you are interested in creating casual games, and read Portuguese, you'll find some tutorials, news, and samples at the Sharp Games community site (http://www.sharpgames.net), coordinated by José Leal de Farias, and dozens of presentations and simple XNA examples at Alexandre Lobão's site (http://www.AlexandreLobao.com). Note that while the sites are in Portuguese, the code samples comments are mostly in English.

At Bruno Evangelista's site (http://www.brunoevangelista.com/), you'll find more elaborate 3D code, sophisticated shader examples, an improved version of the 3D shooter game we created in this book, and much more. Another excellent way to learn more about shaders is by following the thread at the XNA Creators Club site (http://forums.xna.com/thread/24109.aspx), where many people have posted links to basic to advanced shaders tutorials.

In fact, for good examples of any XNA techniques, the XNA Creators Club (http://creators.XNA.com) should always be your starting point. This site has samples for almost anything you'll need for your 2D and 3D games. Explore the samples, and don't forget to download and study all the starter kits, which are complete games that will give you very good starting points for more sophisticated games.

Additionally, CodePlex (http://www.codeplex.com) is another good source for XNA projects, including some open source game engines and components. Just order your view by latest release date and rating, which will present you with the most up-to-date and interesting projects.

Create Your Own Game

As we've said, if you really want to learn XNA, create a game on your own. Of course you can—and are encouraged to—write original games, but as a start, we recommend a simple but fairly interesting game: Tetris.

If you start from the ground up and create your own version of Tetris, you'll exercise many concepts you'll use in every one of your future games. For example, the game calls for a set of classes with different behaviors (each block turns in a different way), but share a common ground (every block falls), so you'll create a hierarchy with a base and derived classes. You'll also need to detect collisions and control the game state, checking for full lines when the blocks fall; deal with user input; code for game end and game scoring; and so on.

An XNA Tetris clone is also a good place to start because you can create it within a couple weeks, so you can stay motivated for your next challenge. This project will give you more insight about the difficulty of creating a game from the ground up. You will understand the complexity of building a game and how each of the game components fits together. And don't forget the roles of a game team we talked about in Chapter 1—even in a simple project like this, you should not limit yourself to just one role!

After creating your Tetris clone, as your next step, consider a game that uses the same concepts, but includes some extra challenges. A good exercise is creating a Breakout clone or a pinball game. For this type of game, you use the concepts from Tetris, plus sound, some advanced collision-detection algorithms, and some animated sprites.

Tip You can find a simple Breakout clone at Alexandre Lobão's site (http://www.alexandrelobao.com/Jogos/Alexandre_Lobao-Palestras_Jogos.asp), coded with less than 100 lines, which surely is a good starting point to create something new. For example, you might include bonus bricks or extra levels, to better understand and explore XNA's basic features. And if you think that 100 lines are too few for a game, think again: The Brazilian version of the Xbox 360 magazine published a simpler version for this game, with around 40 lines! That's what XNA is about!

If you are interested in 3D games, consider creating a 3D version of Tetris, Breakout, or a pinball game. Such games are good learning tools because, although they use 3D objects, you can still use simplified, 2D-like versions of the collision-detection algorithm. After you "break the ice" with such simple 3D games, it will be time to try something harder. Consider creating a simple flight simulator, where you control the plane flying around buildings and maybe shooting at some of them!

After that, we suggest you create a network-enabled version of the Pong game. The game logic and graphics are simple, so you can concentrate on the networking details.

The next step is to create a game that involves some artificial intelligence concepts, such as a Pac Man clone. Search for "A-Star path finding algorithm" on the Internet. You'll find many implementations of this algorithm, which guides the ghosts through the labyrinth right to the player character.

When you finish this . . . well, you get the idea. Start by defining your goal—a simple but complete game—and stick with it until you're finished. Don't choose too bold an objective, or you might get tired of programming before you complete the game. Again, you don't need to create an original game at this point. Just work on a clone for a well-known game. After your first game, choose another simple game, so you explore new concepts with each project.

We can't stress enough the importance of creating your own real games as a way to learn XNA. Don't start by analyzing samples or by trying to collect code on the Internet to create your own game engine, including everything you might need for a game. Too many people out there are creating samples, components, and game engines with XNA, and too few are creating real games, even simple ones.

Keep on creating new games, looking for bright new ideas, and exploring new concepts in game creation. But never forget the golden rule for any game: a game, no matter how simple or how sophisticated it is, must be fun. So keep on playing, keep on coding, and you'll be on the right track!

Happy XNA coding!

Image

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.143.5.201