CN102035857A - Method for simulating group self-organization behaviors of multiple game characters - Google Patents

Method for simulating group self-organization behaviors of multiple game characters Download PDF

Info

Publication number
CN102035857A
CN102035857A CN2010106244478A CN201010624447A CN102035857A CN 102035857 A CN102035857 A CN 102035857A CN 2010106244478 A CN2010106244478 A CN 2010106244478A CN 201010624447 A CN201010624447 A CN 201010624447A CN 102035857 A CN102035857 A CN 102035857A
Authority
CN
China
Prior art keywords
information
packet
data center
field
type
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN2010106244478A
Other languages
Chinese (zh)
Other versions
CN102035857B (en
Inventor
黄文海
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Pixel Software Technology Co Ltd
Original Assignee
Beijing Pixel Software Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Pixel Software Technology Co Ltd filed Critical Beijing Pixel Software Technology Co Ltd
Priority to CN 201010624447 priority Critical patent/CN102035857B/en
Publication of CN102035857A publication Critical patent/CN102035857A/en
Application granted granted Critical
Publication of CN102035857B publication Critical patent/CN102035857B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention discloses a method for simulating the group self-organization behaviors of multiple game characters, which comprises the following steps that: a game simulating system comprising a blackboard data center and at least two independent game character simulating terminals is preset; each game character simulating terminal in the game simulating system respectively establishes transmission control protocol (TCP) connection with the blackboard data center; and the game character simulating terminal performs group interaction with other game character simulating terminals in the game simulating system through the TCP connection with the blackboard data center and according to an interactive policy stored in the game character simulating terminal. By the method, the complicated group self-organization behaviors of a large number of game characters can be effectively simulated, and various requirements of a game test are met.

Description

A kind of method of simulating colony's self-organizing behavior of a plurality of game roles
Technical field
The present invention relates to network communications technology field, particularly a kind of method of simulating colony's self-organizing behavior of a plurality of game roles.
Background technology
In the development process of online game, often need align online game under development and carry out corresponding game test, with the correctness and the stability of the systemic-function of authentication server or client.In the test process of online game, generally all wish to have the game role (be the game role of operating by game user in the online game, also can be described as player role) of some levels to participate in test, to improve the accuracy of test.But, can't frequently and effectively organize outside game user to participate in such recreation test on stream usually, and the tester's of development company inside limited amount, the more player role of operation amount is finished test simultaneously.Under this condition, robot simulation's technology of a kind of simulation user operate game role is arisen at the historic moment.
In the prior art, more common implementation method is: set in advance a plurality of robots, a game role by the game user operation in online game all simulated respectively by each robot; Then, control all robots simultaneously by a control system, the state of each game role in the computing network recreation one by one, then according to result of calculation to each robot sending controling instruction, control each robot and move, thereby finish test online game according to result of calculation.
But, in above-mentioned method, owing to be the group interaction management that in same control system, realizes between all robots, each robot is the group interaction order (being control command) of executive control system transmission passively, and can not carry out alternately with control system, and can not realize interaction between the robot and exchange, therefore the behavior of the robot game role of simulating is stiff, lack otherness, can't produce groups' behavior between the game role of each simulation, therefore be difficult to simulate colony's self-organizing behavior (various interbehaviors in promptly playing between each game role of the complexity between a large amount of game roles, for example, chat, form a team, fight side by side, marry etc.), thus be difficult to satisfy the needs that recreation is tested.In addition, in the said method in the prior art, the integrated level of above-mentioned control system is very high, is difficult for revising, and customizability is poor, therefore also can't satisfy changeable game function testing requirement.
Summary of the invention
In view of this, the invention provides a kind of method of simulating colony's self-organizing behavior of a plurality of game roles.By using said method, the various demands that recreation is tested are satisfied in the colony's self-organizing behavior that can simulate the complexity between a large amount of game roles.
According to above-mentioned purpose, technical scheme of the present invention is achieved in that
A kind of method of simulating colony's self-organizing behavior of a plurality of game roles, this method comprises:
Set in advance and comprise the independently recreation analogue system of game role pseudo-terminal of a blackboard data center and at least two;
Each game role pseudo-terminal in the described recreation analogue system is set up TCP with described blackboard data center respectively and is connected;
Described game role pseudo-terminal is connected by the TCP with described blackboard data center, and according to the interactive strategy that is stored in the described game role pseudo-terminal, carries out group interaction with other game role pseudo-terminals in the described recreation analogue system.
Described and described blackboard data center sets up TCP and is connected and comprises:
Described blackboard data center when starting or afterwards, the port numbers A on the monitoring service device IP address;
Each game role pseudo-terminal sends the TCP connection request to preassigned server ip address and port numbers A when starting;
The TCP connection request that described blackboard data center receives according to the port numbers A from the server ip address of being monitored is set up TCP with the game role pseudo-terminal that sends described TCP connection request and is connected.
Described basis is stored in the interactive strategy in the described game role pseudo-terminal, carries out group interaction with other game role pseudo-terminals and comprises:
Described game role pseudo-terminal is connected the packet that carries operation information to the transmission of blackboard data center according to the interactive strategy that is stored in the described game role pseudo-terminal by the TCP with blackboard data center;
The type of received packet is known by analysis in described blackboard data center, and according to the type and the operation information in the packet of packet the group interaction information of storing in the blackboard data center is operated.
Described game role pseudo-terminal is connected by the TCP with described blackboard data center, and according to the interactive strategy that is stored in the described game role pseudo-terminal, carries out group interaction with other game role pseudo-terminals and comprise:
Described game role pseudo-terminal is connected to described blackboard data center by the TCP with blackboard data center and writes group interaction information;
Perhaps, described game role pseudo-terminal is connected from described blackboard data center by the TCP with blackboard data center and reads required group interaction information;
Perhaps, described game role pseudo-terminal is connected the deletion group interaction information from described blackboard data center by the TCP with blackboard data center.
Described game role pseudo-terminal is connected by the TCP with blackboard data center and writes group interaction information to described blackboard data center and comprise:
Described game role pseudo-terminal is connected by the TCP with blackboard data center, sends the writing information packet that carries group interaction information to described blackboard data center;
After described blackboard data center receives the said write information packet, know the type of said write information packet;
Described blackboard data center reads group interaction information from the said write information packet, and with the group interaction information stores that read in described blackboard data center.
At least comprise in the described group interaction information: information type, information index and the information content.
Comprise in the said write information packet: packet size field, type of data packet field, character string size field, information type field, information index size field, information index field, information cache size field, information cache field; Wherein,
Described packet size field, the size of expression packet;
Described type of data packet field, the type of expression packet;
Described character string size field, the size of expression information type field;
Described information type field, the expression information type is used to distinguish different types of group interaction information;
Described information index size field, the size of expression information index field;
Described information index field is used to distinguish the information contents different under the same information type;
Described information cache size field is used to represent the size of described information cache field;
Described information cache field is used to carry group interaction information.
Described blackboard data center knows that the type of said write information packet comprises:
Described blackboard data center is according to the content of type of data packet field in the said write information packet and packet size field, and the type of knowing this packet is the writing information packet.
Described blackboard data center reads group interaction information and comprises from the said write information packet:
Read group interaction information in information type field, information index field and the information cache field of described blackboard data center from the said write information packet.
This method further comprises:
An information type Hash mapping table and at least one information content Hash mapping table are set in described blackboard data center;
Wherein, described information type Hash mapping table is used for storing the information type of group interaction information, and described information content Hash mapping table is used for storing the information index and the information content of group interaction information; Each bar record in the described information type Hash mapping table is corresponding to an information content Hash mapping table; Each bar record in the described information content Hash mapping table corresponding to an information index and with described information index information corresponding content.
Described blackboard data center comprises the group interaction information stores that read in described blackboard data center:
Described blackboard data center searches corresponding information content Hash mapping table according to the information type in the group interaction information that is read from self canned data type Hash mapping table;
Corresponding information index is searched according to the information index in the described group interaction information by described blackboard data center from the information content Hash mapping table that finds, and uses the information content in the described group interaction information to replace the pairing information content of information index that finds.
This method also further comprises:
When described blackboard data center fails to find corresponding information content Hash mapping table from information type Hash mapping table, described blackboard data center joins the information type in the group interaction information that is read in information type Hash mapping table, and according to the newly-built information content Hash mapping table of described information type; The information index in the group interaction information that is read and the information content are stored in the newly-built information content Hash mapping table.
This method also further comprises:
When described blackboard data center failed to find corresponding information index from the information content Hash mapping table that finds, described blackboard data center added the information index in the group interaction information that is read and the information content in the described information content Hash mapping table that finds to.
Described game role pseudo-terminal is connected by the TCP with blackboard data center and reads required group interaction information from described blackboard data center and comprise:
Described game role pseudo-terminal is connected by the TCP with blackboard data center, sends to described blackboard data center and reads information packet;
Described blackboard data center receive described read information packet after, know the described type that reads information packet;
Described blackboard data center is according to the described information packet that reads, from the group interaction information of being stored, read the required group interaction information of game role pseudo-terminal, and the return information packet that will carry the group interaction information that reads to some extent sends to this game role pseudo-terminal;
Described game role pseudo-terminal obtains required group interaction information from the return information packet that receives.
Described reading in the information packet comprises at least: information type, information content and information index.
Described reading in the information packet comprises: packet size field, type of data packet field, character string size field, information type field, information content field, information index size field, information index field; Wherein,
Described packet size field, the size of expression packet;
Described type of data packet field, the type of expression packet;
Described character string size field, the size of expression information type field;
Described information type field, the expression information type is used to distinguish different types of group interaction information;
Described information content field is represented the quantity n of the required group interaction information that reads;
Described information index size field, the size of expression information index field;
Described information index field is used to distinguish the information contents different under the same information type.
Described blackboard data center knows that the described type that reads information packet comprises:
Described blackboard data center is according to the described type of data packet field in the information packet and the content of packet size field of reading, and the type of knowing this packet is for reading information packet.
Described blackboard data center is according to the described information packet that reads, from the group interaction information of being stored, read the required group interaction information of game role pseudo-terminal, and the return information packet that will carry the group interaction information that reads to some extent sends to this game role pseudo-terminal and comprises:
Described blackboard data center reads information type, information index and the information content that information packet parses the required group interaction information that reads from described;
Described blackboard data center searches corresponding information content Hash mapping table according to the described information type that parses from self canned data type Hash mapping table;
Described blackboard data center is according to described information index that parses and information content, from the information content Hash mapping table that finds, read group interaction information, and the group interaction information that is read is carried at sends to this game role pseudo-terminal in the return information packet.
This method further comprises:
When described blackboard data center did not find corresponding information content Hash mapping table, it was 0 return information packet that described blackboard data center sends the group interaction information that is read to described game role pseudo-terminal.
Described blackboard data center is according to described information index that parses and information content, from the information content Hash mapping table that finds, read group interaction information, and the group interaction information that is read is carried at sends to this game role pseudo-terminal in the return information packet and comprise:
When the described information content n that parses>0,
Described blackboard data center reads the record that the n bar comprises the information index and the corresponding information content thereof from the information content Hash mapping table that finds, and the record that is read is carried at sends to this game role pseudo-terminal in the return information packet;
Wherein, if the sum of the record in the described information content Hash mapping table less than n, then described blackboard data center reads all records in the described information content Hash mapping table;
When the described information content n that parses is 0,
Described blackboard data center will search from the information content Hash mapping table that finds and the described information index information corresponding content that parses;
When the information index information corresponding content that finds and parse, blackboard data center reads this information content, and the information content that this reads is carried at sends to the game role pseudo-terminal in the return information packet; Otherwise it is 0 return information packet that described blackboard data center sends the group interaction information that is read to described game role pseudo-terminal.
At least comprise in the described return information packet: information type, information content, information index and the information content.
Comprise in the described return information packet: packet size field, type of data packet field, character string size field, information type field, information content field, information index size field, information index field, information cache size field, information cache field; Wherein,
Described packet size field, the size of expression packet;
Described type of data packet field, the type of expression packet;
Described character string size field, the size of expression information type field;
Described information type field, the expression information type is used to distinguish different types of group interaction information;
Described information content field is represented the quantity n of the required group interaction information that reads;
Described information index size field, the size of expression information index field;
Described information index field is used to distinguish the information contents different under the same information type;
Described information cache size field is used to represent the size of described information cache field;
Described information cache field is used to carry group interaction information;
Wherein, when n>0, will comprise n information index size field, a n information index field, a n information cache size field and n information cache field in the then described return information packet, represent entrained n bar group interaction information respectively.
Described game role pseudo-terminal obtains required group interaction information and comprises from the return information packet that receives:
Described game role pseudo-terminal is according to the content of type of data packet field in the received return information packet and packet size field, and the type of knowing this packet is the return information packet;
Parse the information index and the information content of information content and required each bar group interaction information in information content field, information index field and the information cache field of described game role pseudo-terminal from described return information packet.
This method also further comprises:
Described game role pseudo-terminal is with in group interaction information stores to the information array of being obtained.
Described game role pseudo-terminal is connected from described blackboard data center deletion group interaction information by the TCP with blackboard data center and comprises:
Described game role pseudo-terminal is connected by the TCP with described blackboard data center, sends the deletion information packet of the group interaction information that carries required deletion to described blackboard data center;
After described blackboard data center receives described deletion information packet, know the type of this deletion information packet;
Described blackboard data center parses the information type and the information index of the group interaction information of required deletion from described deletion information packet;
Described blackboard data center is according to information type of being resolved and information index, the group interaction information of the required deletion of deletion from the group interaction information of being stored.
At least comprise in the described deletion information packet: information type, information index and the information content.
Comprise in the described deletion information packet: packet size field, type of data packet field, character string size field, information type field, information index size field, information index field; Wherein,
Described packet size field, the size of expression packet;
Described type of data packet field, the type of expression packet;
Described character string size field, the size of expression information type field;
Described information type field, the expression information type is used to distinguish different types of group interaction information;
Described information index size field, the size of expression information index field;
Described information index field is used to distinguish the information contents different under the same information type.
After described blackboard data center receives described deletion information packet, know that the type of this deletion information packet comprises:
Described blackboard data center knows that according to the content of type of data packet field in the described deletion information packet and packet size field the type of this packet is the deletion information packet.
Described blackboard data center parses the group interaction information of required deletion from described deletion information packet information type and information index comprise:
Described blackboard data center from described deletion information packet the information type field and the information index field in read the information type and the information index of the group interaction information of required deletion.
Described blackboard data center is according to information type of being resolved and information index, and the group interaction information of the above-mentioned required deletion of deletion comprises from the group interaction information of being stored:
Described blackboard data center searches corresponding information content Hash mapping table according to the information type of being resolved from self canned data type Hash mapping table;
If do not find corresponding information content Hash mapping table, then stop to carry out follow-up step;
If find corresponding information content Hash mapping table, then blackboard data center will search from the information content Hash mapping table that finds and the information index information corresponding content of being resolved;
If do not find corresponding information content Hash mapping table, then stop to carry out follow-up step;
If find the corresponding information content, then the information content that finds will be deleted by blackboard data center from the above-mentioned information content Hash mapping table that finds.
As from the foregoing, the invention provides a kind of method of simulating colony's self-organizing behavior of a plurality of game roles, because in the method, comprise the independently recreation analogue system of game role pseudo-terminal of a blackboard data center and at least two with setting in advance, and each game role pseudo-terminal will be set up TCP with blackboard data center respectively and be connected, then, described game role pseudo-terminal is connected by the TCP with blackboard data center, and according to the interactive strategy that is stored in the described game role pseudo-terminal, carry out group interaction with other game role pseudo-terminals, thereby can simulate colony's self-organizing behavior of the complexity between a large amount of game roles effectively, satisfy the various demands of recreation test.
Description of drawings
Fig. 1 is the method flow diagram of colony's self-organizing behavior of a plurality of game roles of simulation of the present invention.
Fig. 2 is the structure information storage schematic diagram of blackboard data center among the present invention.
Embodiment
In order to make the purpose, technical solutions and advantages of the present invention clearer, below lift specific embodiment and, the present invention is described in more detail with reference to accompanying drawing.
The invention provides a kind of method of simulating colony's self-organizing behavior of a plurality of game roles, in the method, comprise the independently recreation analogue system of game role pseudo-terminal of a blackboard data center and at least two with setting in advance, and each game role pseudo-terminal will be set up transmission control protocol (TCP) with blackboard data center respectively and be connected, then, described game role pseudo-terminal is connected by the TCP with blackboard data center, and according to the interactive strategy that is stored in the described game role pseudo-terminal, carry out group interaction with other game role pseudo-terminals, thereby can simulate colony's self-organizing behavior of the complexity between a large amount of game roles effectively, satisfy the various demands of recreation test.
Fig. 1 is the method flow diagram of colony's self-organizing behavior of a plurality of game roles of simulation of the present invention.As shown in Figure 1, the method for colony's self-organizing behavior of a plurality of game roles of described simulation comprises step as described below:
Step 101 sets in advance and comprises the independently recreation analogue system of game role pseudo-terminal of a blackboard data center and at least two.
In this step, will set in advance a recreation analogue system, in this recreation analogue system, comprise independently game role pseudo-terminal of a blackboard data center and at least two.Wherein, each game role pseudo-terminal is simulated a game role by the game user operation in online game respectively.
Step 102, each game role pseudo-terminal is set up TCP with blackboard data center respectively and is connected.
In this step, each the game role pseudo-terminal in the described recreation analogue system will be set up TCP with blackboard data center respectively and be connected.For example, in specific embodiments of the invention, the process that the above-mentioned TCP of foundation connects can comprise step as described below:
1.1) blackboard data center when starting or afterwards, the port numbers A on the monitoring service device IP address.
Specifically, when blackboard data center starts or afterwards, this blackboard data center will monitor the port numbers A on the server ip address.
1.2) each game role pseudo-terminal when starting, all will send the TCP connection request to preassigned server ip address and port numbers A;
Wherein, above-mentioned server ip address and port numbers A will specify and send to this game role pseudo-terminal by system or user by the mode of command line parameter when the game role pseudo-terminal starts.
1.3) TCP connection request that blackboard data center receives according to the port numbers A from the server ip address of being monitored, set up TCP with the game role pseudo-terminal that sends described TCP connection request and be connected.
Step 103, the game role pseudo-terminal is connected by the TCP with blackboard data center, and according to the interactive strategy that is stored in the described game role pseudo-terminal, carries out group interaction with other game role pseudo-terminals.
When blackboard data center and game role pseudo-terminal are set up after TCP is connected, game role pseudo-terminal in the described recreation analogue system can carry out transfer of data with blackboard data center by this TCP connection, promptly write request, information deletion request and/or information to blackboard data center transmission information and read request by this TCP connection, and pass through the data that this TCP connects the transmission of reception blackboard data center, thereby other game role pseudo-terminals in realization and the described recreation analogue system carry out group interaction.
Therefore, in this step, above-mentioned basis is stored in the interactive strategy in the described game role pseudo-terminal, carries out group interaction with other game role pseudo-terminals and can be:
The game role pseudo-terminal is connected the packet that carries operation information to the transmission of blackboard data center according to the interactive strategy that is stored in the described game role pseudo-terminal by the TCP with blackboard data center;
The type of received packet is known by analysis in blackboard data center, and according to the type and the operation information in the packet of packet the group interaction information of storing in the blackboard data center is operated.
Specifically, according to the interactive strategy that is stored in the described game role pseudo-terminal, carry out group interaction with other game role pseudo-terminals and can be:
The game role pseudo-terminal is connected to blackboard data center by the TCP with blackboard data center and writes corresponding group interaction information;
Perhaps, the game role pseudo-terminal is connected from blackboard data center by the TCP with blackboard data center and reads required group interaction information;
Perhaps, the game role pseudo-terminal is connected from blackboard data center by the TCP with blackboard data center and deletes corresponding group interaction information.
Below will further introduce in the mode of specific embodiment.
Embodiment one,
In specific embodiments of the invention, above-mentioned game role pseudo-terminal is connected by the TCP with blackboard data center and writes corresponding group interaction information to blackboard data center and can comprise step as described below:
2.1) the game role pseudo-terminal is connected by the TCP with blackboard data center, sends the writing information packet that carries group interaction information to blackboard data center;
In this step, comprise at least in the described group interaction information: information type, information index and the information content.Wherein, information type and information index are character string types.
For example, in specific embodiments of the invention, the said write information packet can be used packet structure as shown in the table:
Field name Field size, type The field implication
Packet size (nPacketSize) 2 bytes, short The size of expression packet
Type of data packet (nCmd) 2 bytes, short The type of expression packet
Character string size (nTypeSize) 2 bytes, short The size of expression information type character string
Information type (szTypeName) NTypeSize byte, character string The expression information type
Information index size (nKeySize) 2 bytes, short The size of expression information index character string
Information index (szKeyName) The nKeySize byte, character string The information index of expression information
Information cache size (nValueSize) 2 bytes, short The size of expression information cache
Information cache (pValueBuffer) The nValueSize byte, buffering area Represent required information of carrying
Table 1
Wherein, packet size (nPacketSize) field list in the above-mentioned table 1 shows the size of packet, can be used for cutting apart different message bags.The size of data of different types bag can be inequality, therefore, all has this field in the packet of any kind, can know the size of this packet by this field;
Type of data packet (nCmd) field, the type of expression packet all has this field in the packet of any kind, can know the type of this packet by this field.For example, when the value of nCmd field is eMsgType_Write, represent that this packet is a kind of writing information packet;
Character string size (nTypeSize) field, the size of expression information type field;
Information type (szTypeName) field is a character string, and the expression information type is used to distinguish different types of group interaction information;
Information index size (nKeySize) field, the size of expression information index field;
Information index (szKeyName) field is a character string, is used to distinguish the information contents different under the same information type.For example, can the name of the game role pseudo-terminal game role of being simulated in the information index field, show that this packet is the information that is write by certain game role pseudo-terminal.In specific embodiments of the invention, the content of described information index field can be not limited to the name of game role pseudo-terminal.
Information cache size (nValueSize) field is used to represent the size of information cache field;
Information cache (pValueBuffer) field is used to carry concrete group interaction information.Group interaction information in this field does not have concrete call format, therefore, can fill required group interaction information of carrying arbitrarily in this field.
2.2) after blackboard data center receives the said write information packet, know the type of this writing information packet;
In this step, the type of this packet can be known according to the type of data packet field in this writing information packet in blackboard data center after receiving the said write information packet.For example, if use packet structure as shown in table 1, then blackboard data center can be according to the content of type of data packet field in this writing information packet and packet size field, and the type of knowing this packet is the writing information packet.
2.3) blackboard data center reads group interaction information from the said write information packet;
In this step, if use packet structure as shown in table 1, then blackboard data center can read corresponding group interaction information from the information type field the writing information packet, information index field and information cache field, and this group interaction information comprises: information type, information index and the information content.
2.4) blackboard data center with the group interaction information stores that read in blackboard data center.
In specific embodiments of the invention, an information type Hash mapping table and at least one information content Hash mapping table are set in described blackboard data center.Wherein, information type Hash mapping table is used for storing the information type of group interaction information, and information content Hash mapping table is used for storing the information index and the information content of group interaction information.
Fig. 2 is the structure information storage schematic diagram of blackboard data center among the present invention.As shown in Figure 2, each the bar record in the described information type Hash mapping table is all corresponding to an information content Hash mapping table; And the record of each bar in the information content Hash mapping table all corresponding to an information index and with this information index information corresponding content.
Therefore, in this step, blackboard data center can be with group interaction information stores that it read in blackboard data center.For example:
Blackboard data center can be earlier searches corresponding information content Hash mapping table according to the information type in the group interaction information that is read from self canned data type Hash mapping table;
Then, from the information content Hash mapping table that finds, search corresponding information index, and use the information content in the above-mentioned group interaction information to replace the pairing information content of information index that finds according to the information index in the group interaction information.
In addition, when blackboard data center fails to find the corresponding information content Hash mapping table when (promptly Dui Ying information content Hash mapping table does not exist) from information type Hash mapping table, then blackboard data center joins the information type in the group interaction information that is read in information type Hash mapping table, and according to the newly-built information content Hash mapping table of this information type; The information index in the described group interaction information and the information content are stored in the newly-built information content Hash mapping table.
In addition, when blackboard data center fails to find corresponding information index when (promptly Dui Ying information index does not exist) from the information content Hash mapping table that finds, then blackboard data center adds the information index in the described group interaction information and the information content in the described information content Hash mapping table that finds to.
Embodiment two,
In specific embodiments of the invention, above-mentioned game role pseudo-terminal is connected by the TCP with blackboard data center and reads required group interaction information from blackboard data center and can comprise step as described below:
3.1) the game role pseudo-terminal is connected by the TCP with blackboard data center, send to blackboard data center and read information packet.
In this step, described reading in the information packet comprises at least: information type, information content and information index.Wherein, information type and information index are character string types.
For example, in specific embodiments of the invention, the described information packet that reads can be used packet structure as shown in the table:
Field name Field size, type The field implication
Packet size (nPacketSize) 2 bytes, short The size of expression packet
Type of data packet (nCmd) 2 bytes, short The type of expression packet
Character string size (nTypeSize) 2 bytes, short The size of expression information type character string
Information type (szTypeName) NTypeSize byte, character string The expression information type
Information content (nCount) 2 bytes, short Expression information content n
Information index size (nKeySize) 2 bytes, short The size of expression information index character string
Information index (szKeyName) The nKeySize byte, character string The information index of expression information
Table 2
Wherein, the information content in the table 2 (nCount) field is represented the quantity n of the required group interaction information that reads, and promptly needs to read n bar group interaction information, and wherein n is a nonnegative integer.The implication of the respective field in the table 2 in the implication of other fields and the table 1 is identical, does not repeat them here.
3.2) blackboard data center receive described read information packet after, know that this reads the type of information packet.
In this step, blackboard data center receive described read information packet after, can read the type that type of data packet field in the information packet is known this packet according to this.For example, if use packet structure as shown in table 2, then blackboard data center can read the type of data packet field in the information packet and the content of packet size field according to this, and the type of knowing this packet is for reading information packet.
3.3) blackboard data center is according to the described information packet that reads, from the group interaction information of being stored, read the required group interaction information of game role pseudo-terminal, and the return information packet that will carry the group interaction information that reads to some extent sends to this game role pseudo-terminal.
In this step, blackboard data center will be at first reads information type, information index and the information content that information packet parses the required group interaction information that reads from described, searches corresponding information content Hash mapping table according to the described information type that parses from self canned data type Hash mapping table then; Then according to described information index that parses and information content, from the information content Hash mapping table that finds, read corresponding group interaction information, and the group interaction information that is read is carried at sends to this game role pseudo-terminal in the return information packet.
For example, blackboard data center can resolve information type, information index and the information content of the required group interaction information that reads from described information type field, information index field and the information content field that reads information packet, and searches corresponding information content Hash mapping table according to the described information type that parses from self canned data type Hash mapping table;
If do not find corresponding information content Hash mapping table, then blackboard data center to send the group interaction information that is read to described game role pseudo-terminal be 0 return information packet;
When finding corresponding information content Hash mapping table, and described information content n>0 that parses o'clock, then blackboard data center will read the record that the n bar comprises the information index and the corresponding information content thereof from the information content Hash mapping table that finds; If the sum of the record in the information content Hash mapping table, then reads all records in this information content Hash mapping table less than n; The record that is read is carried at sends to the game role pseudo-terminal in the return information packet.Wherein, blackboard data center can read the record that the n bar comprises the information index and the corresponding information content thereof by any recording start from the information content Hash mapping table that finds continuously when reading n bar record.In addition, in the process that reads said n bar record continuously, when the last item when record in this information content Hash mapping table of being recorded as of being read, after reading this last item record, will be from article one recording start this information content Hash mapping table, continue to read required record, until having read n bar record or having read all records in this information content Hash mapping table.
When finding corresponding information content Hash mapping table, and the described information content n that parses is 0 o'clock, then the blackboard data center information index information corresponding content that will search and parse from the information content Hash mapping table that finds; When the information index information corresponding content that finds and parse, blackboard data center reads this information content, and the information content that this reads is carried at sends to the game role pseudo-terminal in the return information packet; Otherwise the group interaction information that blackboard data center is read to described game role pseudo-terminal transmission is 0 return information packet.
Therefore, in this step, blackboard data center comprises in the return information packet that described game role pseudo-terminal sends at least: information type, information content, information index and the information content.Wherein, information type and information index are character string types.
For example, in specific embodiments of the invention, described return information packet can use packet structure as shown in the table:
Field name Field size, type The field implication
Packet size (nPacketSize) 2 bytes, short The size of expression packet
Type of data packet (nCmd) 2 bytes, short The type of expression packet
Character string size (nTypeSize) 2 bytes, short The size of expression information type character string
Information type (szTypeName) NTypeSize byte, character string The expression information type
Information content (nCount) 2 bytes, short Expression information content n
Information index size [1] (nKeySize[1]) 2 bytes, short The size of expression information index character string
Information index [1] (szKeyName[1]) The nKeySize byte, character string The information index of expression information
Information cache size [1] (nValueSize[1]) 2 bytes, short The size of expression information cache
Information cache [1] (pValueBuffer[1]) The nValueSize byte, buffering area Represent required information of carrying
... ... ...
Information index size [n] (nKeySize[n]) 2 bytes, short The size of expression information index character string
Information index [n] (szKeyName[n]) The nKeySize byte, character string The information index of expression information
Information cache size [n] (nValueSize[n]) 2 bytes, short The size of expression information cache
Information cache [n] (pValueBuffer[n]) The nValueSize byte, buffering area Represent required information of carrying
Table 3
Wherein, the information content in the table 3 (nCount) field is represented the information content n that read promptly to represent to have carried in this return information packet n bar group interaction information; When n=0, to represent not carry group interaction information in this return information packet, can ignore other fields after the nCount field this moment; And when n>0, then in this return information packet, will comprise n nKeySize field, a n szKeyName field, a n nValueSize field and n pValueBuffer field, represent entrained n bar group interaction information respectively.The implication of the respective field in the implication of each field of other in the table 3 and table 1 and the table 2 is identical, does not repeat them here.
3.4) the game role pseudo-terminal from the return information packet that receives, obtain required group interaction information.
In this step, the game role pseudo-terminal can be known the type of this packet according to the type of data packet field in this return information packet after receiving described return information packet.
For example, if the return information packet uses packet structure as shown in table 3, then the game role pseudo-terminal can be according to the content of type of data packet field in the return information packet that receives and packet size field, and the type of knowing this packet is the return information packet.
Then, the game role pseudo-terminal then can be from this return information packet obtains required group interaction information.For example, the game role pseudo-terminal can parse the information index and the information content of information content and required each bar group interaction information from the information content field receiving described return information packet, information index field and information cache field.
In addition, the game role pseudo-terminal also can be with in group interaction information stores to the information array of being obtained.If the information content of the group interaction information of being obtained is 0, then this information array is empty.
After this, the game role pseudo-terminal can and be stored in interactive strategy in the described game role pseudo-terminal according to the group interaction information of being obtained, carry out various group interaction behaviors with other game role pseudo-terminal, thereby realize the group interaction between a plurality of game role pseudo-terminals.
Embodiment three,
In specific embodiments of the invention, above-mentioned game role pseudo-terminal is connected by the TCP with blackboard data center to be deleted corresponding group interaction information from blackboard data center and can comprise step as described below:
4.1) the game role pseudo-terminal is connected by the TCP with blackboard data center, sends the deletion information packet of the group interaction information that carries required deletion to blackboard data center;
In this step, comprise at least in the described deletion information packet: information type, information index and the information content.Wherein, information type and information index are character string types.
For example, in specific embodiments of the invention, described deletion information packet can be used packet structure as shown in the table:
Field name Field size, type The field implication
Packet size (nPacketSize) 2 bytes, short The size of expression packet
Type of data packet (nCmd) 2 bytes, short The type of expression packet
Character string size (nTypeSize) 2 bytes, short The size of expression information type character string
Information type (szTypeName) NTypeSize byte, character string The expression information type
Information index size (nKeySize) 2 bytes, short The size of expression information index character string
Information index (szKeyName) The nKeySize byte, character string The information index of expression information
Table 4
Wherein, the implication of the respective field in the above-mentioned table 4 in the implication of each field and table 1~3 is identical, does not repeat them here.
4.2) after blackboard data center receives described deletion information packet, know the type of this deletion information packet;
In this step, the type that type of data packet field in the information packet is known this packet can be deleted according to this by blackboard data center after receiving described deletion information packet.For example, if use packet structure as shown in table 4, then the type of data packet field in the information packet and the content of packet size field can be deleted according to this by blackboard data center, know that the type of this packet is the deletion information packet.
4.3) blackboard data center parses the information type and the information index of the group interaction information of required deletion from described deletion information packet;
In this step, if use packet structure as shown in table 4, then blackboard data center can read the information type and the information index of the group interaction information of required deletion from information type field the deletion information packet and information index field.
4.4) blackboard data center is according to information type of being resolved and information index, the group interaction information of the above-mentioned required deletion of deletion from the group interaction information of being stored.
For example, in specific embodiments of the invention, blackboard data center can be earlier searches corresponding information content Hash mapping table according to the information type of being resolved from self canned data type Hash mapping table;
If do not find corresponding information content Hash mapping table, then stop to carry out follow-up step;
If find corresponding information content Hash mapping table, then blackboard data center will search from the information content Hash mapping table that finds and the information index information corresponding content of being resolved;
If do not find corresponding information content Hash mapping table, then stop to carry out follow-up step;
If find the corresponding information content, then the information content that finds will be deleted by blackboard data center from the above-mentioned information content Hash mapping table that finds.
Below, will be example also with concrete group interaction behavior, technical scheme of the present invention is further introduced.
Embodiment four, group interaction behavior are the specific implementation method of the tourney between the game role.
In the recreation of reality, the tourney between each game role is a kind of important group interaction behavior.Below, will the realization of this group interaction behavior be described in detail.
In specific embodiments of the invention, the tourney operation between the described game role can comprise step as described below:
Step 1, the game role pseudo-terminal that needs to participate in tourney is connected by the TCP with blackboard data center, sends the writing information packet that carries tourney information to blackboard data center.
In this step, can comprise in the described writing information packet that carries tourney information: information type field, information index field and information content field.Wherein, the value of described information type field is match, represents that this group interaction behavior is tourney; The name of the game role that the value of information index field is simulated for this game role pseudo-terminal; The grade of first this game role of byte representation in the described information content field, the occupation of its another this game role of byte representation.
Step 2, the game role pseudo-terminal that needs to participate in tourney is connected by the TCP with blackboard data center, sends the information packet that reads that reads tourney information to blackboard data center.
In this step, describedly read reading in the information packet of tourney information and can comprise: information type field, information content field and information index field.Wherein, the value of described information type field is match; The name of the game role that the value of information index field is simulated for other game role pseudo-terminals or the content of desired seek; When the value n of information content field>0, can ignore the value of information index field; The value of described information content field can be the value (for example, 100) that sets in advance, and represents the quantity of the required tourney information that reads.
Step 3, blackboard data center is according to the information packet that reads of game role pseudo-terminal transmission, from the group interaction information of being stored, read the required tourney information of this game role pseudo-terminal, and carry the return information packet of the tourney information that reads to some extent to this game role pseudo-terminal transmission.
Step 4, receive the return information packet of the tourney information that carries that blackboard data center sends when the game role pseudo-terminal after, if the quantity of tourney information is 0, process ends then; Otherwise, execution in step 5.
Step 5, the game role pseudo-terminal reads tourney information from the return information packet that carries tourney information, according to game role pseudo-terminal of the tourney Information Selection that is read, and to selected game role pseudo-terminal transmission tourney invitation.
Wherein, above-mentioned game role pseudo-terminal is when selecting to carry out the game role pseudo-terminal of tourney, read the information such as name, grade and occupation of each game role pseudo-terminal earlier in the tourney information from the return information packet, and select corresponding game role pseudo-terminal according to filtercondition.Wherein, described filtercondition can be: with the professional identical game role pseudo-terminal of self, and/or and self grade between difference more than or equal to 3 grades game role pseudo-terminal.Then, this game role pseudo-terminal can select a game role pseudo-terminal as the tourney object from the game role pseudo-terminal after filtering, and sends tourney invitation to selected game role pseudo-terminal.
Step 6 is agreed to carry out tourney if receive the game role pseudo-terminal that tourney is invited, and then two game role pseudo-terminals will begin to carry out tourney, process ends; Carry out tourney if receive the game role pseudo-terminal refusal that tourney is invited, then execution in step 7.
Step 7, judge and whether do not send the game role pseudo-terminal that tourney is invited in the game role pseudo-terminal after the above-mentioned filtration in addition, if, then never sending in the game role pseudo-terminal that tourney invites selects a game role pseudo-terminal as the tourney object, and, return step 6 to selected game role pseudo-terminal transmission tourney invitation; Otherwise, return execution in step 2.
By above-mentioned steps 1~7, can finish the tourney between each game role.
Embodiment five, group interaction behavior are the specific implementation method of forming a team between the game role.
In the recreation of reality, forming a team between each game role also is a kind of important group interaction behavior.Below, will the realization of this group interaction behavior be described in detail.
In specific embodiments of the invention, forming a team between the described game role operated and can be comprised step as described below:
Step 1 needs passive game role pseudo-terminal of forming a team to be connected by the TCP with blackboard data center, sends the writing information packet that carries self information to blackboard data center.
In this step, can comprise in the described writing information packet that carries self information: information type field, information index field and information content field.Wherein, the value of described information type field is group, represents that this group interaction behavior is to form a team; The name of the game role that the value of information index field is simulated for this game role pseudo-terminal; The grade of first this game role of byte representation in the described information content field, the occupation of its another this game role of byte representation.
Step 2, the game role pseudo-terminal that requires initiatively to form a team is connected by the TCP with blackboard data center, sends the information packet that reads that reads the information of forming a team to blackboard data center.
In this step, describedly read reading in the information packet of the information of forming a team and to comprise: information type field, information content field and information index field.Wherein, the value of described information type field is group; The name of the game role that the value of information index field is simulated for other game role pseudo-terminals or the content of desired seek; When the value n of information content field>0, can ignore the value of information index field; The value of described information content field can be the value (for example, 100) that sets in advance, and represents the quantity of the required information of forming a team that reads.
In specific embodiments of the invention, do not do any qualification for the execution sequence between above-mentioned steps 1 and the step 2.Described step 1 and step 2 can be carried out simultaneously, also can successively carry out.
Step 3, the game role pseudo-terminal that blackboard data center initiatively forms a team as requested sends reads information packet, from the group interaction information of being stored, read the required information of forming a team of game role pseudo-terminal that this requirement is initiatively formed a team, and carry the return information packet of the information of forming a team that reads to some extent to the game role pseudo-terminal transmission that this requirement is initiatively formed a team.
Step 4, after the game role pseudo-terminal that requires initiatively to form a team receives the return information packet that carries the information of forming a team that blackboard data center sends, if the quantity of the information of forming a team is 0, process ends then; Otherwise, execution in step 5.
Step 5, the game role pseudo-terminal that requires initiatively to form a team reads the information of forming a team from the return information packet that carries the information of forming a team, according at least one the game role pseudo-terminal of Information Selection of forming a team that is read, and send to selected game role pseudo-terminal and to form a team to invite.
Wherein, the game role pseudo-terminal that above-mentioned requirements is initiatively formed a team is when selecting the game role pseudo-terminal of forming a team, read the information such as name, grade and occupation of each game role pseudo-terminal earlier in the information of forming a team from the return information packet, and select corresponding game role pseudo-terminal according to filtercondition.Wherein, described filtercondition can be: the professional ratio of conformance with standard troop (for example, soldier 2 people, Master 2 people, doctor 2 people etc.), and grade than with the difference of the average angle colour gradation of present troop game role pseudo-terminal less than 3 grades.Then, this game role pseudo-terminal can select a game role pseudo-terminal as forming a team object from the game role pseudo-terminal after filtering, and sends to selected game role pseudo-terminal and to form a team to invite.
Step 6 is agreed to form a team if receive the game role pseudo-terminal of forming a team to invite, and then the game role pseudo-terminal that this agreement is formed a team joins in the troop, execution in step 7; Form a team then direct execution in step 7 if receive the game role pseudo-terminal refusal of forming a team to invite.
Step 7 judges whether to finish to form a team, if, process ends then; Otherwise, execution in step 8.
Step 8, judge in the game role pseudo-terminal after the above-mentioned filtration and whether do not send the game role pseudo-terminal of forming a team to invite in addition, if, then never sent and select a game role pseudo-terminal in the game role pseudo-terminal of forming a team to invite as forming a team object, and send to selected game role pseudo-terminal and to form a team to invite, return step 6; Otherwise, return execution in step 2.
By above-mentioned steps 1~8, can finish forming a team between each game role.
By above-mentioned introduction as can be known, in the method for colony's self-organizing behavior of a plurality of game roles of above-mentioned simulation provided by the present invention, comprise the independently recreation analogue system of game role pseudo-terminal of a blackboard data center and at least two owing to will set in advance, and each game role pseudo-terminal will be set up TCP with blackboard data center respectively and be connected, then, described game role pseudo-terminal is connected by the TCP with blackboard data center, and according to the interactive strategy that is stored in the described game role pseudo-terminal, carry out group interaction with other game role pseudo-terminals, thereby can be by the autonomy of robot, simulate colony's self-organizing behavior of the complexity between a large amount of game roles better, satisfy the various demands of recreation test.
The above only is preferred embodiment of the present invention, not in order to restriction the present invention, all any modifications of being made within the spirit and principles in the present invention, is equal to and replaces and improvement etc., all should be included within protection scope of the present invention.

Claims (30)

1. the method for colony's self-organizing behavior of a plurality of game roles of simulation is characterized in that this method comprises:
Set in advance and comprise the independently recreation analogue system of game role pseudo-terminal of a blackboard data center and at least two;
Each game role pseudo-terminal in the described recreation analogue system is set up TCP with described blackboard data center respectively and is connected;
Described game role pseudo-terminal is connected by the TCP with described blackboard data center, and according to the interactive strategy that is stored in the described game role pseudo-terminal, carries out group interaction with other game role pseudo-terminals in the described recreation analogue system.
2. the method for claim 1 is characterized in that, described and described blackboard data center sets up TCP and is connected and comprises:
Described blackboard data center when starting or afterwards, the port numbers A on the monitoring service device IP address;
Each game role pseudo-terminal sends the TCP connection request to preassigned server ip address and port numbers A when starting;
The TCP connection request that described blackboard data center receives according to the port numbers A from the server ip address of being monitored is set up TCP with the game role pseudo-terminal that sends described TCP connection request and is connected.
3. the method for claim 1 is characterized in that, described basis is stored in the interactive strategy in the described game role pseudo-terminal, carries out group interaction with other game role pseudo-terminals and comprises:
Described game role pseudo-terminal is connected the packet that carries operation information to the transmission of blackboard data center according to the interactive strategy that is stored in the described game role pseudo-terminal by the TCP with blackboard data center;
The type of received packet is known by analysis in described blackboard data center, and according to the type and the operation information in the packet of packet the group interaction information of storing in the blackboard data center is operated.
4. the method for claim 1, it is characterized in that, described game role pseudo-terminal is connected by the TCP with described blackboard data center, and according to the interactive strategy that is stored in the described game role pseudo-terminal, carries out group interaction with other game role pseudo-terminals and comprise:
Described game role pseudo-terminal is connected to described blackboard data center by the TCP with blackboard data center and writes group interaction information;
Perhaps, described game role pseudo-terminal is connected from described blackboard data center by the TCP with blackboard data center and reads required group interaction information;
Perhaps, described game role pseudo-terminal is connected the deletion group interaction information from described blackboard data center by the TCP with blackboard data center.
5. method as claimed in claim 4 is characterized in that, described game role pseudo-terminal is connected by the TCP with blackboard data center and writes group interaction information to described blackboard data center and comprise:
Described game role pseudo-terminal is connected by the TCP with blackboard data center, sends the writing information packet that carries group interaction information to described blackboard data center;
After described blackboard data center receives the said write information packet, know the type of said write information packet;
Described blackboard data center reads group interaction information from the said write information packet, and with the group interaction information stores that read in described blackboard data center.
6. method as claimed in claim 5 is characterized in that, comprises at least in the described group interaction information: information type, information index and the information content.
7. method as claimed in claim 5, it is characterized in that, comprise in the said write information packet: packet size field, type of data packet field, character string size field, information type field, information index size field, information index field, information cache size field, information cache field; Wherein,
Described packet size field, the size of expression packet;
Described type of data packet field, the type of expression packet;
Described character string size field, the size of expression information type field;
Described information type field, the expression information type is used to distinguish different types of group interaction information;
Described information index size field, the size of expression information index field;
Described information index field is used to distinguish the information contents different under the same information type;
Described information cache size field is used to represent the size of described information cache field;
Described information cache field is used to carry group interaction information.
8. method as claimed in claim 7 is characterized in that, described blackboard data center knows that the type of said write information packet comprises:
Described blackboard data center is according to the content of type of data packet field in the said write information packet and packet size field, and the type of knowing this packet is the writing information packet.
9. method as claimed in claim 7 is characterized in that, described blackboard data center reads group interaction information and comprises from the said write information packet:
Read group interaction information in information type field, information index field and the information cache field of described blackboard data center from the said write information packet.
10. method as claimed in claim 7 is characterized in that, this method further comprises:
An information type Hash mapping table and at least one information content Hash mapping table are set in described blackboard data center;
Wherein, described information type Hash mapping table is used for storing the information type of group interaction information, and described information content Hash mapping table is used for storing the information index and the information content of group interaction information; Each bar record in the described information type Hash mapping table is corresponding to an information content Hash mapping table; Each bar record in the described information content Hash mapping table corresponding to an information index and with described information index information corresponding content.
11. method as claimed in claim 10 is characterized in that, described blackboard data center comprises the group interaction information stores that read in described blackboard data center:
Described blackboard data center searches corresponding information content Hash mapping table according to the information type in the group interaction information that is read from self canned data type Hash mapping table;
Corresponding information index is searched according to the information index in the described group interaction information by described blackboard data center from the information content Hash mapping table that finds, and uses the information content in the described group interaction information to replace the pairing information content of information index that finds.
12. method as claimed in claim 11 is characterized in that, this method also further comprises:
When described blackboard data center fails to find corresponding information content Hash mapping table from information type Hash mapping table, described blackboard data center joins the information type in the group interaction information that is read in information type Hash mapping table, and according to the newly-built information content Hash mapping table of described information type; The information index in the group interaction information that is read and the information content are stored in the newly-built information content Hash mapping table.
13. method as claimed in claim 11 is characterized in that, this method also further comprises:
When described blackboard data center failed to find corresponding information index from the information content Hash mapping table that finds, described blackboard data center added the information index in the group interaction information that is read and the information content in the described information content Hash mapping table that finds to.
14. method as claimed in claim 4 is characterized in that, described game role pseudo-terminal is connected by the TCP with blackboard data center and reads required group interaction information from described blackboard data center and comprise:
Described game role pseudo-terminal is connected by the TCP with blackboard data center, sends to described blackboard data center and reads information packet;
Described blackboard data center receive described read information packet after, know the described type that reads information packet;
Described blackboard data center is according to the described information packet that reads, from the group interaction information of being stored, read the required group interaction information of game role pseudo-terminal, and the return information packet that will carry the group interaction information that reads to some extent sends to this game role pseudo-terminal;
Described game role pseudo-terminal obtains required group interaction information from the return information packet that receives.
15. method as claimed in claim 14 is characterized in that, described reading in the information packet comprises at least: information type, information content and information index.
16. method as claimed in claim 15, it is characterized in that described reading in the information packet comprises: packet size field, type of data packet field, character string size field, information type field, information content field, information index size field, information index field; Wherein,
Described packet size field, the size of expression packet;
Described type of data packet field, the type of expression packet;
Described character string size field, the size of expression information type field;
Described information type field, the expression information type is used to distinguish different types of group interaction information;
Described information content field is represented the quantity n of the required group interaction information that reads;
Described information index size field, the size of expression information index field;
Described information index field is used to distinguish the information contents different under the same information type.
17. method as claimed in claim 16 is characterized in that, described blackboard data center knows that the described type that reads information packet comprises:
Described blackboard data center is according to the described type of data packet field in the information packet and the content of packet size field of reading, and the type of knowing this packet is for reading information packet.
18. method as claimed in claim 16, it is characterized in that, described blackboard data center is according to the described information packet that reads, from the group interaction information of being stored, read the required group interaction information of game role pseudo-terminal, and the return information packet that will carry the group interaction information that reads to some extent sends to this game role pseudo-terminal and comprises:
Described blackboard data center reads information type, information index and the information content that information packet parses the required group interaction information that reads from described;
Described blackboard data center searches corresponding information content Hash mapping table according to the described information type that parses from self canned data type Hash mapping table;
Described blackboard data center is according to described information index that parses and information content, from the information content Hash mapping table that finds, read group interaction information, and the group interaction information that is read is carried at sends to this game role pseudo-terminal in the return information packet.
19. method as claimed in claim 18 is characterized in that, this method further comprises:
When described blackboard data center did not find corresponding information content Hash mapping table, it was 0 return information packet that described blackboard data center sends the group interaction information that is read to described game role pseudo-terminal.
20. method as claimed in claim 18, it is characterized in that, described blackboard data center is according to described information index that parses and information content, from the information content Hash mapping table that finds, read group interaction information, and the group interaction information that is read is carried at sends to this game role pseudo-terminal in the return information packet and comprise:
When the described information content n that parses>0,
Described blackboard data center reads the record that the n bar comprises the information index and the corresponding information content thereof from the information content Hash mapping table that finds, and the record that is read is carried at sends to this game role pseudo-terminal in the return information packet;
Wherein, if the sum of the record in the described information content Hash mapping table less than n, then described blackboard data center reads all records in the described information content Hash mapping table;
When the described information content n that parses is 0,
Described blackboard data center will search from the information content Hash mapping table that finds and the described information index information corresponding content that parses;
When the information index information corresponding content that finds and parse, blackboard data center reads this information content, and the information content that this reads is carried at sends to the game role pseudo-terminal in the return information packet; Otherwise it is 0 return information packet that described blackboard data center sends the group interaction information that is read to described game role pseudo-terminal.
21. method as claimed in claim 14 is characterized in that, comprises at least in the described return information packet: information type, information content, information index and the information content.
22. method as claimed in claim 21, it is characterized in that, comprise in the described return information packet: packet size field, type of data packet field, character string size field, information type field, information content field, information index size field, information index field, information cache size field, information cache field; Wherein,
Described packet size field, the size of expression packet;
Described type of data packet field, the type of expression packet;
Described character string size field, the size of expression information type field;
Described information type field, the expression information type is used to distinguish different types of group interaction information;
Described information content field is represented the quantity n of the required group interaction information that reads;
Described information index size field, the size of expression information index field;
Described information index field is used to distinguish the information contents different under the same information type;
Described information cache size field is used to represent the size of described information cache field;
Described information cache field is used to carry group interaction information;
Wherein, when n>0, will comprise n information index size field, a n information index field, a n information cache size field and n information cache field in the then described return information packet, represent entrained n bar group interaction information respectively.
23. method as claimed in claim 22 is characterized in that, described game role pseudo-terminal obtains required group interaction information and comprises from the return information packet that receives:
Described game role pseudo-terminal is according to the content of type of data packet field in the received return information packet and packet size field, and the type of knowing this packet is the return information packet;
Parse the information index and the information content of information content and required each bar group interaction information in information content field, information index field and the information cache field of described game role pseudo-terminal from described return information packet.
24. method as claimed in claim 23 is characterized in that, this method also further comprises:
Described game role pseudo-terminal is with in group interaction information stores to the information array of being obtained.
25. method as claimed in claim 4 is characterized in that, described game role pseudo-terminal is connected from described blackboard data center deletion group interaction information by the TCP with blackboard data center and comprises:
Described game role pseudo-terminal is connected by the TCP with described blackboard data center, sends the deletion information packet of the group interaction information that carries required deletion to described blackboard data center;
After described blackboard data center receives described deletion information packet, know the type of this deletion information packet;
Described blackboard data center parses the information type and the information index of the group interaction information of required deletion from described deletion information packet;
Described blackboard data center is according to information type of being resolved and information index, the group interaction information of the required deletion of deletion from the group interaction information of being stored.
26. method as claimed in claim 25 is characterized in that, comprises at least in the described deletion information packet: information type, information index and the information content.
27. method as claimed in claim 26 is characterized in that, comprises in the described deletion information packet: packet size field, type of data packet field, character string size field, information type field, information index size field, information index field; Wherein,
Described packet size field, the size of expression packet;
Described type of data packet field, the type of expression packet;
Described character string size field, the size of expression information type field;
Described information type field, the expression information type is used to distinguish different types of group interaction information;
Described information index size field, the size of expression information index field;
Described information index field is used to distinguish the information contents different under the same information type.
28. method as claimed in claim 27 is characterized in that, after described blackboard data center receives described deletion information packet, knows that the type of this deletion information packet comprises:
Described blackboard data center knows that according to the content of type of data packet field in the described deletion information packet and packet size field the type of this packet is the deletion information packet.
29. method as claimed in claim 27 is characterized in that, described blackboard data center parses the group interaction information of required deletion from described deletion information packet information type and information index comprise:
Described blackboard data center from described deletion information packet the information type field and the information index field in read the information type and the information index of the group interaction information of required deletion.
30. method as claimed in claim 27 is characterized in that, described blackboard data center is according to information type of being resolved and information index, and the group interaction information of the above-mentioned required deletion of deletion comprises from the group interaction information of being stored:
Described blackboard data center searches corresponding information content Hash mapping table according to the information type of being resolved from self canned data type Hash mapping table;
If do not find corresponding information content Hash mapping table, then stop to carry out follow-up step;
If find corresponding information content Hash mapping table, then blackboard data center will search from the information content Hash mapping table that finds and the information index information corresponding content of being resolved;
If do not find corresponding information content Hash mapping table, then stop to carry out follow-up step;
If find the corresponding information content, then the information content that finds will be deleted by blackboard data center from the above-mentioned information content Hash mapping table that finds.
CN 201010624447 2010-12-31 2010-12-31 Method for simulating group self-organization behaviors of multiple game characters Active CN102035857B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 201010624447 CN102035857B (en) 2010-12-31 2010-12-31 Method for simulating group self-organization behaviors of multiple game characters

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 201010624447 CN102035857B (en) 2010-12-31 2010-12-31 Method for simulating group self-organization behaviors of multiple game characters

Publications (2)

Publication Number Publication Date
CN102035857A true CN102035857A (en) 2011-04-27
CN102035857B CN102035857B (en) 2013-10-16

Family

ID=43888180

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 201010624447 Active CN102035857B (en) 2010-12-31 2010-12-31 Method for simulating group self-organization behaviors of multiple game characters

Country Status (1)

Country Link
CN (1) CN102035857B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102820976A (en) * 2012-07-31 2012-12-12 苏州松之林网络科技有限公司 Method for automatically creating team channel
CN105279031A (en) * 2015-11-20 2016-01-27 腾讯科技(深圳)有限公司 Information processing method and system
CN105760308A (en) * 2016-03-31 2016-07-13 网易(杭州)网络有限公司 Multi-client coordinated test method and device
CN110474900A (en) * 2019-08-13 2019-11-19 腾讯科技(深圳)有限公司 A kind of Game Protocol test method and device
WO2021103743A1 (en) * 2019-11-27 2021-06-03 腾讯科技(深圳)有限公司 Program test method and apparatus, computer device, and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6076113A (en) * 1997-04-11 2000-06-13 Hewlett-Packard Company Method and system for evaluating user-perceived network performance
CN1540547A (en) * 2003-10-27 2004-10-27 �Ϻ���ŵ���簲ȫ������չ�ɷ����޹� Controlling method for accessing networked games and method of charging
CN101336441A (en) * 2005-12-22 2008-12-31 Pkr有限公司 Improvement of on-line game
CN101408913A (en) * 2007-07-30 2009-04-15 Jg游戏控股有限公司 Video game for interactive engagement between multiple on-line participants in competition over internet websites
CN100487636C (en) * 2006-06-09 2009-05-13 中国科学院自动化研究所 Game control system and method based on stereo vision

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6076113A (en) * 1997-04-11 2000-06-13 Hewlett-Packard Company Method and system for evaluating user-perceived network performance
CN1540547A (en) * 2003-10-27 2004-10-27 �Ϻ���ŵ���簲ȫ������չ�ɷ����޹� Controlling method for accessing networked games and method of charging
CN101336441A (en) * 2005-12-22 2008-12-31 Pkr有限公司 Improvement of on-line game
CN100487636C (en) * 2006-06-09 2009-05-13 中国科学院自动化研究所 Game control system and method based on stereo vision
CN101408913A (en) * 2007-07-30 2009-04-15 Jg游戏控股有限公司 Video game for interactive engagement between multiple on-line participants in competition over internet websites

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102820976A (en) * 2012-07-31 2012-12-12 苏州松之林网络科技有限公司 Method for automatically creating team channel
CN105279031A (en) * 2015-11-20 2016-01-27 腾讯科技(深圳)有限公司 Information processing method and system
CN105279031B (en) * 2015-11-20 2020-06-26 腾讯科技(深圳)有限公司 Information processing method and system
CN105760308A (en) * 2016-03-31 2016-07-13 网易(杭州)网络有限公司 Multi-client coordinated test method and device
CN105760308B (en) * 2016-03-31 2018-09-14 网易(杭州)网络有限公司 Multi-client cooperates with test method and device
CN110474900A (en) * 2019-08-13 2019-11-19 腾讯科技(深圳)有限公司 A kind of Game Protocol test method and device
CN110474900B (en) * 2019-08-13 2021-11-02 腾讯科技(深圳)有限公司 Game protocol testing method and device
WO2021103743A1 (en) * 2019-11-27 2021-06-03 腾讯科技(深圳)有限公司 Program test method and apparatus, computer device, and storage medium

Also Published As

Publication number Publication date
CN102035857B (en) 2013-10-16

Similar Documents

Publication Publication Date Title
CN102035857B (en) Method for simulating group self-organization behaviors of multiple game characters
US7537523B2 (en) Dynamic player groups for interest management in multi-character virtual environments
CN104731896B (en) A kind of data processing method and system
CN108460041A (en) The treating method and apparatus of data
CN104079686A (en) Setting method and distributing method for terminal equipment MAC address
CN100388690C (en) Automatic testing system and method for command of command line interface of data communication apparatus
US20040023723A1 (en) Server for mapping application names to tag values in distributed multi-user application
CN110413595A (en) A kind of data migration method and relevant apparatus applied to distributed data base
CN112445700B (en) Test method and device
CN114722427B (en) Privacy duplication elimination method, device, equipment and storage medium in federal learning
CN103246484B (en) A kind of date storage method, Apparatus and system
CN107145673A (en) A kind of combined simulation system and method
CN103326925A (en) Message push method and device
AU2001296187A1 (en) Server for mapping application names to tag values in distributed multi-user application
CN101369934B (en) Network analogue method and system
CN106874392A (en) The method and apparatus that the index storage of audient's user profile and advertising message are delivered
CN110413711A (en) A kind of variance data acquisition methods and its storage medium
CN108521456A (en) Network establishment contest system based on block chain
CN108418752A (en) A kind of creation method and device of aggregation group
CN105978790A (en) Bluetooth-based robot social contact system and apparatus
CN107579879A (en) A kind of network simulation method of testing, emulation server and storage medium
CN106776014A (en) Parallel acceleration method and system in Heterogeneous Computing
CN101783742A (en) Discovery method and device of network topology
CN107908713A (en) A kind of distributed dynamic cuckoo filtration system and its filter method based on Redis clusters
CN107404440A (en) A kind of forwarding-table item sending method, message forwarding method and device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant