XNa advanced programming: Xbox 360 and Windows 3-10

Source: Internet
Author: User
3.10Summary

In this chapter, you have learned a lot of classes that will be useful in future projects. Unit testing is also an important knowledge point. It is a good choice to start game development by writing unit tests. This chapter introducesBreakoutGame. This chapter contains a lot of content, but fortunately you can skip someBreakoutGame knowledge points, because many parts can be reused in the previous chapterPongGame.

The next chapter focuses on game programming and describes how to use components to build a game. This chapter describes the benefits of using helper classes. You need to introduce this idea to actual games.CodeThis is very important for more complex games.

The following is a summary of this chapter:

  • Use as many helper classes as possible to encapsulate the code that will be used multiple times into methods or helper classes.
  • Write the unit test first, and then perform the specific implementation.
  • Unit testing should be simple. You do not have to waste time designing unit tests that are complex for helper classes, or design static unit tests that are more complex than the game itself. Unit testing is not important for the final game (you can use# If debugCommand to exclude them), they just make your work easier, help you test and reuse new and old code.
  • Each time you modify the code, you must run the unit test to ensure that no problem exists:
    • UseTestdriven. netRun a single test, or run each test in each class or namespace in Solution Explorer
    • Or useNunit GuiTestProgramAll unit tests in a set. For static unit tests, useProgramClass for manual testing
    • Test the most complex parts of the game as much as possible, suchBreakoutCollision Detection in games

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.