Auxiliary class -- Overview

Source: Internet
Author: User
Overview

In the Helper namespace, I usually put many useful gadgets and classes that have become quite useful over time. For a single project, it may not be the most important or most valuableCodeBut because it can be used over and over again, no matter whether the rest of the engine is changed or not, the helper class will be the most stable part of your engine and engineering projects. Most helper classes do not deal with too many gamesProgramAnd is useful for other engineering projects and even websites.

You have read the previous chapter, and you can write a complete game without using any helper class, even without any additional files or classes. However, as the project grows bigger, you will see many repeated style and similar problems that have been solved in the past. Generally, most of the reusable functions in xNa are graphic components. In the next chapter, especially the second part of this book, you will learn more about game components and image engines. This section focuses on basic functions such as recording information, accessing game content, conducting effective unit tests, how to generate random numbers, and many other small issues.

To make this chapter a little more exciting, you also create the next game to entertain. Not all helper classes will be used, but building a game engine is not a simple task. For this reason, this chapter and the next chapter start with helper classes and game components, so it is easier to develop your image engine in the second part of this book. Note that I did not use this method to compile the auxiliary classes presented in this Chapter; they are the product of evolution over the past few years. For example, you only need to add functions or your own helper classes when you need them. If you solve a problem and think it may not be useful again, just remove its location. However, if you find that you have copied the scheme multiple times to a new project, or maybe another class, you should carefully extract the logic and put them into a special class.

In addition, you will learn more about the content pipelines used in the previous chapters to support Xbox 360. Loading the texture or shader directly without using the content pipeline is also feasible, but all these methods can only work on the Windows platform. If you want to create a cross-platform game, make sure that all compilation and work on Windows and Xbox 360 are normal. Throughout this book, you will continue to do this.

at the end of this chapter, you will quickly develop an interesting breakout clone game. It is much simpler than the previous chapter, because you will first write all the helper classes. For example, it is very easy to use the spritehelper class to render the genie. In the next section, you can find more helper classes and game components to improve Pong and breakout 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.