CN112076471B - Game data processing method, control method, server, client and system - Google Patents
Game data processing method, control method, server, client and system Download PDFInfo
- Publication number
- CN112076471B CN112076471B CN202010924041.5A CN202010924041A CN112076471B CN 112076471 B CN112076471 B CN 112076471B CN 202010924041 A CN202010924041 A CN 202010924041A CN 112076471 B CN112076471 B CN 112076471B
- Authority
- CN
- China
- Prior art keywords
- virtual object
- mark point
- information
- mark
- point
- 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.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 79
- 238000003672 processing method Methods 0.000 title claims abstract description 17
- 230000033001 locomotion Effects 0.000 claims abstract description 176
- 239000003550 marker Substances 0.000 claims description 102
- 230000008859 change Effects 0.000 claims description 46
- 238000004364 calculation method Methods 0.000 claims description 25
- 238000012795 verification Methods 0.000 claims description 23
- 239000013598 vector Substances 0.000 claims description 20
- 230000008569 process Effects 0.000 claims description 12
- 238000006243 chemical reaction Methods 0.000 claims description 7
- 230000004927 fusion Effects 0.000 abstract description 5
- 238000007781 pre-processing Methods 0.000 description 14
- 238000011161 development Methods 0.000 description 13
- 238000012545 processing Methods 0.000 description 10
- 230000009471 action Effects 0.000 description 9
- 238000010586 diagram Methods 0.000 description 9
- 238000012805 post-processing Methods 0.000 description 9
- 239000003999 initiator Substances 0.000 description 8
- 230000014509 gene expression Effects 0.000 description 6
- 230000005540 biological transmission Effects 0.000 description 5
- 238000012937 correction Methods 0.000 description 4
- 230000010365 information processing Effects 0.000 description 4
- 230000007704 transition Effects 0.000 description 4
- 238000012986 modification Methods 0.000 description 3
- 230000004048 modification Effects 0.000 description 3
- 230000001133 acceleration Effects 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 2
- 238000004891 communication Methods 0.000 description 2
- 238000010276 construction Methods 0.000 description 2
- 230000006870 function Effects 0.000 description 2
- 208000015979 hopping Diseases 0.000 description 2
- 230000003993 interaction Effects 0.000 description 2
- 230000006855 networking Effects 0.000 description 2
- 230000000007 visual effect Effects 0.000 description 2
- 238000013459 approach Methods 0.000 description 1
- 238000004422 calculation algorithm Methods 0.000 description 1
- 238000004590 computer program Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 239000000284 extract Substances 0.000 description 1
- 230000005484 gravity Effects 0.000 description 1
- 230000002452 interceptive effect Effects 0.000 description 1
- 230000007774 longterm Effects 0.000 description 1
- 238000012423 maintenance Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000035515 penetration Effects 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
- 230000001960 triggered effect Effects 0.000 description 1
- XLYOFNOQVPJJNP-UHFFFAOYSA-N water Substances O XLYOFNOQVPJJNP-UHFFFAOYSA-N 0.000 description 1
Classifications
-
- A—HUMAN NECESSITIES
- A63—SPORTS; GAMES; AMUSEMENTS
- A63F—CARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
- A63F13/00—Video games, i.e. games using an electronically generated display having two or more dimensions
- A63F13/50—Controlling the output signals based on the game progress
- A63F13/52—Controlling the output signals based on the game progress involving aspects of the displayed game scene
-
- A—HUMAN NECESSITIES
- A63—SPORTS; GAMES; AMUSEMENTS
- A63F—CARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
- A63F13/00—Video games, i.e. games using an electronically generated display having two or more dimensions
- A63F13/55—Controlling game characters or game objects based on the game progress
- A63F13/56—Computing the motion of game characters with respect to other game characters, game objects or elements of the game scene, e.g. for simulating the behaviour of a group of virtual soldiers or for path finding
-
- A—HUMAN NECESSITIES
- A63—SPORTS; GAMES; AMUSEMENTS
- A63F—CARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
- A63F13/00—Video games, i.e. games using an electronically generated display having two or more dimensions
- A63F13/55—Controlling game characters or game objects based on the game progress
- A63F13/57—Simulating properties, behaviour or motion of objects in the game world, e.g. computing tyre load in a car race game
- A63F13/573—Simulating properties, behaviour or motion of objects in the game world, e.g. computing tyre load in a car race game using trajectories of game objects, e.g. of a golf ball according to the point of impact
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Theoretical Computer Science (AREA)
- Human Computer Interaction (AREA)
- Processing Or Creating Images (AREA)
Abstract
The embodiment of the invention discloses a game data processing method, a control method, a server, a client and a system. The method comprises the following steps: obtaining movement information of the virtual object, a mark point corresponding to the limiting path and position information corresponding to the mark point, wherein the limiting path comprises at least one mark point; determining a target position according to the movement information of the virtual object and the position information corresponding to the mark point; and determining the current position of the virtual object according to the target position. The server side and the client side are used for realizing the method. The system comprises the server side and the client side. The embodiment of the invention can realize the fusion of the virtual object and the surrounding environment in the virtual scene, reduce the workload and improve the efficiency.
Description
Technical Field
The present invention relates to the field of virtual object control technologies, and in particular, to a game data processing method, a game data processing control method, a game data processing server, a game data processing client, and a game data processing system.
Background
With the popularity of computers and mobile-end smartphones, gaming has become an increasingly popular form of entertainment. As the market for games continues to expand, the gaming industry is increasingly competing, and so players' demands for diversity in game play are also in high water. How to enrich game play continuously for long-term operation is a very concern for all large game manufacturers. The carrier is used as a tool closely related to the daily life of people, and plays a role in games. By introducing the carrier into the game, the mobility of the player can be greatly enhanced, and the diversity of game playing methods can be improved.
Carrier solutions in modern 3D games can be divided into two types. The first type of scheme is: the player entity is directly bound with the carrier entity, and the carrier can be directly controlled to freely roam through operation input of the player, for example, the player mostly has a walking state in the field action, the game interface changes after the vehicle is found, an interactive interface (UI) for driving the vehicle appears, and the player changes from controlling the role movement to controlling the vehicle movement, as shown in figure 1. The second type of scheme is: a fully animated controlled vehicle format; producing a section of fixed animation by an action producer; playing the action to represent the movement of the carrier when the player logs in the carrier; after the player logs on the carrier, the movement of the carrier and the player is completely controlled by the action animation, and the player can not interact any more, as shown in fig. 2, and the player is an animation display interface of the carrier.
With the first type of the above-described scheme, although the degree of freedom is highest, the player directly controls the carrier, it is relatively suitable for racing games such as racing vehicles which use the carrier as a main angle, and is not suitable for application scenes in which the player controls the track carrier (or referred to as a railcar) to move only on a fixed track.
For the second type of solution, the motion of the carrier is controlled by a fixed motion, which limits the moving range of the carrier, but the fixed motion of the carrier greatly increases the workload of the motion producer, affects the efficiency and has high cost.
The foregoing background is only for the purpose of providing an understanding of the principles and concepts of the invention and is not necessarily in the prior art to the invention and is not intended to be used as an admission that the background of the invention is prior art to the filing date of the present application.
Disclosure of Invention
The invention provides a game data processing method, a control method, a server, a client and a system, which can realize the fusion of a virtual object and the surrounding environment in a virtual scene, reduce the workload and improve the efficiency.
In a first aspect, the present invention provides a game data processing method, providing, by a terminal device, a graphical user interface, where a game screen is displayed on the graphical user interface, where the game screen includes a virtual object configured to move along a limiting path according to a control instruction, with a motion parameter corresponding to the control instruction, where the limiting path is a path in the game scene that limits a movement track of the virtual object, and the method includes: obtaining movement information of the virtual object, a mark point corresponding to the limiting path and position information corresponding to the mark point, wherein the limiting path comprises at least one mark point; determining a target position according to the movement information of the virtual object and the position information corresponding to the mark point; and determining the current position of the virtual object according to the target position.
In some preferred embodiments, the method further comprises:
acquiring direction information corresponding to the mark points;
determining a direction corresponding to a target position according to the movement information of the virtual object and the direction information corresponding to the mark point;
and determining the current orientation of the virtual object according to the direction corresponding to the target position.
In some preferred embodiments, the target position and corresponding direction of the virtual object are calculated by linear interpolation; or calculating the target position and the corresponding direction of the virtual object through curve interpolation.
In some preferred embodiments, the marker points include a first marker point and a second marker point;
the target position is determined according to the movement information of the virtual object and the position information corresponding to the mark point, specifically: and calculating the target position of the virtual object according to the position information of the first mark point, the position information of the second mark point and the movement information of the virtual object.
In some preferred embodiments, the marker points include a first marker point and a second marker point;
the movement information of the virtual object comprises a dynamic operation proportion of the virtual object between the first mark point and the second mark point;
The target position is determined according to the movement information of the virtual object and the position information corresponding to the mark point, specifically: determining the target position of the virtual object according to the position information of the mark points and the dynamic operation proportion; the position information of the mark points includes position information of the first mark point and position information of the second mark point.
In some preferred embodiments, obtaining the movement information of the virtual object and the corresponding mark point on the limiting path and the position information corresponding to the mark point includes: a dynamic running proportion of the virtual object between the first mark point and the second mark point is received.
In some preferred embodiments, the first marker point and the second marker point are two adjacent marker points.
In some preferred embodiments, the marker points include a first marker point and a second marker point;
the position information of the mark points comprises the position information of the first mark point and the position information of the second mark point;
the determining the target position according to the movement information of the virtual object and the position information corresponding to the mark point specifically comprises the following steps:
Calculating the dynamic operation proportion of the virtual object between the first mark point and the second mark point;
and calculating the target position of the virtual object according to the dynamic operation proportion and the position information of the marking point.
In some preferred embodiments, the first marker point and the second marker point are two adjacent marker points;
the moving information of the virtual object comprises a previous frame operation proportion, a previous frame passing time and a real-time speed of the virtual object between the first mark point and the second mark point;
the calculating of the dynamic operation proportion of the virtual object between the first mark point and the second mark point is specifically as follows: and calculating the dynamic operation proportion of the virtual object between the first mark point and the second mark point based on the operation proportion of the last frame, the elapsed time of the last frame and the real-time speed.
In some preferred embodiments, the obtaining the movement information of the virtual object and the corresponding mark point on the limiting path and the position information corresponding to the mark point includes: and receiving the previous frame operation proportion, the previous frame passing time and the real-time speed of the virtual object between the first mark point and the second mark point.
In some preferred embodiments, the location information of the first marker point includes a location of the first marker point;
the position information of the second mark point comprises the position of the second mark point;
the target position is determined according to the movement information of the virtual object and the position information corresponding to the mark point, specifically: and calculating the target position of the virtual object based on the dynamic operation proportion, the position of the first mark point and the position of the second mark point.
In some preferred embodiments, the movement information of the virtual object includes path selection information;
the marking points comprise a path crossing marking point and a plurality of candidate track changing marking points;
the obtaining of the corresponding mark point on the limiting path and the position information corresponding to the mark point specifically includes: acquiring a path crossing mark point on the limiting path, determining a track change mark point from the candidate track change mark points according to the path selection information, and acquiring position information of the path crossing mark point and the track change mark point;
the target position is determined according to the movement information of the virtual object and the position information corresponding to the mark point, specifically: determining a target position according to the movement information of the virtual object and the position information corresponding to the path crossing mark point and the track change mark point;
The obtaining of the direction information corresponding to the mark point specifically includes: acquiring direction information corresponding to the path crossing mark points and the track changing mark points;
the direction corresponding to the target position is determined according to the movement information of the virtual object and the direction information corresponding to the mark point, and the direction is specifically as follows: and determining the direction corresponding to the target position according to the movement information of the virtual object and the direction information corresponding to the path crossing mark point and the track change mark point.
In some preferred embodiments, obtaining movement information of the virtual object comprises: and receiving the path selection information.
Path crossing marker points in some preferred embodiments, the path crossing marker points and the track change marker points are two adjacent marker points;
the movement information of the virtual object further comprises a dynamic operation proportion of the virtual object between the path crossing mark point and the track change mark point;
the direction information of the path crossing mark points comprises tangential directions of the path crossing mark points; the position information of the path crossing mark point comprises the position of the path crossing mark point;
The direction information of the track change mark point comprises the tangential direction of the track change mark point; the position information of the track change mark point comprises the position of the track change mark point;
the target position is determined according to the movement information of the virtual object and the position information corresponding to the mark point, specifically: determining a target position according to the dynamic operation proportion, the position of the path crossing mark point and the position of the track change mark point;
the direction corresponding to the target position is determined according to the movement information of the virtual object and the direction information corresponding to the mark point, and the direction is specifically as follows: and determining the direction corresponding to the target position according to the dynamic operation proportion, the tangential direction of the path crossing mark point and the tangential direction of the track change mark point.
Path cross-marker path cross-markers in some preferred embodiments, further comprising: and calculating the real-time distance between the virtual object and the target position, and changing the real-time speed of the virtual object if the real-time distance reaches a first condition.
In some preferred embodiments, the destination location is the last of the marker points of the restricted path.
In some preferred embodiments, the calculating the real-time distance between the virtual object and the destination location is specifically: and calculating the distance between the current position of the virtual object and the last marking point of the limiting path, wherein the distance is the real-time distance.
In some preferred embodiments, the last marked point of the constraint path is the marked point with the largest sequence number in the constraint path.
In some preferred embodiments, further comprising: generating and recording scene information of the mark points;
generating and recording scene information of the mark points includes: generating and recording the tangential direction of the mark points;
generating and recording the tangential direction of the marker points includes:
taking the direction of a connecting line of the mark point and the last mark point or the next mark point as the tangential direction of the mark point;
generating and recording tangential directions of the mark points according to the direction vector from the last mark point to the mark point, the direction vector from the mark point to the next mark point, the distance from the last mark point to the mark point and the distance from the mark point to the next mark point;
The marking points are crossed marking points of different tracks; generating and recording tangential directions of the cross mark points in different tracks;
the tangential direction of the marking point is specifically generated and recorded by the following steps: the tangential direction of the marker points is generated and recorded by the linear difference.
In some preferred embodiments, determining the target position according to the movement information of the virtual object and the position information corresponding to the marking point includes: calculating the position to be converted of the virtual object based on the movement information of the virtual object and the position information of the mark point; and converting the position to be converted into a target position of the virtual object.
In some preferred embodiments, determining the direction corresponding to the target position according to the movement information of the virtual object and the direction information corresponding to the marker point includes: determining the direction to be converted of the virtual object according to the movement information of the virtual object and the direction information corresponding to the mark point; and converting the direction to be converted into a direction corresponding to the target position of the virtual object.
In some preferred embodiments, determining the target position according to the movement information of the virtual object and the position information corresponding to the marker point further includes:
Converting at least a part of movement information of the virtual object and/or converting at least a part of position information of the mark point;
the movement information of the virtual object comprises at least a part of the movement information of the virtual object after conversion, and/or the position information of the mark point comprises at least a part of the position information of the mark point after conversion.
In some preferred embodiments, pre-recorded scene information for marking a plurality of marking points of a track is acquired; scene information of a virtual object recorded in advance is acquired.
In some preferred embodiments, at least a portion of the scene information of the virtual object is received as the scene information of the virtual object.
In some preferred embodiments, further comprising: and carrying out radial correction on the target position and the corresponding direction of the virtual object.
In some preferred embodiments, further comprising: and sending a virtual object control instruction to the client so as to enable the current position of the virtual object to be consistent with the target position and enable the current direction of the virtual object to be consistent with the direction corresponding to the target position.
In some preferred embodiments, further comprising: sending verification data to a client to enable the client to realize: and verifying the calculation result of the client according to the verification data, and modifying the position of the virtual object and the direction of the virtual object on the client according to the data in the verification data if the verification result meets a first verification condition.
In some preferred embodiments, the first verification condition is: the difference between the position of the virtual object calculated by the client and the direction of the virtual object and the position of the virtual object calculated by the server and the direction of the virtual object is larger than a specified range.
In some preferred embodiments, the verification data includes the target location calculated by the server;
the calculation result of the client comprises the target position calculated by the client;
the first verification condition is as follows: the difference between the target position calculated by the client and the target position calculated by the server is larger than a specified range.
In a second aspect, the present invention further provides a virtual object control method, including: marking the limiting path with a plurality of marking points; generating and recording the position information of the mark points; transmitting first data to a server to enable the server to realize: calculating the target position of the virtual object based on the acquired movement information of the virtual object and the position information of the mark point; and enabling the current position of the virtual object to be consistent with the target position.
In some preferred embodiments, generating and recording the location information of the marker points includes: generating and recording the positions of the marking points; generating and recording the tangential direction of the mark points; generating and recording serial numbers of the mark points in a limiting path; and generating and recording the limiting path information of the mark point.
In some preferred embodiments, the sequence number is incremented;
said serial number of at least two adjacent said marker points being intermittent;
the method further comprises the step of adding a new mark point to the two mark points, wherein the size of the serial number of the new mark point is between the sizes of the serial numbers of the two mark points; the two marking points are adjacent.
In a third aspect, the present invention further provides a virtual object control method, including: transmitting at least part of movement information of a virtual object running on a limiting path to a server, wherein the limiting path is marked by a plurality of marking points, so that the server calculates a target position of the virtual object based on the movement information of the virtual object and the position information of the marking points; the movement information of the virtual object includes the at least a portion of movement information; receiving virtual object control data containing a target position of the virtual object; and enabling the current position of the virtual object to be consistent with the target position.
In some preferred embodiments, the marker points include a first marker point and a second marker point;
the sending of at least a part of movement information of the virtual object running on the limiting path to the server side specifically comprises the following steps: transmitting at least a part of movement information of the virtual object running on the limiting path to the server; wherein the constraint path is marked by a plurality of marking points, and at least a part of movement information of the virtual object comprises a dynamic operation proportion of the virtual object between the first marking point and the second marking point; the server side calculates the target position of the virtual object based on the position information of the mark point and the dynamic operation proportion; the position information of the mark points includes position information of the first mark point and position information of the second mark point.
In some preferred embodiments, further comprising: calculating the dynamic operation proportion based on the operation proportion of the last frame, the elapsed time of the last frame and the real-time speed of the virtual object between the first mark point and the second mark point; the first mark point and the second mark point are two adjacent mark points.
In some preferred embodiments, the marker points include a first marker point and a second marker point; the first mark point and the second mark point are two adjacent mark points;
the at least a portion of the movement information includes a last frame run proportion, a last frame elapsed time, and a real-time speed of the virtual object between the first marker point and the second marker point.
In some preferred embodiments, the at least a portion of the movement information comprises path selection information;
the sending of at least a part of movement information of the virtual object running on the limiting path to the server side specifically comprises the following steps: transmitting at least a part of movement information of a virtual object running on a limited path to a server side, so that the server side calculates a target position of the virtual object based on the position information of the mark point and the movement information of the virtual object including the path selection information;
the enabling the current position of the virtual object to be consistent with the target position specifically comprises the following steps: and enabling the current position of the virtual object to be consistent with the target position, and enabling the current direction of the virtual object to be consistent with the direction corresponding to the target position, so that the virtual object switches the track.
In some preferred embodiments, the marker points include a path crossing marker point and a plurality of candidate track change marker points;
the at least one part of movement information further comprises a dynamic operation proportion of the virtual object between the path crossing mark point and the track change mark point; the track change mark point is one of the candidate track change mark points; the path crossing mark points and the track changing mark points are two adjacent mark points;
the sending of at least a part of movement information of the virtual object running on the limiting path to the server side specifically comprises the following steps: transmitting at least part of movement information of a virtual object running on a limited path to a server side, so that the server side calculates a target position of the virtual object based on the position information of the mark point and based on the movement information of the virtual object comprising the path selection information and the dynamic running proportion; the position information of the mark points includes position information of the path crossing mark points and position information of the track changing mark points.
In some preferred embodiments, further comprising: and calculating the real-time distance between the virtual object and the target position, and changing the real-time speed of the virtual object if the real-time distance reaches a first condition.
In some preferred embodiments, the destination location is the last of the marker points of the restricted path.
In some preferred embodiments, the calculating the real-time distance between the virtual object and the destination location is specifically: and calculating the distance between the current position of the virtual object and the last marking point of the limiting path, wherein the distance is the real-time distance.
In some preferred embodiments, the last marked point of the constraint path is the marked point with the largest sequence number in the constraint path.
In a fourth aspect, the present invention provides a server comprising one or more processors, memory, and one or more programs; wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs comprising instructions for performing the above-described methods.
In a fifth aspect, the present invention provides a client comprising one or more processors, memory, and one or more programs; wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs comprising instructions for performing the above-described methods.
In a sixth aspect, the present invention provides a development terminal comprising one or more processors, memory, and one or more programs; wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs comprising instructions for performing the above-described methods.
In a seventh aspect, the present invention provides a virtual object control system, including the above-mentioned server side and the above-mentioned client side; or the server side and the development side are included; or, the client and the development terminal are included; or the server, the client and the development terminal are included.
In an eighth aspect, the present invention provides a control method of a virtual object control system, where the virtual object control system includes the above-mentioned server side and the above-mentioned client side;
the control method comprises the following steps:
the client receives the check data sent by the server;
and the client checks the calculation result of the client according to the check data, and if the check result meets a first check condition, the position of the virtual object and the direction of the virtual object are modified on the client according to the data in the check data.
In some preferred embodiments, the verification data includes the target position calculated by the server and a direction corresponding to the target position;
the calculation result of the client comprises the target position calculated by the client and the direction corresponding to the target position;
the client checks the calculation result of the client according to the check data, and if the check result meets a first check condition, the position of the virtual object and the direction of the virtual object are modified on the client according to the data in the check data specifically as follows: and the client checks the target position calculated by the client and the direction corresponding to the target position according to the target position calculated by the server and the direction corresponding to the target position, and if the check result meets a first check condition, the current position of the virtual object is consistent with the target position calculated by the server and the current direction of the virtual object is consistent with the direction corresponding to the target position calculated by the server on the client by adopting the target position calculated by the server and the direction corresponding to the target position.
In some preferred embodiments, the first verification condition is: the difference between the position of the virtual object calculated by the client and the direction of the virtual object and the position of the virtual object calculated by the server and the direction of the virtual object is larger than a specified range.
In some preferred embodiments, the verification data includes the target position calculated by the server and a direction corresponding to the target position;
the calculation result of the client comprises the target position calculated by the client and the direction corresponding to the target position;
the first verification condition is as follows: the difference between the target position calculated by the client and the direction corresponding to the target position and the target position calculated by the server and the dynamic direction is larger than a specified range.
In a ninth aspect, the present invention provides a virtual object control apparatus including an information acquisition unit, a dynamic operation unit, and a position control unit;
the information acquisition unit is used for: obtaining movement information of a virtual object and position information of a marking point for marking a track;
the dynamic operation unit is used for: calculating a target position of the virtual object based on the movement information of the virtual object and the position information of the mark point;
The position control unit is used for: and enabling the current position of the virtual object to be consistent with the target position.
In a tenth aspect, the present invention also provides a virtual object control apparatus, including a marking unit, a marking point scene information processing unit, and a transmission unit;
the marking unit is used for: marking the track with marking points;
the mark point scene information processing unit is used for: generating and recording scene information of the mark points;
the transmission unit is configured to transmit first data to a server, so that the server implements: calculating the target position of the virtual object based on the acquired scene information of the virtual object and the scene information of the mark point; and enabling the current position of the virtual object to be consistent with the target position.
In an eleventh aspect, the present invention also provides a virtual object control apparatus, including an information transmitting unit, an information receiving unit, and an object control unit;
the information transmitting unit is used for: transmitting at least part of movement information of a virtual object running on a track to a server, wherein the track is marked by a mark point, so that the server calculates a target position and a dynamic direction of the virtual object based on the movement information of the virtual object and the position information of the mark point; the movement information of the virtual object includes the at least a portion of movement information
The information receiving unit is used for: receiving target position control data containing the virtual object;
the object control unit is used for: and enabling the current position of the virtual object to be consistent with the target position.
In a twelfth aspect, the present invention also provides a computer-readable storage medium comprising: the computer readable storage medium has stored therein program instructions which, when executed by a processor of a computer, cause the processor to perform the above method.
Compared with the prior art, the embodiment of the invention has the beneficial effects that:
the limiting path is marked by a plurality of marking points; calculating a target position of the virtual object based on the movement information of the virtual object and the position information of the mark point by acquiring the position information of the mark point and the movement information of the virtual object running on the limiting path; the current position of the virtual object is made to coincide with the calculated target position. In this way, the virtual object can be controlled to move along the limiting path marked by the marking point in the virtual scene, and the position of the virtual object is dynamically changed under the constraint of the movement information of the virtual object; the motion of the virtual object is fused with the surrounding environment in the virtual scene, so that the fusion of the virtual object and the surrounding environment is realized; the workload of the action producer, such as the need for producing a large amount of fixed animations, can be reduced, thereby improving the efficiency and reducing the cost.
Drawings
FIG. 1 is a diagram showing a virtual object system in a "wild action";
FIG. 2 is a schematic diagram of an editor interface for virtual object animation;
FIG. 3 is a diagram illustrating a virtual object control system according to a first embodiment of the present invention;
FIG. 4 is a diagram showing the information interaction of a virtual object control system according to a modification of the first embodiment of the present invention;
FIG. 5 is a schematic structural diagram of a server according to a first embodiment of the present invention;
FIG. 6 is a schematic view of a construction of one form of the development terminal of the first embodiment of the invention;
FIG. 7 is a schematic view of another form of construction of the development terminal of the first embodiment of the invention;
FIG. 8 is a schematic diagram of a client in one form of the first embodiment of the present invention;
fig. 9 is a schematic structural diagram of another form of a server according to the first embodiment of the present invention;
FIG. 10 is a diagram illustrating a virtual object control system according to a second embodiment of the present invention;
FIG. 11 is a schematic representation of the mark points in the scene editor according to the first embodiment of the invention;
FIG. 12 is a general flow chart of a game data processing method according to the first embodiment of the present invention;
fig. 13 is a schematic view showing a plurality of marker points of the first embodiment of the present invention;
Fig. 14 is a schematic structural diagram of a client according to a second embodiment of the present invention.
Detailed Description
In order to make the technical problems, technical solutions and beneficial effects to be solved by the embodiments of the present invention more clear, the present invention is further described in detail below with reference to fig. 1 to 14 and the embodiments. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
It will be understood that when an element is referred to as being "mounted" or "disposed" on another element, it can be directly on the other element or be indirectly on the other element. When an element is referred to as being "connected" to another element, it can be directly connected to the other element or be indirectly connected to the other element. In addition, the connection may be for a fixing function or for a circuit communication function.
It is to be understood that the terms "length," "width," "upper," "lower," "front," "rear," "left," "right," "vertical," "horizontal," "top," "bottom," "inner," "outer," and the like are merely for convenience in describing embodiments of the invention and to simplify the description, and do not denote or imply that the devices or elements referred to must have a particular orientation, be constructed and operated in a particular orientation, and thus are not to be construed as limiting the invention.
Furthermore, the terms "first," "second," and the like, are used for descriptive purposes only and are not to be construed as indicating or implying a relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include one or more such feature. In the description of the embodiments of the present invention, the meaning of "plurality" is two or more, unless explicitly defined otherwise.
First embodiment
The embodiment provides a game data processing method, in particular to a virtual object data processing method based on a switchable track of mark points. The game data processing method of the present embodiment includes two parts, a preprocessing part and a post-processing part, respectively. Wherein the post-processing section is performed based on the processing result of the pre-processing section.
The embodiment provides a virtual object control system; referring to fig. 3, the system includes an originating terminal 1, a service terminal 2, and a client terminal 3. The preprocessing section and the post-processing section of the game data processing method of the present embodiment execute on different devices: the preprocessing part firstly generates a processing result on the development terminal 1, then the processing result is transmitted to the service terminal 2 and the client terminal 3 in the form of data, and the post-processing part runs on the service terminal 2 and the client terminal 3 based on the processing result, namely, the service terminal 2 and the client terminal 3 both run the post-processing part of the game data processing method of the embodiment; in addition, the server 2 communicates with the client 3, such as: the server 2 sends data to the client 3, and the client 3 sends data to the server 2. In other embodiments, the virtual object control system includes a server 2 and a client 3; alternatively, the virtual object control system comprises an originating terminal 1 and a server terminal 2; alternatively, the virtual object control system includes an initiator 1 and a client 3.
The present embodiment is described in detail below in conjunction with the method and system of the present embodiment.
The virtual object 4 is a virtual object, such as a vehicle, that is capable of moving along a restricted path. In the game, referring to fig. 13, the virtual object 4 may be a vehicle, a ship, an aircraft, a weapon, a prop, a cloud, or an animal that moves along a restricted path (a fixed route), but is not limited thereto. In other embodiments, the virtual object 4 is an object in a virtual reality environment.
The game data processing method of the present embodiment provides a graphical user interface through a terminal device (such as the client 3), a game screen is displayed on the graphical user interface, the game screen includes a virtual object 4, and the virtual object 4 is configured to move along a limited path according to a control instruction with a motion parameter corresponding to the control instruction. The limiting path is a path for limiting the moving track of the virtual object in the game scene, and the limiting path can be a track, for example.
Referring to fig. 3 and 12, the preprocessing section of the game data processing method of the present embodiment includes steps C1 to C3. As described above, the steps C1 to C3 are executed by the development terminal 1. The development terminal 1 is a micro server or a personal computer.
And C1, marking the track by a plurality of marking points.
A plurality of marking points are put down in the scene to represent the locus where the virtual object is expected to run, i.e. where the track is located, for example, a plurality of marking points are placed in advance in the scene editor to mark the track.
The marker points may be represented in the form of a small square in the scene editor; the center of the square at the bottom of the small square is considered to be the location of the mark point mark, as in the scene editor, as shown in fig. 11.
Marking the track representation with a plurality of mark points: the tracks in the scene are marked with a plurality of marking points as tracks, or with a plurality of marking points. Whatever the representation, the purpose is to make multiple marker points exist in the scene.
And C2, generating and recording scene information of the mark points, wherein the scene information of the mark points is divided into position information and direction information.
The scene information of the mark point is information indicating that the mark point is in the scene for developing subsequent processing.
The preprocessing section generates scene information required by an application such as a game running, including the actual position of the virtual object corresponding to the mark point, the tangential direction of the virtual object, the point at which the track is switched, which tracks the switch point engages, information of the track end point, and the like. The scene information of the mark point comprises the actual position of the virtual object corresponding to the mark point, the position of the mark point, the tangential direction of the mark point, the serial number of the mark point in the track, the track switching point and the track information of the mark point; the position information of the mark point comprises the position of the mark point, the serial number of the mark point in the track and the track information of the mark point; the direction information of the mark point includes a tangential direction of the mark point.
The position of the marker point may be a two-dimensional position (e.g., represented by an X-coordinate and a Y-coordinate) or a three-dimensional position (e.g., represented by an X-coordinate, a Y-coordinate, and a Z-coordinate). After the mark points are placed, the positions of the mark points in the scene are generated and recorded.
A serial number of the mark point in the track is generated and recorded. In addition to the location, each mark point needs to record information identifying the track with a special attribute in order to identify the coming pulse of the track motion and to enable track switching. As shown in table one below, which shows the custom properties of the mark points, the first column of the mark point custom properties identifies the name of the track where the mark point is located (i.e., the track information to which the mark point belongs), and the second column identifies the serial number of the mark point in the track. The serial numbers of the marking points are recorded according to a monotonically increasing sequence, namely the serial numbers are increasing, for example, the serial number of the first marking point is 1, the serial number of the following marking point can be 2 or 5, and the reserved marking point positions are realized, so that the serial numbers of the marking points are discontinuous.
List one
By reserving the positions of the marking points, space is reserved for adding the marking points when the accuracy of the marking points does not reach the expected level, and the virtual object movement is not smooth enough, so that the situation that all the marking points need to be re-marked for adding the points is avoided. Illustratively, of all the marker points, at least two adjacent marker points have intermittent serial numbers; adding a new mark point to the two adjacent mark points, wherein the size of the serial number of the new mark point is between the sizes of the serial numbers of the two adjacent mark points; specifically, the serial numbers of two adjacent marking points are respectively 1 and 5, and the serial number of the new marking point can be 2, 3 or 4.
As previously described, each small square represents a marker point, while a marker point is shared by multiple tracks at the intersection of the tracks. In table one, this marker point is at one intersection, so it belongs to both track tramcar0, track tramcar1 and track tramcar2. The sequence number of the mark point in the track trancar 0 is 75, and the sequence numbers in both tracks trancar 1 and track trancar 2 are 1. In this way, one mark point stores information of three lines of tracks at the same time, that is, information given to a plurality of tracks at the mark point at the switching track.
After the marker points are placed in the scene editor, the table guiding program reads the scene file, analyzes the marker point information in the scene file to perform preprocessing, and stores the preprocessed data, for example, in a python script file format which can be directly read by the program. The specific content of preprocessing the marker point information is as follows.
A particular point in the track is identified. The first track and the last track can be easily identified according to the sequence number of the suffix of the custom attribute name of the track mark point. The information of the last track needs to be saved additionally, because before the track reaches the end point, the virtual object (also called a track car) is expected to be naturally decelerated, so that unreasonable performance such as sudden stop or rushing out of the track of the virtual object is avoided.
In addition to the start and end points of the track, additional recording of the switching points of the track is required for subsequent implementation of virtual object switching of the track. At the crossing point of the track, one mark point can simultaneously store a plurality of track custom attribute information, and the topological structure of the track can be constructed according to the information. For interpolation of the track information at run-time, the connection information of the tracks needs to be kept bi-directional, i.e. it is kept at the same time which tracks the track T can pass and which tracks can be transitioned (or switched) to the track T.
In this way, the scene information of the mark point also includes information whether the mark point is a special point.
The centroid position of the virtual object 4 (railcar) is calculated. It is generally desirable to identify the motion trajectory of a virtual object with a marker point, referring to fig. 13, however, in reality the virtual object is a solid model with its own length and width, so it is necessary to determine which point of the virtual object the marker point represents the running position of. For visual ease of use, the placed marker points are used to represent a position in the middle of the virtual object head (such as a railcar head); but the centroid position of the virtual object, that is, the position of the middle segment of the virtual object is used in the game, so that the position of the marker point needs to be converted into the centroid position of the virtual object during preprocessing. The length of the virtual object is a known amount L, and then the distance from the head of the virtual object (e.g., the rail car head) to the centroid is L/2, and a direction is required to obtain the centroid position of the virtual object. The current data only has the position of the marker point, and no direction information, refer to fig. 13, so the direction d of the line from one marker point to the next marker point is used as this direction, where the direction d of the line is a vector. Assuming that the position of the certain mark point is p, the position of the centroid of the virtual object represented by the certain mark point is p-d x L/2.
Tangential direction of the mark points is generated and recorded. It is important and difficult to calculate the tangential direction (i.e. tangential direction) of the marker points, since the marker points can only convey position information, which is then calculated. The calculation of the direction of the marker points will directly influence the fit of the driving part of the virtual object (such as the wheel) to the track during the running of the virtual object. For example, referring to fig. 13, the tangential direction of one mark point P is calculated, and the position of the mark point P, the position of the previous mark point a and the position of the next mark point B need to be obtained, and the calculation can be classified into the following cases according to the case of the mark point P.
The mark point P is the start or end of the entire track. Since the mark point P is the start point or the end point of the whole track, the mark point P will not have the last mark point or the next mark point, and thus, the tangential direction of the mark point P is: the direction of the line connecting the mark point P with the one of the mark points a and B, that is, the direction of the line connecting the mark point P with the previous mark point or the next mark point.
Referring to fig. 13, the mark point P is a case of one mark point at the middle position of one track. This is the most common case. For this case, the present embodiment calculates both the direction vector AP and the direction vector PB, and marks the tangential vector of the point P The formula of (2) is as follows (1).
Wherein,and->Respectively representing the direction vector from the mark point A to the mark point P and the direction vector from the mark point P to the mark point B, W A And W is B The linear interpolation of the representative direction vector is weighted according to the length of the AP and PB line segments. W (W) A The formula of (2) is as follows. W (W) B Formula (3) below.
The |pa| and the |pb| denote the length of the line segment PA and the length of the line segment PB, respectively.
Equation (2) and equation (3) mean: if two marker points are closer, the two marker points occupy a greater specific gravity in the calculation in the tangential direction. Such a specific weight of the direction vector is because the closer the two marker points are, the more abrupt the curve tends to be; in contrast, a long track in a straight line requires only one start point and one end point to represent. Of course, as a tangential direction vector, the vector is normalized after the linear interpolation is completed.
Referring to fig. 13, the mark point P is a case of crossing points of a plurality of tracks. At the intersection of the tracks, the player may choose to have the virtual object walk two completely different tracks to the left or to the right, so in this case the tangential vector information of the marker point P needs to store two tangential vectors, namely the tangential vector taken by the virtual object when walking to the left and the tangential vector taken when walking to the right. In this way, tangential vectors of the cross mark point P in different tracks are recorded, and in the interpolation process of the virtual object operation, by inquiring the track switching topology information stored in the above, it can be determined which tangential vector is adopted to perform interpolation operation when the virtual object moves to the vicinity of the mark point P.
And C3, transmitting the first data to the server.
After the preprocessing section is completed, the post-processing section may be run. Referring to fig. 3, an initiator 1 transmits first data to a server 2 and a client 3; specifically to the server 2 and the client 3 via a network. In other embodiments, the initiator 1 transmits the first data to the server 2 and the client 3 via a storage medium. After the server side 2 and the client side 3 receive the first data, a post-processing section is executed based on the first data. For example, the first data includes scene information of the marker point and scene information of the virtual object as long as the server side 2 and the client side 3 can be caused to execute the post-processing section based on the first data. Wherein, the server side 2 is a server; the client 3 is a smart terminal such as a smart phone or a personal computer.
In other embodiments, the preprocessing portion is performed by the server 2 or the client 3.
Referring to fig. 3, the post-processing portion of the game data processing method of the present embodiment includes steps A1 to A3. As described above, the server 2 and the client 3 each perform steps A1 to A3. The server 2 is a server. The client 3 is an intelligent terminal.
A1, obtaining movement information of a virtual object and corresponding mark points and position information corresponding to the mark points on a limiting path; wherein the restricted path comprises at least one marked point.
The movement information of the virtual object refers to information of the virtual object in the virtual scene, and the information is used for carrying out subsequent processing. By way of example, the movement information of the virtual object includes at least one of the following information: the last frame run proportion of the virtual object, the last frame elapsed time, the real-time speed, the run time of the virtual object, the path selection information, the position of the virtual object, the direction of the virtual object, the historical speed of the virtual object, the historical position of the virtual object, the historical direction of the virtual object, and the size (such as length, width and height) of the virtual object in the virtual scene. Wherein the path selection information is: when the virtual object is to switch tracks, information representing which track the virtual object is to switch to is displayed.
Specifically, the server 2 or the client 3 may store the movement information of the virtual object in advance, for example, receive the movement information of the virtual object transmitted from the initiator 1 and store the movement information in a storage medium such as a hard disk, and when the movement information of the virtual object needs to be used, acquire the movement information from the storage medium.
In other embodiments, the obtaining of the movement information of the virtual object is receiving the movement information of the virtual object from other devices, such as the initiator 1; alternatively, the obtaining of the movement information of the virtual object is to receive a part of the movement information of the virtual object from another device, such as the initiator 1 or the client 3, then calculate another part of the movement information based on the part of the movement information, and store the two parts of the movement information in the storage medium, and obtain the movement information of the virtual object from the storage medium when the movement information of the virtual object is required to be used.
In other embodiments, the server 2 obtains the movement information of the virtual object from the client 3.
As described above, the position information of the marker point includes at least one of the following information: the position of the mark point, the serial number of the mark point in the path and the track information to which the mark point belongs, and information including whether the mark point is a special point.
Specifically, the server 2 or the client 3 records the position information of the mark point in advance, for example, receives the position information of the mark point transmitted from the initiator 1 and stores the information in a storage medium such as a hard disk, and when the position information of the mark point is required to be used, the information is acquired from the storage medium.
In other embodiments, the acquiring of the position information of the plurality of marking points for marking the path is receiving the position information of the plurality of marking points for marking the track from other devices such as the development terminal 1; alternatively, the position information of a plurality of mark points for marking the track is acquired by receiving a part of the position information of the mark points from another device such as the development terminal 1, then calculating another part of the position information based on the part of the position information, and storing the two parts of the position information in the storage medium, and when the position information of the mark points is required to be used, acquiring from the storage medium.
And A2, determining the target position according to the movement information of the virtual object and the position information corresponding to the mark point.
The target position of the virtual object refers to the position to which the virtual object will move in the moving process, namely the position of the virtual object at the next moment.
Since the movement information of the virtual object and the position information of the mark point have been acquired, the virtual object is moved along a path defined by the mark point, and the target position of the virtual object can be obtained according to dynamics and geometry.
The virtual object is located between two marker points when in motion, such as: at a position intermediate the two marking points or just coincident with one of the marking points. Referring to fig. 13, there are a first mark point S1 and a second mark point S1 among a plurality of mark points; the first mark point S1 and the second mark point S1 are two adjacent mark points. The previously acquired position information of the mark point includes the position information of the first mark point S1 and the position information of the second mark point S1.
Then, the target position of the virtual object can be calculated based on the position information of the first mark point S1, the position information of the second mark point S2, and the movement information of the virtual object.
The method for obtaining the target position of the virtual object comprises the following steps: the obtained movement information of the virtual object contains a dynamic operation proportion r (such as the operation percentage of the virtual object between the two mark points) of the virtual object between the first mark point S1 and the second mark point S2; for example, the server 2 receives, from the client 3, a dynamic running proportion r of the virtual object between the first marker point S1 and the second marker point S2; wherein, the dynamic operation proportion r; then, based on the position information of the first mark point S1, the position information of the second mark point S2, and the dynamic operation ratio r, the target position of the virtual object can be calculated; wherein the position information of the first mark point comprises the position Pos of the first mark point s1 The method comprises the steps of carrying out a first treatment on the surface of the The scene information of the second mark point includes the position Pos of the second mark point s2 The method comprises the steps of carrying out a first treatment on the surface of the From the above information, the target position Pos of the virtual object can be calculated by linear interpolation p . Target position Pos of virtual object p The expression of (2) is the following expression (4).
Pos p =r*Pos s1 +(1-R)*Pos s2 (4)
In the present embodiment, the position Pos of the first mark point s1 The centroid position of the virtual object corresponding to the first mark point S1 is obtained in the preprocessing part; position Pos of the second marker point s2 Representing the centroid position of the virtual object corresponding to the second mark point S2, and obtaining the centroid position in the preprocessing part; thus, pos p Namely the target position Pos p Centroid position of corresponding virtual object. In other embodiments, the location Pos of the first marker point s1 Representing the middle position of the headstock of the virtual object corresponding to the first mark point S1; position Pos of the second marker point s2 Representing the middle position of the headstock of the virtual object corresponding to the second mark point S2; then Pos p Namely the target position Pos p The middle position of the headstock of the corresponding virtual object; if in the virtual scene, the centroid position of the virtual object needs to be used, the Pos is set as before p Conversion to target position Pos p Centroid position of corresponding virtual object.
In other embodiments, the target position Pos of the virtual object is calculated by curve interpolation p 。
The dynamic operation proportion r of the virtual object between the first marking point S1 and the second marking point S2 is calculated by the server side 2 or the client side 3, specifically, is calculated according to the acquired movement information of the virtual object.
Step A2 includes step a21 and step a22.
Step A21, calculating the dynamic operation proportion r of the virtual object between the first mark point S1 and the second mark point S2.
After a character in a virtual scene, such as a player character, logs on a virtual object, such as a carrier, the carrier can be accelerated by clicking a screen of an intelligent terminal (such as a mobile phone), but the carrier can be decelerated at a certain acceleration without clicking the screen of the intelligent terminal. Thus, one way in which the dynamic operation ratio r of the vehicle between the first marking point S1 and the second marking point S2 can be calculated is as follows: referring to fig. 13, for two consecutive marking points, i.e., a first marking point S1 and a second marking point S2, the operation ratio of the vehicle at the first marking point S1 is set to 0, and the operation ratio of the vehicle at the second marking point S2 is set to 1; the previous frame movement proportion of the carrier is r'; the carrier moves to the target position at a speed v after the time t of the previous frame; the dynamic running ratio r of the vehicle is the following formula (5).
The i s1s2 i represents the length of the line segment S1S2, i.e., the linear distance of the first mark point S1 and the second mark point S2. The ratio (dynamic operation ratio r) of the movement of the virtual object (carrier) between the mark points is obtained using the length of the broken line (line segment S1S 2) connected between the mark points, and referring to fig. 13, the case that the length overhead of the calculation curve is relatively large can be avoided, so that the system overhead can be reduced.
Then, the acquired movement information of the virtual object includes the previous frame operation proportion, the previous frame elapsed time and the real-time speed of the virtual object between the first mark point S1 and the second mark point S2; for example, the server 2 receives from the client 3 the last frame running proportion, the last frame elapsed time, and the real-time speed of the virtual object between the first mark point S1 and the second mark point S2.
A22, calculating the target position of the virtual object according to the dynamic operation proportion and the position information of the marking point.
Specifically, the server 2 or the client 3 calculates the target position of the virtual object according to the dynamic operation proportion, the position of the first mark point and the position of the second mark point.
In other embodiments, interpolation information except for the dynamic operation proportion is adopted, and scene information of marking points such as the position of the first marking point and the position of the second marking point is adopted to calculate the target position of the virtual object; for example, the interpolation information may also be the remaining energy or consumed energy of the virtual object, or the interpolation information may be the remaining amount of the prop carried on the virtual object or the consumed amount of the prop carried on the virtual object.
In other embodiments, the first marker point and the second marker point are not two adjacent points, i.e., there are one or more marker points between the first marker point and the second marker point.
And A3, determining the current position of the virtual object according to the target position.
The server 2 needs to update or save the position and direction information of the virtual object. The client 3 needs to display the position and orientation of the virtual object on the display screen. Thus, according to the obtained target position Pos of the virtual object p The server 2 updates or saves the position of the virtual object as the target position Pos of the virtual object p The client 3 displays the position of the virtual object as the target position Pos of the virtual object on the display screen p . In this way, the virtual object is caused to move along the restricted path.
In other embodiments, the server 2 sends a virtual object control instruction to the client 3 to achieve that the current position of the virtual object is consistent with the target position; exemplary, target location Pos of virtual object p Calculated by the server 2, the server 2 calculates the target position Pos of the virtual object p In the form of data (such as virtual object control instructions) to the client 3, the client 3 displays the position of the virtual object as the target position Pos of the virtual object on the display screen according to the received data p 。
The target position of the virtual object has been previously determined such that the current position of the virtual object dynamically changes along the defined path; in some cases, it is also necessary to determine the direction corresponding to the target position of the virtual object, so that the current orientation of the virtual object also changes dynamically; for this purpose, the game data processing method of the present embodiment further includes steps D1 to D3.
And D1, acquiring direction information corresponding to the mark points.
As described above, the direction information of the mark point includes at least the tangential direction of the mark point.
In the same manner as the acquisition of the position information of the mark point, the server 2 or the client 3 holds the direction information of the mark point in advance, for example, receives the direction information of the mark point transmitted from the initiator 1 and holds the direction information in a storage medium such as a hard disk, and when the direction information of the mark point needs to be used, the direction information of the mark point may be acquired from the storage medium.
And D2, determining the direction corresponding to the target position according to the movement information of the virtual object and the direction information corresponding to the mark point.
The direction corresponding to the target position refers to the direction in which the virtual object will be in the motion process, namely the direction or orientation of the virtual object at the next moment.
In the case where the target position of the virtual object has been previously determined, since the movement information of the virtual object and the direction information corresponding to the mark point have been acquired, and the virtual object moves along the path defined by the mark point, the direction corresponding to the target position of the virtual object can be obtained from dynamics and geometry.
The virtual object is located between the two mark points during movement, and the direction corresponding to the target position can be determined based on the direction information of the first mark point S1, the direction information of the second mark point S2 and the movement information of the virtual object.
The method for obtaining the direction corresponding to the target position of the virtual object comprises the following steps: the obtained movement information of the virtual object contains a dynamic operation proportion r (such as the operation percentage of the virtual object between the two mark points) of the virtual object between the first mark point S1 and the second mark point S2; for example, the server 2 receives, from the client 3, a dynamic running proportion r of the virtual object between the first marker point S1 and the second marker point S2; wherein, the dynamic operation proportion r; then, based on the direction information of the first mark point S1, the direction information of the second mark point S2, and the dynamic operation ratio r, the direction corresponding to the target position of the virtual object can be calculated; wherein the direction information of the first mark point comprises tangential direction of the first mark pointThe direction information of the second mark point comprises the tangential direction of the second mark point +.>From the above information, the target position Pos of the virtual object can be calculated by linear interpolation p Corresponding direction->Direction->The expression of (2) is the following expression (6). />
The direction of the head middle position of the virtual object is the same as the direction of the centroid position of the virtual object, so in the embodiment, there is no need forAnd performing conversion. In other embodiments, p->The conversion is performed, that is, the direction of the headstock middle position of the virtual object is converted into the direction of the centroid position of the virtual object.
Similarly, the direction corresponding to the target position of the virtual object can be calculated according to the dynamic operation proportion and the direction information of the marking point. Specifically, the server 2 or the client 3 calculates the target position and the dynamic direction of the virtual object based on the dynamic operation proportion, the tangential direction of the first marker point, and the tangential direction of the second marker point.
In other embodiments, interpolation information except the dynamic operation proportion is adopted, and then scene information of the mark points such as the tangential direction of the first mark point and the tangential direction of the second mark point is combined to calculate the direction corresponding to the target position of the virtual object.
And D3, determining the current orientation of the virtual object according to the direction corresponding to the target position.
According to the obtained target position Pos of the virtual object p Corresponding directionThe server 2 updates or saves the direction of the virtual object as the direction of the virtual object +.>The client 3 displays the direction of the virtual object as the direction of the virtual object on the display screen +.>
In other embodiments, the server 2 sends the virtual object control instruction to the client 3 to implement making the current direction and direction of the virtual objectConsistent; exemplary, the direction of the virtual object +.>Calculated by the server 2, the server 2 calculates the direction of the virtual object +.>In the form of data (such as virtual object control instructions) to the client 3, the client 3 displays the direction of the virtual object as +.>
From the above, the track is marked with a plurality of mark points (limit path); calculating a target position and a corresponding direction of the virtual object based on the movement information of the virtual object and the position information of the mark point by acquiring the position information of the mark point and the movement information of the virtual object running on the track; the present position of the virtual object is made to coincide with the calculated target position, and the present direction of the virtual object is made to coincide with the calculated direction. In this way, the virtual object can be controlled to move along the track marked by the marking point in the virtual scene, and the position and the direction of the virtual object are dynamically changed under the constraint of the scene information of the virtual object; the movement of the virtual object is fused with the surrounding environment in the virtual scene, so that the fusion of the virtual object and the surrounding environment is realized, and the interaction with other virtual objects such as game entities in the running process of the virtual object is more flexible and is convenient to expand; the workload of an action producer can be reduced, for example, the action producer does not need to produce a large amount of fixed animations or does not need to produce all the action animations of the tracks, and only one mark point is placed at the head and the tail of the linear track, so that the efficiency can be improved and the cost can be reduced. The surrounding environment in the virtual scene is an environment where the virtual object is located, for example: the virtual object moves underground, and the underground is the surrounding environment; the virtual object moves in the field, and the field is the surrounding environment; the virtual object moves in the sky, and the sky is the surrounding environment. By preprocessing, interpolation data, marking point information, track information and other marking point position information or virtual object movement information required in the running process of the virtual object are generated and recorded before the game is applied, so that the loading time of the game can be reduced, and the clamping in the running process of the game can be relieved.
According to the position information of the mark points, such as the position information of the two mark points, the direction information of the mark points and the movement information of the virtual object, the target position and the corresponding direction of the virtual object are obtained through linear interpolation in the running process of the virtual object, and the natural transition of the movement of the virtual object and the fitting degree of the virtual object and the track can be ensured under the condition of limited system resources. Under the condition of sufficient system resources, for example, the configuration of the client 3 is very high, the target position and the corresponding direction of the virtual object are obtained through curve difference values, and the natural transition of the motion of the virtual object and the fitting degree of the virtual object and the track can be better realized.
Calculating the target position and the corresponding direction of the virtual object according to the running proportion of the last frame, the elapsed time of the last frame and the real-time speed of the virtual object passing through the mark points (such as the first mark point S1 and the second mark point S2); since this calculation process requires each frame of the virtual object running to be invoked, in order to make the calculation amount as small as possible to reduce the influence on the virtual scene such as the game performance, the position coordinates of the polyline interpolation are directly adopted as the final result of the position, and the actual performance in the virtual scene is proved to be reasonable and does not cause obvious pattern penetration phenomenon. Of course, under the condition of sufficient system resources, the target position and the corresponding direction of the virtual object can be radially corrected in the process of simulating the curve motion by using the broken line, so that more realistic motion effect can be obtained.
As previously described, there are multiple tracks in the virtual scene and the virtual object needs to switch tracks when moving to the crossover location. In this case, the movement information of the virtual object includes path selection information (such as track selection information). As described above, the path selection information is: when the virtual object is about to switch paths, information representing which path the virtual object is about to switch to for movement; the path selection information is triggered by the player by operating a device such as the client 3; wherein the server 2 receives path selection information from the client 3.
Referring to fig. 13, the plurality of marker points in the virtual scene include a path crossing marker point and a plurality of candidate track-change marker points. The path crossing mark point is a mark point shared or shared by a plurality of tracks, and is a crossing point. The plurality of candidate track-change mark points are mark points on different tracks, respectively, which are tracks to which the virtual object is to be switched. Then it is necessary to determine which track the virtual object is to be switched to and then calculate the target position and corresponding direction of the virtual object.
The obtaining of the corresponding mark point and the position information corresponding to the mark point on the limiting path in the step A1 specifically includes: the method comprises the steps of obtaining a path crossing mark point on a limiting path, determining a track change mark point from a plurality of candidate track change mark points according to path selection information, and obtaining position information of the path crossing mark point and the track change mark point.
From the path selection information it is possible to know which track is selected, i.e. to which track the virtual object is to be switched. Then the candidate track change mark point on the selected track is the track change mark point. The path crossing mark point and the track changing mark point are two adjacent mark points; thus, the path crossing mark point corresponds to the first mark point, and the track changing mark point corresponds to the second mark point; in the scene of switching the track, the target position of the virtual object and the corresponding direction calculation manner are the same as described above.
In the step A2, determining the target position according to the movement information of the virtual object and the position information corresponding to the mark point specifically includes: and determining the target position according to the movement information of the virtual object and the position information corresponding to the path crossing mark point and the track change mark point.
The step D1 of obtaining the direction information corresponding to the mark point specifically comprises the following steps: and acquiring direction information corresponding to the path crossing mark points and the track changing mark points.
Step D2, determining the direction corresponding to the target position according to the movement information of the virtual object and the direction information corresponding to the mark point, wherein the direction is specifically as follows: and determining the direction corresponding to the target position according to the movement information of the virtual object and the direction information corresponding to the path crossing mark point and the track change mark point.
The moving information of the virtual object also comprises the dynamic operation proportion of the virtual object between the path crossing mark point and the track change mark point; the scene information of the path crossing mark point comprises the tangential direction of the path crossing mark point and the position of the path crossing mark point; the scene information of the track change mark point comprises the tangential direction of the track change mark point and the position of the track change mark point; thus, the target position and the corresponding direction of the virtual object can be calculated based on the dynamic running proportion, the tangential direction of the path crossing mark point, the tangential direction of the track changing mark point, the position of the path crossing mark point and the position of the track changing mark point.
According to the above-mentioned, the positions and directions of the mark points on different tracks are calculated in advance at the positions of the track intersections, the next track is determined according to the path selection information, the interpolation data such as the position information and the direction information of the two mark points are selected to obtain the target positions and the corresponding directions of the virtual object, so that the virtual object switches the tracks, the smooth transition at the track switching position can be realized, and the virtual object control method of the switchable tracks can be realized in the game.
Before the virtual object reaches a target position, such as a destination, it is generally desirable that the virtual object can naturally slow down, so as to avoid unreasonable expressions such as sudden stop or track-out of the virtual object. Therefore, referring to fig. 3, the virtual object control method of the present embodiment further includes step A4.
And step A4, calculating the real-time distance between the virtual object and the target position, and changing the real-time speed of the virtual object if the real-time distance reaches a first condition.
The destination location is the last mark point of the track where the virtual object is located. Since the mark points have increasing sequence numbers, the last mark point of the track is the mark point with the largest sequence number in the track.
The real-time distance can be obtained by calculating the distance between the current position of the virtual object and the last mark point of the track. If the real-time distance is less than the threshold (i.e., the first condition is reached), the real-time speed of the virtual object is changed, i.e., the virtual object is slowed down. In other embodiments, changing the real-time speed of the virtual object is to accelerate the virtual object.
As described above, there are cases where the position and the direction need to be switched, including the following cases in particular.
Step A2 of determining the target position according to the movement information of the virtual object and the position information corresponding to the mark point comprises the following steps: calculating the position to be converted of the virtual object based on the movement information of the virtual object and the position information corresponding to the mark point; the position to be converted is the middle position of the headstock of the virtual object; the position to be converted is then converted into a target position of the virtual object.
Or, step D2 of determining, according to the movement information of the virtual object and the direction information corresponding to the marker point, the direction corresponding to the target position includes: calculating the direction to be converted of the virtual object based on the movement information of the virtual object and the direction information corresponding to the mark points; the direction to be converted is the direction of the middle position of the headstock of the virtual object; and converting the direction to be converted into a direction corresponding to the target position of the virtual object.
Step A2 further comprises: converting at least a portion of movement information of the virtual object and/or converting at least a portion of position information of the marker point; such as: and converting the position of the mark point corresponding to the middle position of the head of the virtual object into the position corresponding to the centroid position of the virtual object. Then, the movement information of the virtual object comprises at least a part of the movement information of the converted virtual object and/or the position information of the marker point comprises at least a part of the position information of the converted marker point.
In a virtual scenario of multi-player networking, such as a multi-player networking game, the technical problem of the difference of network transmission and the technical problem caused by the difference of the logic frame rates of the client 3 and the server 2 must be considered. For this purpose, referring to fig. 4, the present embodiment further provides a control method of the virtual object control system, including step D1 and step D2. The virtual object control system comprises a server side 2 and a client side 3.
Step D1, the client 3 receives the check data sent by the server 2.
The verification data is sent by the server 2 to the client 3.
And D2, the client checks the calculation result of the client according to the check data, and if the check result meets the first check condition, the position of the virtual object and the direction of the virtual object are modified on the client according to the data in the check data.
The verification data includes the target position and the corresponding direction of the virtual object calculated by the server side 2.
The calculation result of the client 3 includes the target position and the corresponding direction of the virtual object calculated by the client 2.
The client 3 checks the target position and the corresponding direction calculated by the client 3 according to the target position and the corresponding direction calculated by the server, and if the check result meets the first check condition, the current position and the corresponding direction of the virtual object are made to be consistent with the target position and the current direction of the virtual object are made to be consistent with the direction calculated by the server on the client 3 by adopting the target position and the corresponding direction calculated by the server 2.
Wherein, the first check condition is: the difference between the target position and the corresponding direction calculated by the client 3 and the target position and the corresponding direction calculated by the server 2 is larger than the specified range.
In other embodiments, the verification data includes a history position of the virtual object and a history direction of the virtual object calculated by the server 2, and the calculation result of the client 3 includes the history position of the virtual object and the history direction of the virtual object calculated by the client 2; then, if the verification result meets the first verification condition, the history position and the history direction calculated by the server side 2 are adopted to enable the history position of the virtual object to be consistent with the history position calculated by the server side and enable the history direction of the virtual object to be consistent with the history direction calculated by the server side on the client side 3; wherein, the first check condition is: the difference between the history position of the virtual object calculated by the client 3 and the history direction of the virtual object and the history position of the virtual object calculated by the server and the history direction of the virtual object is larger than a specified range; in this way, correction of history data can be achieved.
According to the above, the server 2 and the client 3 execute the virtual object control method of the embodiment, that is, the program codes run by the server 2 and the client 3 are mostly the same, so that synchronization between the client 3 and the server 2 is realized, and consistency of the algorithm can be ensured and maintenance is convenient. The calculation of the client 3 enjoys the bonus of the client high logic frame rate and is responsible for the smoothness of the expression, so that the smooth transition of the track animation can be ensured; the calculated frame rate of the server 2 is relatively stable, and the calculated result is used as verification data to send to each client 3, so that correction of the clients 3 can be realized, for example, correction of the calculated result of the client 3 with relatively poor performance can be performed, and the performance synchronization among different clients 3 can be ensured. Specifically, each client 3 may exhibit an asynchronous phenomenon due to a difference in machine performance, when the running condition and the check gap of the local virtual object of the client 3 are too large, the local data (such as the calculation result of the client) of the client 3 is checked to be the check data sent by the server 2, and when the difference between the local data of the client 3 and the data of the server 2 is smaller, the check data of the server 2 is not adopted, mainly considering that the client 3 may have network delay and hop Ping (hop Ping refers to unstable network speed), so that the virtual object (such as a mine car) is prevented from shaking caused by adopting the data of the server 2, and the movement of the virtual object is more realistic.
The embodiment provides a virtual object control device for implementing the method of the embodiment; the device is either a server 2 or a client 3. Referring to fig. 5, the apparatus includes an information acquisition unit 21, a dynamic operation unit 22, a position control unit 23, and a speed change unit 24. Step A1 is implemented by the marker point position information acquiring unit 21. Step A2 is implemented by the dynamic operation unit 22. Step A3 is implemented by the position control unit 23. Step A4 is implemented by the speed changing unit 24.
The embodiment also provides a virtual object control device, which is a development terminal 1 and is used for implementing the method of the embodiment; referring to fig. 6, the apparatus includes a marking unit 11, a marking point scene information processing unit 12, and a transmission unit 13. Step C1 is implemented by the marking unit 11. Step C2 is implemented by the marker scene information processing unit 12. Step C3 is implemented by the transmission unit 13.
Referring to fig. 7, the development terminal 1 of the present embodiment includes one or more processors 101, a memory 102, and one or more programs; wherein one or more programs are stored in the memory 102 and configured to be executed by the one or more processors 101, the one or more programs comprising instructions for performing the methods of the present embodiments.
Referring to fig. 8, the server side 2 of the present embodiment includes one or more processors 201, a memory 202, and one or more programs; wherein one or more programs are stored in the memory 202 and configured to be executed by the one or more processors 201, the one or more programs comprising instructions for performing the methods of the present embodiments.
Referring to fig. 9, the client 3 of the present embodiment includes one or more processors 301, a memory 302, and one or more programs; wherein one or more programs are stored in the memory 302 and configured to be executed by the one or more processors 301, the one or more programs comprising instructions for performing the methods of the present embodiments.
Second embodiment
Referring to fig. 10, the present embodiment provides a virtual object control method, which is executed by a client 3; in such a case, steps B1 to B3 are included by the method. Some of the contents of this embodiment are the same as those of the first embodiment, and are briefly described here.
And B1, transmitting at least part of movement information of the virtual object running on the track to the server.
As previously described, the track is marked by a plurality of marking points. At least a portion of the movement information of the virtual object may be path selection information, real-time speed of the virtual object, historical speed of the virtual object, or historical location of the virtual object, etc.
Then, as described above, the server side 2 calculates the target position and the corresponding direction of the virtual object based on the movement information of the virtual object and the scene information of the mark point; wherein the movement information of the virtual object includes at least a part of movement information of the aforementioned virtual object.
And B2, receiving virtual object control data containing the target position of the virtual object.
After calculating the target position and the corresponding direction of the virtual object, the server 2 sends virtual object control data including the target position and the corresponding direction of the virtual object to the client 3, so as to control the client 3.
And B3, enabling the current position of the virtual object to be consistent with the target position, and enabling the current direction of the virtual object to be consistent with the direction corresponding to the target position.
After receiving the virtual object control data sent by the server 2, the client 3 extracts data in the virtual object control data, controls the virtual object to make the current position of the virtual object consistent with the target position, and makes the current direction of the virtual object consistent with the direction corresponding to the target position.
The plurality of mark points in the virtual scene include a first mark point S1 and a second mark point S2; wherein the first mark point S1 and the second mark point S2 are two adjacent mark points.
The step B1 specifically comprises the following steps: at least a part of movement information of the virtual object running on the track is transmitted to the server side 2.
At least a portion of the movement information of the virtual object includes a dynamic running proportion r of the virtual object between the first marker point S1 and the second marker point S2. The server 2 calculates the target position and the corresponding direction of the virtual object based on the scene information of the mark points and the dynamic operation proportion r. Wherein the scene information of the mark points includes scene information of the first mark point and scene information of the second mark point.
In some cases, the foregoing dynamic operation ratio r needs to be calculated by the client 3 and then sent to the server 2. Specifically, the client 3 calculates the aforementioned dynamic operation ratio r based on the previous frame operation ratio, the previous frame elapsed time, and the real-time speed of the virtual object between the first mark point S1 and the second mark point S2. In other embodiments, the previous frame running proportion, the previous frame elapsed time and the real-time speed of the virtual object between the first marking point S1 and the second marking point S2 are transmitted as at least a part of the aforementioned scene information to the server 2.
For the case of switching tracks. The at least a portion of the movement information includes path selection information. The client 3 sends at least a part of the movement information including the path selection information to the server 2. The server 2 calculates the target position and the corresponding direction of the virtual object based on the scene information of the mark point and the movement information of the virtual object including the path selection information. The client 3 receives virtual object control data including a target position and a corresponding direction of the virtual object, and realizes the switching of the virtual object.
Specifically, the plurality of marker points includes a path crossing marker point and a plurality of candidate track change marker points. The at least one part of movement information further comprises dynamic operation proportion of the virtual object between the path crossing mark point and the track change mark point; wherein the track change mark point is one of a plurality of candidate track change mark points; the path crossing mark point and the track changing mark point are two adjacent mark points. The scene information of the mark points includes scene information of the path crossing mark points and scene information of the track change mark points.
The embodiment also provides a virtual object control device, which is used for implementing the method of the embodiment; referring to fig. 14, the apparatus includes an information transmitting unit 31, an information receiving unit 32, and an object control unit 33; the device is a client 3.
Step B1 is performed by the information transmitting unit 31. Step B2 is performed by the information receiving unit 32. Step B3 is performed by the position and direction control unit 33.
According to the above, the client 3 sends at least a part of movement information of the virtual object running on the track to the server 2, the server 2 calculates a target position and a corresponding direction of the virtual object based on the movement information of the virtual object and scene information of the mark point, and sends virtual object control data to the client 3, and the client 3 makes the current position of the virtual object consistent with the target position and makes the current direction of the virtual object consistent with the direction corresponding to the target position according to the virtual object control data, so that consistency of the performance of each client 3 can be ensured.
At least one embodiment of the above-mentioned embodiments can implement a switching track of a virtual object in a virtual scene, such as a 3D game, and an animator, such as an artist, can control the motion of the virtual object by placing a plurality of mark points matching with track tracks in the scene in advance, so that a user, such as a player, can freely perform control of accelerating, decelerating, switching tracks, etc. on the virtual object, and seamlessly integrate a newly added virtual object control method with original core content of the game.
In at least one embodiment described above, the client 3 utilizes the high frame rate of the client logic to improve the smoothness of the interpolation; in network communication, the server 2 only sends check data to the client 3 at low frequency; the calculation pressure of the server side 2 can be relieved, and meanwhile, the situation that the difference among the clients 3 is not too large under the conditions that the network condition is not ideal, the client 3 is blocked seriously and the like can be guaranteed. When the verification result shows that the difference between the calculation result of the client 3 and the calculation result of the server 2 is smaller, the verification data sent by the server 2 is abandoned, and the situation that the virtual object shakes back and forth under the conditions of unstable network environment and serious packet loss can be avoided.
In contrast to the free-moving virtual object approach, at least one embodiment described above reflects the limitation of movement by paving down mark points in the scene, where the virtual object will only move smoothly between those mark points. Compared with the scheme of controlling the movement of the virtual object by the pure animation, at least one embodiment controls the movement speed of the virtual object and switches the track in real time by receiving the input of a player (such as receiving the movement information of the virtual object like path selection information), and the movement path of the virtual object is completely calculated by the program by combining the mark point and the current movement state of the virtual object (the scene information of the virtual object), so that the movement of the virtual object and the kinematic parameters are prevented from being separated, the program can acquire the real-time position, speed, acceleration and other movement information of the virtual object, and the fusion of the virtual object and other game elements is friendly and visual, and the flexibility can be improved.
Those skilled in the art will appreciate that all or part of the processes in the methods of the embodiments may be performed by a computer program to instruct related hardware, the program may be stored in a computer readable storage medium, and the program when executed may include processes as in the embodiments of the methods. And the aforementioned storage medium includes: ROM or random access memory RAM, magnetic or optical disk, etc.
The foregoing is a further detailed description of the invention in connection with specific/preferred embodiments, and it is not intended that the invention be limited to such description. It will be apparent to those skilled in the art that several alternatives or modifications can be made to the described embodiments without departing from the spirit of the invention, and these alternatives or modifications should be considered to be within the scope of the invention.
Claims (21)
1. A game data processing method, characterized in that a graphical user interface is provided through a terminal device, a game screen is displayed on the graphical user interface, the game screen includes a virtual object, the virtual object is configured to move along a limiting path according to a control instruction according to a motion parameter corresponding to the control instruction, wherein the limiting path is a path limiting a moving track of the virtual object in a game scene, and the method includes:
obtaining movement information of the virtual object and corresponding mark points and position information corresponding to the mark points on the limiting path, wherein the limiting path comprises at least two mark points, and the movement information of the virtual object comprises at least one of the following information: the method comprises the steps of running proportion of a last frame of a virtual object, elapsed time of the last frame, real-time speed, running time of the virtual object, path selection information, position of the virtual object, direction of the virtual object, historical speed of the virtual object, historical position of the virtual object, historical direction of the virtual object and size of the virtual object in a virtual scene;
Determining a target position according to the movement information of the virtual object and the position information corresponding to the mark point, wherein the target position refers to a position to which the virtual object is to be moved in the movement process;
and determining the current position of the virtual object according to the target position.
2. The method according to claim 1, wherein the method further comprises:
acquiring direction information corresponding to the mark points;
determining a direction corresponding to a target position according to the movement information of the virtual object and the direction information corresponding to the mark point;
and determining the current orientation of the virtual object according to the direction corresponding to the target position.
3. The method of claim 1, wherein the method comprises the steps of,
the mark points comprise a first mark point and a second mark point;
the target position is determined according to the movement information of the virtual object and the position information corresponding to the mark point, specifically: and calculating the target position of the virtual object according to the position information of the first mark point, the position information of the second mark point and the movement information of the virtual object.
4. The method of claim 1, wherein the method comprises the steps of,
the mark points comprise a first mark point and a second mark point;
The movement information of the virtual object comprises a dynamic operation proportion of the virtual object between the first mark point and the second mark point;
the target position is determined according to the movement information of the virtual object and the position information corresponding to the mark point, specifically: determining the target position of the virtual object according to the position information of the mark points and the dynamic operation proportion; the position information of the mark points includes position information of the first mark point and position information of the second mark point.
5. The method according to claim 3 or 4, wherein,
the first mark point and the second mark point are two adjacent mark points.
6. The method of claim 1, wherein the method comprises the steps of,
the mark points comprise a first mark point and a second mark point;
the position information of the mark points comprises the position information of the first mark point and the position information of the second mark point;
the determining the target position according to the movement information of the virtual object and the position information corresponding to the mark point specifically comprises the following steps:
calculating the dynamic operation proportion of the virtual object between the first mark point and the second mark point;
And calculating the target position of the virtual object according to the dynamic operation proportion and the position information of the marking point.
7. The method of claim 6, wherein the step of providing the first layer comprises,
the first mark point and the second mark point are two adjacent mark points;
the moving information of the virtual object comprises a previous frame operation proportion, a previous frame passing time and a real-time speed of the virtual object between the first mark point and the second mark point;
the calculating of the dynamic operation proportion of the virtual object between the first mark point and the second mark point is specifically as follows: and calculating the dynamic operation proportion of the virtual object between the first mark point and the second mark point based on the operation proportion of the last frame, the elapsed time of the last frame and the real-time speed.
8. The method of claim 2, wherein the step of,
the movement information of the virtual object comprises path selection information;
the marking points comprise a path crossing marking point and a plurality of candidate track changing marking points;
the obtaining of the corresponding mark point on the limiting path and the position information corresponding to the mark point specifically includes: acquiring a path crossing mark point on the limiting path, determining a track change mark point from the candidate track change mark points according to the path selection information, and acquiring position information of the path crossing mark point and the track change mark point;
The target position is determined according to the movement information of the virtual object and the position information corresponding to the mark point, specifically: determining a target position according to the movement information of the virtual object and the position information corresponding to the path crossing mark point and the track change mark point;
the obtaining of the direction information corresponding to the mark point specifically includes: acquiring direction information corresponding to the path crossing mark points and the track changing mark points;
the direction corresponding to the target position is determined according to the movement information of the virtual object and the direction information corresponding to the mark point, and the direction is specifically as follows: and determining the direction corresponding to the target position according to the movement information of the virtual object and the direction information corresponding to the path crossing mark point and the track change mark point.
9. The method of claim 8, wherein the step of providing the first layer comprises,
the path crossing mark points and the track changing mark points are two adjacent mark points;
the movement information of the virtual object further comprises a dynamic operation proportion of the virtual object between the path crossing mark point and the track change mark point;
the direction information of the path crossing mark points comprises tangential directions of the path crossing mark points; the position information of the path crossing mark point comprises the position of the path crossing mark point;
The direction information of the track change mark point comprises the tangential direction of the track change mark point; the position information of the track change mark point comprises the position of the track change mark point;
the target position is determined according to the movement information of the virtual object and the position information corresponding to the mark point, specifically: determining a target position according to the dynamic operation proportion, the position of the path crossing mark point and the position of the track change mark point;
the direction corresponding to the target position is determined according to the movement information of the virtual object and the direction information corresponding to the mark point, and the direction is specifically as follows: and determining the direction corresponding to the target position according to the dynamic operation proportion, the tangential direction of the path crossing mark point and the tangential direction of the track change mark point.
10. The method of claim 1, wherein the method comprises the steps of,
further comprises: generating and recording scene information of the mark points;
generating and recording scene information of the mark points includes: generating and recording the tangential direction of the mark points;
generating and recording the tangential direction of the marker points includes:
taking the direction of a connecting line of the mark point and the last mark point or the next mark point as the tangential direction of the mark point;
Generating and recording tangential directions of the mark points according to the direction vector from the last mark point to the mark point, the direction vector from the mark point to the next mark point, the distance from the last mark point to the mark point and the distance from the mark point to the next mark point;
the marking points are crossed marking points of different tracks; generating and recording tangential directions of the cross mark points in different tracks;
the tangential direction of the marking point is specifically generated and recorded by the following steps: the tangential direction of the marker points is generated and recorded by the linear difference.
11. The method of claim 1, wherein determining the target location based on the movement information of the virtual object and the location information corresponding to the marker point comprises:
calculating the position to be converted of the virtual object based on the movement information of the virtual object and the position information of the mark point;
and converting the position to be converted into a target position of the virtual object.
12. The method according to claim 1, wherein: determining the direction corresponding to the target position according to the movement information of the virtual object and the direction information corresponding to the mark point comprises the following steps:
Determining the direction to be converted of the virtual object according to the movement information of the virtual object and the direction information corresponding to the mark point;
and converting the direction to be converted into a direction corresponding to the target position of the virtual object.
13. The method of claim 1, wherein determining the target location based on the movement information of the virtual object and the location information corresponding to the marker point comprises:
converting at least a part of movement information of the virtual object and/or converting at least a part of position information of the mark point;
the movement information of the virtual object comprises at least a part of the movement information of the virtual object after conversion, and/or the position information of the mark point comprises at least a part of the position information of the mark point after conversion.
14. A server, characterized in that: including one or more processors, memory, and one or more programs; wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs comprising instructions for performing the method of any of claims 1-13.
15. A client, characterized by: including one or more processors, memory, and one or more programs; wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs comprising instructions for performing the method of any of claims 1-13.
16. A virtual object control system, characterized by: comprising a server according to claim 14 and a client according to claim 15.
17. A control method of a virtual object control system is characterized in that,
the virtual object control system comprises the server according to claim 14 and the client according to claim 15;
the control method comprises the following steps:
the client receives the check data sent by the server;
and the client checks the calculation result of the client according to the check data, and if the check result meets a first check condition, the position of the virtual object is modified on the client according to the data in the check data.
18. The control method according to claim 17, wherein,
The verification data comprise the target position calculated by the server;
the calculation result of the client comprises the target position calculated by the client;
the client checks the calculation result of the client according to the check data, and if the check result meets a first check condition, the position of the virtual object is modified on the client according to the data in the check data, specifically: and the client checks the target position calculated by the client according to the target position calculated by the server, and if the check result meets a first check condition, the current position of the virtual object is consistent with the target position calculated by the server on the client by adopting the target position calculated by the server.
19. The control method of claim 17, wherein the first check condition is: the difference between the position of the virtual object calculated by the client and the position of the virtual object calculated by the server is larger than a specified range.
20. The control method according to claim 19, wherein,
The verification data comprise the target position calculated by the server;
the calculation result of the client comprises the target position calculated by the client;
the first verification condition is as follows: the difference between the target position calculated by the client and the target position calculated by the server is larger than a specified range.
21. A computer-readable storage medium, comprising: the computer readable storage medium having stored therein program instructions which, when executed by a processor of a computer, cause the processor to perform the method according to any of claims 1 to 13 or 17 to 20.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010924041.5A CN112076471B (en) | 2020-09-04 | 2020-09-04 | Game data processing method, control method, server, client and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010924041.5A CN112076471B (en) | 2020-09-04 | 2020-09-04 | Game data processing method, control method, server, client and system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112076471A CN112076471A (en) | 2020-12-15 |
CN112076471B true CN112076471B (en) | 2024-03-15 |
Family
ID=73731456
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010924041.5A Active CN112076471B (en) | 2020-09-04 | 2020-09-04 | Game data processing method, control method, server, client and system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112076471B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113713399B (en) * | 2021-09-13 | 2022-08-30 | 广州简悦信息科技有限公司 | Virtual object control method and device, electronic equipment and computer storage medium |
CN117046102B (en) * | 2023-07-17 | 2024-02-13 | 广州三七极耀网络科技有限公司 | Method, device, equipment and medium for synchronizing object coordinates in game |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20060101378A (en) * | 2006-09-07 | 2006-09-22 | 김유정 | System and method for controlling game of moving path, game control devices and recording medium |
JP2007296078A (en) * | 2006-04-28 | 2007-11-15 | Nintendo Co Ltd | Game device and game program |
CN103124978A (en) * | 2011-01-27 | 2013-05-29 | 爱信艾达株式会社 | Guidance device, guidance method, and guidance program |
CN110538455A (en) * | 2019-09-05 | 2019-12-06 | 腾讯科技(深圳)有限公司 | Method, device, terminal and storage medium for controlling movement of virtual object |
CN111035923A (en) * | 2019-12-18 | 2020-04-21 | 腾讯科技(深圳)有限公司 | Operation method and device of virtual prop, storage medium and electronic device |
CN111481931A (en) * | 2020-04-13 | 2020-08-04 | 网易(杭州)网络有限公司 | Path finding control method of virtual object in game, electronic device and storage medium |
-
2020
- 2020-09-04 CN CN202010924041.5A patent/CN112076471B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2007296078A (en) * | 2006-04-28 | 2007-11-15 | Nintendo Co Ltd | Game device and game program |
KR20060101378A (en) * | 2006-09-07 | 2006-09-22 | 김유정 | System and method for controlling game of moving path, game control devices and recording medium |
CN103124978A (en) * | 2011-01-27 | 2013-05-29 | 爱信艾达株式会社 | Guidance device, guidance method, and guidance program |
CN110538455A (en) * | 2019-09-05 | 2019-12-06 | 腾讯科技(深圳)有限公司 | Method, device, terminal and storage medium for controlling movement of virtual object |
CN111035923A (en) * | 2019-12-18 | 2020-04-21 | 腾讯科技(深圳)有限公司 | Operation method and device of virtual prop, storage medium and electronic device |
CN111481931A (en) * | 2020-04-13 | 2020-08-04 | 网易(杭州)网络有限公司 | Path finding control method of virtual object in game, electronic device and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN112076471A (en) | 2020-12-15 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112076471B (en) | Game data processing method, control method, server, client and system | |
JP6514220B2 (en) | Method and system for moving characters in an online game | |
CN102054121B (en) | Method for building 3D (three-dimensional) panoramic live-action online game platform | |
JP2020192336A (en) | Game play companion application | |
CN111298433B (en) | Animation video processing method and device, electronic equipment and storage medium | |
JP7374209B2 (en) | Virtual object movement control method, movement control device, terminal and computer program | |
CN110141862B (en) | Method and device for mobile control in game, electronic equipment and storage medium | |
CN112862935A (en) | Game character motion processing method and device, storage medium and computer equipment | |
CN109885778A (en) | A kind of tourism guide to visitors application method and system based on augmented reality | |
JP2016528563A (en) | Image processing apparatus, image processing system, image processing method, and storage medium | |
JP2022520016A (en) | Information display methods, devices, electronic devices and computer programs | |
US11633671B2 (en) | Method and apparatus for dynamic management of formations in a video game | |
CN111494953A (en) | Game role movement synchronization method, device, equipment and storage medium | |
CN113209618B (en) | Virtual character control method, device, equipment and medium | |
CN111921201B (en) | Method and device for generating frame data, storage medium and computer equipment | |
JP2024527463A (en) | Coordinate axis display method, device, terminal and computer program applied to virtual environment | |
JP2008220671A (en) | Game machine, game machine control method and program | |
JPH11175748A (en) | Image generating device and information storage medium | |
CN105243268A (en) | Game map positioning method and apparatus as well as user terminal | |
US10967267B2 (en) | Changing a camera view in an electronic game | |
US20240062456A1 (en) | Variable update adaptation and simulation delay in multiuser virtual reality application | |
US7985136B2 (en) | Image producing device, speed expressing method, and program | |
CN116196611A (en) | Somatosensory game method based on waving action | |
CN115430147A (en) | Virtual object control method, virtual object control device, storage medium, and device | |
CN104766363B (en) | The WARPING method of the multi-direction reference view of drawing based on depth map |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |