Game Theory (II)-Composition of games

Source: Internet
Author: User

Game Theory (II)

-- Game Composition

This chapter describes the components of a game. This is just a game division solution, that is, the game is composed of commands, classes, and systems. Of course, there are other Division schemes. This division scheme is used in this thesis.

Command

Commands are a way for players to change the game world. They correspond to some changes in the game world. A command is composed of the required parameters and the command processing method. The command processing method is a program (not necessarily a computer program, it should be understood as a job to be done), indicating the player's real-world-computer or person (if it is a chess board or chess piece) -- the job that should be done can only change the game world, that is, change the value of the game element.
In a chess game, there is only one command-move the pawns. The parameters required for this command are the moved pawns and the moving target positions. The processing method is to judge the legality of this command based on the chess rule (that is, whether the moving route is feasible for the moved chess piece according to the chess rule-for example, if the horse goes through the Japanese lattice, whether the destination to be moved is occupied by the pawns and whether the pawns are to be taken in this round. If not, the command is terminated. If it is valid, change the position of the removed chess piece to the target position. If the target position has a chess piece, the chess piece disappears. Finally, let the opponent play the game.
According to the above statement, we can see that the game elements of chess have at least the following game elements:
Position of a piece.
Whether a piece is alive.
The type of a piece.
Which party should play the game.
There is only one command for playing chess, but during regular matches, there is also the time note command, that is, to write down the time between this step and the previous step. Therefore, this type of chess has two more game elements-time and time used by each step. It should be noted that the time here is not the rules of the chess game, but the additional game elements caused by the fact that the chess players implement the chess rules in our four-dimensional space. If you agree that there is no time limit, that is, even two or three years before taking a step, then this chess game element does not have time.
Therefore, to find out the game elements, you only need to find all the game commands and then analyze the processing methods of each command. The changed content in the processing method is the game element. In general, commands are what players are allowed to do.

Class

Classes are the meanings of classes. They share the same meanings as classes in object-oriented programming. They have multiple attributes and rules. A combination of values of each attribute is called an instance of a class or an object. For example, if a table class has two attributes: the number of table feet and the color, an instance of this class may be four feet, red, then we can say that this instance represents a red table with four feet.
People have poor memory and cannot remember ever-changing things, such as a painting. However, when people often need to see something, they can find its rough information, so they come up with a category. People classify all kinds of things they have seen, so that when people see something, they no longer think about what it is, but think about what it is. Because the number of types is much less than the number of things, people can quickly find what they want and get a rough picture of the object. It should be noted that when the types are subdivided, there will be no types, or a type can be considered as an object.
In a chess game, as described above, there are the following game elements:
1. Position of a piece.
2. Whether a piece is alive.
3. Types of a piece.
4. Which player should play the game.
The game elements 1, 2, and 3 logically represent the state of the same thing (pawn), so here we should define a class-pawn. There are three attributes: location, survival, and type. In this way, we can say that this chess game has only 33 game elements (32 chess pieces), and it seems simpler to have 97 game elements.
Note that the existence of a class is not necessary. It is defined manually to give people a better understanding of the game rules, just to make the various game elements reasonable. So different people can define different classes. It seems that classes do not make much sense. Fortunately, most people often have definitions of most of the same classes, such as chess, almost everyone subconsciously decides the pawns. For complex games, such as RPG games, some people only choose to add magic medicines and blood medicines, while some people choose medicines, you can add blood, magic values, fire attributes, and so on, and treat them as a class without subdivision. Generally, the latter is a programmer while the former is a player.
It should also be found that the game rules do not define any classes, but after all, the game rules are mostly set by people, so classes are used in a large number of descriptions of the rules. Almost any chess game has the pawns.
Some rules are specific to a class. We call these rules the rules of this class. For example, a horse in chess involves the type attribute of the pawns. Here we have a question: Which class does this rule belong. Because some rules may involve attributes of multiple classes, such as in an RPG Game, after a player attacks an enemy, the enemy's life value minus the player's attack strength. The attribute of the player's attack power and the attribute of the enemy's life value are involved here. In this case, we believe that the subject of a rule is the attribute of the class and the rule of the class. Therefore, the above rules should be enemy rules.

System

With the improvement of people's quality of life, they began to need the spirit. With the advent of game consoles, more and more game implementation means have led to the development of the game. However, due to technical limitations, the development of the game in depth has stagnated for a period of time, and horizontal development has started, and the system has emerged in the game.
To make the game more playable, it is necessary to increase the complexity of the rules, that is, the definition of a large number of commands and classes. However, because most games are designed to be executed on game consoles, functional limitations make the game not too complex, that is, the development in depth is limited. Therefore, when designing a game, design two games, some rules are provided to associate the two games and switch between them. It seems that we played cards and lost tables. Playing cards is a game, drilling tables is a game, and the association between them is that players who have lost in playing cards play the drilling table game, which increases the complexity of the game horizontally.
Through the above analysis, we can see that the system is a game with its own commands and classes, but it maintains a more or less relationship with the game or other systems in the game. According to the definition, the system can have subsystems and subsystems to form a tree structure. The system that serves as the root of a tree is called an entry system. The first rule for a game to start running is always the rule of the entry system.
The entrance system of the above-mentioned Drill table is playing cards, and the drill table is a sub-system of playing cards. Generally, in computer or TV games, it is an interface for choosing to start, read files, and options at the very beginning. This is actually a system and the entry system of the game. What a player can do is to select an instruction (start the game, read the file, and exit) and execute it. The option dialog box is actually a system. So almost all electronic games are multi-system games.
During game design, it is recommended that the parent system do not use classes and commands defined by subsystems. subsystems can use classes and commands defined by the parent system. It doesn't mean you have to follow this rule, but it seems organized and hierarchical.

Summary

Previously we defined commands, classes, and systems to allow us to better grasp the rules of a game. Some rules in a game rule we think are defining a command. We can say that the game defines a command and then removes the rules that describe the command, to simplify the rules of the game. The same is true for classes and systems, just to simplify the description of the game's rules and make it easier to understand.
Think of a game as a tree. The root node of the tree represents the Entry System of the game. The entry system is composed of its subsystems. Each system contains its own commands and class definitions. However, note that the depth of the game is not to say that the number of layers of the tree increases, but that the rules inside a node of the tree are complicated. Although horizontal development and vertical development of the game can increase the playability of the game, the quality of horizontal development and horizontal development is lower than that of vertical development, this will be shown in later sections.

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.