CN111729312A - Position synchronization method, device and equipment - Google Patents

Position synchronization method, device and equipment Download PDF

Info

Publication number
CN111729312A
CN111729312A CN202010615557.1A CN202010615557A CN111729312A CN 111729312 A CN111729312 A CN 111729312A CN 202010615557 A CN202010615557 A CN 202010615557A CN 111729312 A CN111729312 A CN 111729312A
Authority
CN
China
Prior art keywords
movable
absolute position
position coordinates
bearing
area
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.)
Pending
Application number
CN202010615557.1A
Other languages
Chinese (zh)
Inventor
国石
马宗扬
喻思瑞
王志昊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Chengdu Perfect World Network Technology Co Ltd
Original Assignee
Chengdu Perfect World Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Chengdu Perfect World Network Technology Co Ltd filed Critical Chengdu Perfect World Network Technology Co Ltd
Priority to CN202010615557.1A priority Critical patent/CN111729312A/en
Publication of CN111729312A publication Critical patent/CN111729312A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/55Controlling game characters or game objects based on the game progress
    • A63F13/56Computing 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The application discloses a position synchronization method, a position synchronization device and position synchronization equipment, relates to the technical field of computers, and aims to improve the accuracy of position synchronization by calculating the absolute position coordinates of an object through a server. The method comprises the following steps: acquiring an operation instruction of moving an object in a movable object bearing area, and extracting a displacement parameter corresponding to the operation instruction; sending a position synchronization request of the object generated according to the displacement parameters to a server side, and calculating absolute position coordinates of the object by the server side according to relative position coordinates of the object in a movable bearing object area; absolute position coordinates of the object are received.

Description

Position synchronization method, device and equipment
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method, an apparatus, and a device for position synchronization.
Background
In the online game, no matter whether an end game, a hand game, a page game, or the like, if an instant battle scene is adopted, scenes such as real-time movement, release skills, battles, and the like of multiple characters on the same screen are basically encountered, and therefore, how to manage synchronization of various character information in the same screen, such as real-time switching of positions of characters, and states of equipment, fashion and buffers on the characters, is naturally also required to be realized. Therefore, position synchronization is very important in network games, which ensures that each player sees the content on the screen roughly uniformly.
In the related art, after a player enters a game scene, the player belongs to an object in the game world and corresponds to position coordinates in the game world, and the game scene inevitably encounters a special situation that a battle carrier is needed to execute a task, wherein the battle carrier is used as a movable bearing object in the task scene, can be a battleship, an elevator, an airplane and the like, and also corresponds to the position coordinates in the game world. When the object is in the movable bearing object, the original position coordinates of the object are usually bound with the position coordinates of the movable bearing object, and once the object has a position change due to movement or release skills, the position coordinates of the object need to be regenerated by the client based on the original position coordinates of the object and sent to the server for broadcasting. However, when the position of the object in the movable carrying object changes, the position of the movable carrying object itself also changes, and it is difficult to accurately calculate the position coordinate of the object after the position of the object changes only by the original position coordinate of the object, so that the position coordinate of the object in the server is inaccurate, and an error exists in position synchronization.
Disclosure of Invention
In view of this, the present application provides a method, an apparatus, and a device for position synchronization, and mainly aims to solve the problem of error in position synchronization in the prior art.
According to a first aspect of the present application, there is provided a position synchronization method, the method including:
acquiring an operation instruction of moving an object in a movable object bearing area, and extracting a displacement parameter corresponding to the operation instruction;
sending a position synchronization request of the object generated according to the displacement parameters to a server side, and calculating absolute position coordinates of the object by the server side according to relative position coordinates of the object in a movable bearing object area;
absolute position coordinates of the object are received.
According to a second aspect of the present application, there is provided a position synchronization method, including:
receiving a position synchronization request of an object, and respectively determining an absolute position coordinate of a movable bearing object and a relative position coordinate of the object in a movable bearing object area according to a displacement parameter carried by the position synchronization request of the object;
calculating the absolute position coordinate of the object according to the absolute position coordinate of the movable bearing object and the relative position coordinate of the object in the movable bearing object area;
and transmitting the absolute position coordinates of the object to a client as broadcast information.
According to a third aspect of the present application, there is provided a location synchronization apparatus applied to a client side, the apparatus including:
the device comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring an operation instruction of moving an object in a movable object bearing area and extracting a displacement parameter corresponding to the operation instruction;
the first sending unit is used for sending the position synchronization request of the object generated according to the displacement parameter to a server side, and the server side calculates the absolute position coordinate of the object according to the relative position coordinate of the object in the movable bearing object area;
a first receiving unit for receiving absolute position coordinates of the object.
According to a fourth aspect of the present application, there is provided a position synchronization apparatus applied to a server side, the apparatus including:
the determining unit is used for receiving a position synchronization request of an object, and respectively determining the absolute position coordinate of the movable bearing object and the relative position coordinate of the object in the movable bearing object area according to the displacement parameter carried by the position synchronization request of the object;
a second calculation unit for calculating absolute position coordinates of the object based on the absolute position coordinates of the movable carrying object and relative position coordinates of the object within the movable carrying object region;
a broadcasting unit for transmitting the absolute position coordinates of the object as broadcast information to a client.
According to a fifth aspect of the present application, there is provided a location synchronization system, comprising a client and a server;
the client acquires an operation instruction of moving an object in a movable object bearing area, extracts a displacement parameter corresponding to the operation instruction, and sends a position synchronization request of the object generated according to the displacement parameter to a server;
the server receives a position synchronization request of an object, and respectively determines the absolute position coordinates of a movable bearing object and the relative position coordinates of the object in a movable bearing object area according to displacement parameters carried by the position synchronization request of the object;
the server calculates the absolute position coordinate of the object according to the absolute position coordinate of the movable bearing object and the relative position coordinate of the object in the movable bearing object area, and transmits the absolute position coordinate of the object to the client as broadcast information;
the client receives absolute position coordinates of the object.
According to a sixth aspect of the present application, there is provided a storage medium having stored thereon a computer program which, when executed by a processor, implements the above-described position synchronization method.
According to a seventh aspect of the present application, there is provided a client device and a server device, comprising a storage medium, a processor and a computer program stored on the storage medium and executable on the processor, the processor implementing the above-mentioned position synchronization method when executing the program.
By the technical scheme, compared with the mode of calculating the absolute position coordinate of the object by the client side in the existing mode to realize position synchronization, the method, the device and the equipment provided by the application extract the displacement parameter corresponding to the operation instruction by acquiring the operation instruction of moving the object in the movable bearing object area, further, when the object moves, the client side does not directly modify the absolute position coordinate of the object, but generates the position synchronization request of the object by the displacement parameter and sends the position synchronization request to the server side, the server side calculates the absolute position coordinate of the object according to the relative position coordinate of the object in the movable bearing object area, and considers the absolute position coordinate of the movable bearing object into the absolute position coordinate of the object, so that the absolute position coordinate received by each client side is more accurate, the method can truly restore the game scene, and simultaneously improves the accuracy of object position synchronization in the game scene.
The foregoing description is only an overview of the technical solutions of the present application, and the present application can be implemented according to the content of the description in order to make the technical means of the present application more clearly understood, and the following detailed description of the present application is given in order to make the above and other objects, features, and advantages of the present application more clearly understandable.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the application and together with the description serve to explain the application and not to limit the application. In the drawings:
fig. 1 is a schematic flowchart illustrating a position synchronization method according to an embodiment of the present application;
fig. 2 is a schematic flow chart illustrating another position synchronization method provided in an embodiment of the present application;
fig. 3 is a schematic flow chart illustrating another position synchronization method provided in the embodiment of the present application;
FIG. 4 is a timing diagram illustrating an example of position synchronization provided by an embodiment of the present application;
FIG. 5 is a schematic structural diagram of a position synchronization apparatus provided in an embodiment of the present application;
FIG. 6 is a schematic structural diagram of another position synchronization apparatus provided in an embodiment of the present application;
FIG. 7 is a schematic structural diagram of another position synchronization apparatus provided in an embodiment of the present application;
FIG. 8 is a schematic structural diagram of another position synchronization apparatus provided in an embodiment of the present application;
fig. 9 is a schematic device structure diagram of a computer apparatus according to an embodiment of the present invention.
Detailed Description
The content of the invention will now be discussed with reference to a number of exemplary embodiments. It is to be understood that these examples are discussed only to enable those of ordinary skill in the art to better understand and thus implement the teachings of the present invention, and are not meant to imply any limitations on the scope of the invention.
As used herein, the term "include" and its variants are to be read as open-ended terms meaning "including, but not limited to. The term "based on" is to be read as "based, at least in part, on". The terms "one embodiment" and "an embodiment" are to be read as "at least one embodiment". The term "another embodiment" is to be read as "at least one other embodiment".
The position synchronization system comprises a client and a server, wherein the client can be a terminal device used by a player, such as an intelligent device with a game application function, such as a mobile phone, a computer, a tablet and the like, and is specifically used for acquiring an operation instruction of moving an object in a movable object bearing area, extracting a displacement parameter corresponding to the operation instruction, sending a position synchronization request of the object generated according to the displacement parameter to the server, and further receiving an absolute position coordinate of the object returned by the server. The server may be a server facility responsible for managing objects in the game, and within the server may be directed to subsystems that manage different objects, for example, there are subsystems responsible for managing player objects, there are subsystems responsible for managing monster objects, there are subsystems responsible for managing removable carrying objects, the server is mainly a subsystem responsible for managing the mobile bearing object, and is specifically used for receiving a position synchronization request of the object, respectively determining the absolute position coordinates of the movable bearing object and the relative position coordinates of the object in the movable bearing object area according to the displacement parameters carried by the position synchronization request of the object, and further, calculating the absolute position coordinates of the object according to the absolute position coordinates of the movable bearing object and the relative position coordinates of the object in the movable bearing object area, and transmitting the absolute position coordinates of the object to the client as broadcast information. In particular, in practical applications, the operation instruction of the object moving in the movable object bearing area is usually an operation instruction for controlling the object to move, and during the moving process of the object bearing, the movable object bearing may also move simultaneously, the absolute position coordinates of the object necessarily change, the server is used to store the relative position coordinates of the object in the movable object bearing area, so that each time the object moves, the client does not directly modify the absolute position coordinates of the object, but the server modifies the relative position coordinates of the object in the movable object bearing area, and then the absolute position coordinates of the object are calculated according to the absolute position coordinates of the movable object bearing and the relative position coordinates of the object in the movable object bearing area, the absolute position coordinates of the object taking into account the relative position coordinates of the object in the movable object bearing area, the absolute position coordinates of the object after the position of the object is changed can be accurately calculated, and the accuracy of object position synchronization is improved.
In order to solve the problem, the present embodiment provides a location synchronization method, as shown in fig. 1, which is applied to a client, and includes the following steps:
101. and acquiring an operation instruction of moving the object in the movable object bearing area, and extracting a displacement parameter corresponding to the operation instruction.
In a game scene, it is often necessary to create a large number of moving object models, for example, an object that a player enters into the game scene, a character object, a movable object, etc. that are set in the game scene, ideally, in a case where the object does not enter into a movable object area, absolute position coordinates of the object calculated after generating a control command for the moving object are determined only by a displacement parameter generated by the movement of the control object, and in a case where the object enters into the movable object area, the absolute position coordinates of the object calculated after generating a control command for the moving object need to consider the displacement parameter generated by the movement of the control object and the displacement parameter of the movable object during the movement. Therefore, the embodiment of the invention also adds the displacement parameter (if displacement exists) generated by the movement of the movable bearing object while considering the displacement parameter generated by the movement of the object.
In the embodiment of the present invention, the operation instruction for moving the movable object in the movable object bearing area may be a control instruction for triggering the object to move up, down, back, left, right, jump, launch skill, etc., and the control instruction for moving the movable object bearing may be a control instruction for triggering the movable object bearing to move up, down, left, right, rotate, etc. The displacement parameters corresponding to the specific operation instructions may set control parameters in multiple directions (including at least X, Y and even the Z coordinate direction) for any object in the game, and each direction control instruction corresponds to an offset attribute, which is a difference between a new coordinate and an original coordinate, and is equivalent to making a corresponding correction for the movement range of the object. Specifically, in the process of extracting the displacement parameter corresponding to the operation instruction, the control parameter of the object in the direction is obtained, so that the offset data of the object in the direction is extracted, and then the displacement parameter corresponding to the operation instruction is determined according to the offset attribute in the direction.
The execution main body of the embodiment may be a position synchronization device or equipment, and may be configured at the client, after the object model is constructed, because the object model generates a moving operation instruction in the movable object bearing region, the operation instruction corresponds to a displacement parameter, and a relative movement condition of the object in the movable object bearing region may be determined by the displacement parameter, so as to calculate an absolute position coordinate of the object according to the relative movement condition, and improve accuracy of object positioning.
102. And sending the position synchronization request of the object generated according to the displacement parameters to a server, and calculating the absolute position coordinate of the object by the server according to the relative position coordinate of the object in the movable object bearing area.
In the embodiment of the present invention, the displacement parameter may represent the movement of the object in different directions, and for the case that the object is not in the movable object-bearing area and moves, the position synchronization request of the object does not relate to the movement of the movable object-bearing area, and the client may modify the absolute position coordinate of the object directly based on the displacement parameter of the object; for the case that the object moves in the movable bearing object area, the position synchronization request of the object relates to the movement of the movable bearing object, the object can move while moving, if the client modifies the absolute position coordinate of the object directly based on the displacement parameter generating the movement, the absolute position coordinate of the object inevitably generates deviation, here, the position synchronization request generating the object by the displacement parameter generating the movement is sent to the server, and since the server stores the relative position coordinate of the object in the movable bearing area, the server can calculate the absolute position coordinate of the object based on the relative position coordinate and the absolute position coordinate of the movable bearing object.
Generally, an object enters a game scene and corresponds to an initial position coordinate, when the position of the object changes after moving, a client sends the position coordinate of the object after the position of the object changes to a server, the server performs necessary verification, and broadcasts the position coordinate of the object to clients of other players if the verification rule is satisfied, so that the position coordinate of the object can be correctly displayed in the clients of other players, if the position coordinate of the object has a large error, the object of one player can see the object of another player, and the object of the player can be attacked clearly when the skill is started is selected, the skill is not hit by the object of the player actually, or the object of one player can see the object of another player but cannot see the object of the player actually.
It should be noted that, here, the position coordinates of the object are absolute position coordinates of the object in the game scene, and any control command applied to the object is triggered based on the absolute position coordinates of the object.
103. Absolute position coordinates of the object are received.
In the embodiment of the invention, the absolute position coordinates of the object are calculated by the server, the client cannot acquire the server program and cannot modify the absolute position coordinates of the object in the program, and the game plug-in can be effectively prevented.
Further, as a refinement and an extension of the specific implementation of the foregoing embodiment, in order to fully describe the specific implementation process of the present embodiment, the present embodiment provides another position synchronization method, as shown in fig. 2, where the method includes:
201. when a trigger instruction that the object enters the movable object bearing area is detected, the initial position coordinates of the object are sent to the server side, and the server side calculates and stores the relative position coordinates of the object in the movable object bearing area.
In general, when an object does not enter the movable carrying object area, the absolute position coordinate of the modified object after the object moves is not affected by whether the movable carrying object moves, and when a trigger instruction that the object enters the movable carrying area is detected, the absolute position coordinate of the object and the absolute position coordinate of the movable carrying object have a relationship and are affected with each other.
202. And acquiring an operation instruction of moving the object in the movable object bearing area, and extracting a displacement parameter corresponding to the operation instruction.
It will be appreciated that the operating instructions for moving the object may be triggered by the player by clicking a mouse (or a touch screen action, etc.), and if the player wishes to move his object to a target location coordinate, the system may move the object to the target location coordinate by simply clicking the mouse at the target location coordinate, and if the target location coordinate is a building or inaccessible terrain, the system will reject the operating instructions for moving the object.
In the embodiment of the present invention, since the displacement parameter includes a displacement vector in a direction, and the direction of the object after each movement is a single direction, the displacement parameter of the object is a displacement value formed by the displacement vector in the direction, and the direction of the displacement value is the direction, for example, if the displacement vector is a control command for moving s in a direction of 90 degrees along the object coordinate system, the displacement value is s, and the direction is 90 degrees along the object coordinate system.
203. And sending the position synchronization request of the object generated according to the displacement parameters to a server, and calculating the absolute position coordinate of the object by the server according to the relative position coordinate of the object in the movable object bearing area.
In the embodiment of the invention, the position synchronization request of the object is a request sent by the client to the server for object relocation, after the object moves each time, the client can form the displacement parameter of the object into the position synchronization request of the object and send the position synchronization request of the object to the server, and the server carries out object relocation again, so that the absolute position coordinates of the object are consistent on the server and all the clients, the object position in the game scene is ensured to be correct, the game scene is truly restored, and the game experience of a user is improved.
204. Absolute position coordinates of the object are received.
In the related technology, the absolute position coordinates of the object are calculated on the client, the client program is easily stolen by a player, the player can modify the absolute position coordinates of the object after obtaining the client program to achieve the cheating function, the player cannot obtain the server program, the absolute position information of the object is calculated through the server, and the program modification cannot occur, so that the cheating by the player using the client program is effectively prevented.
205. And receiving the target position coordinates of the movable bearing object calculated according to the displacement parameters, and determining the absolute position coordinates of the movable bearing object.
It is understood that the movable bearing object is also an object with a movement function in a game scene, and can receive an operation instruction of movement. When a player controls the movable bearing object to move, the absolute position coordinate of the movable bearing object is necessarily changed, the absolute position coordinate of the object is also changed, but the relative position coordinate of the object in the movable bearing object area is not changed, the server calculates the target position coordinate of the movable bearing object based on the displacement parameter, the target position coordinate is the absolute position coordinate of the movable bearing object, and the target position coordinate is further sent to the client, so that the client can restore the real position of the movable bearing object in the world coordinate system by using the target position coordinate when rendering.
It should be noted that, the description of the position of any object in the game scene is usually absolute position coordinates of the object in a world coordinate system, where the absolute position coordinates can truly reflect the position of the object in the game scene, the world coordinate system is a reference framework required for describing other coordinate systems, and all objects in the three-dimensional world actually have their own object coordinate systems, for example, for an automobile object model, each vertex of the automobile object model should have its own position information, which is the position coordinates of the automobile object model in the object coordinate system, and when the automobile object model is put into the world coordinate system, the position where the origin of the automobile object model is located is the absolute position coordinates of the automobile object model in the world coordinate system.
206. And calculating the absolute position coordinates of the related objects in the movable bearing object area by using the absolute position coordinates of the movable bearing object.
For the situation that a player controls the movement of an object generated by a movable carrying object, because the movable carrying object is bound with related objects, such as various NPC objects, the NPC objects play an important role in a game scene as related objects, when the movable carrying object moves to a target position coordinate, the absolute position coordinate of the bound related objects also correspondingly moves, if the absolute position coordinates of a large number of related objects after moving are calculated by a server, the service resources are limited and the expression is delayed, the client can use hanging point information for the related objects to bind the related objects to the movable carrying object, and further when the target position coordinate formed by the movable carrying object on a displacement parameter is known, the absolute position coordinate of the movable carrying object is calculated, so that the rendering of the NPC objects on the client is accelerated, the player is not made to experience a disjointing between the NPC object and the movable carrying object.
It can be understood that the movable bearing object model and the associated object model belong to a parent-child relationship, the movable bearing object serves as a parent node, all associated object models bound to the movable bearing object belong to child nodes, and the hanging point information is used for associating the initial position relationship of the parent-child nodes. Specifically, the basic offset of the associated object relative to the movable bearing object can be determined by using the hanging point information of the associated object bound to the movable bearing object, the basic offset is further added to the absolute position coordinate of the movable bearing object, and the absolute position coordinate of the associated object in the movable bearing object area is calculated.
It should be noted that the above hanging point information can only ensure the correctness of the bound associated object as a child node relative to the initial offset position of the mobile bearer model as a parent node, however, if the associated object or the mobile bearer moves, the client needs to rely on the updated absolute position coordinates of the mobile bearer object to calculate the absolute position coordinates of the associated object.
In the embodiment of the present invention, each hanging point information may be provided with two hanging points, one hanging point is used to determine which part of the movable bearing object is bound to the associated object, and the other hanging point is used to determine which part of the associated object is bound to the movable bearing object, so that one hanging point corresponds to a coordinate system and can be represented by a matrix in the program. Specifically, in the process of determining the basic offset of the associated object relative to the movable bearer object by using the information of the hanging point at which the associated object is bound to the movable bearer object, the information of the hanging point at which the associated object is bound to the movable bearer object may be used to obtain the mutual binding position information of the associated object and the movable bearer object, the mutual binding position information may be determined by the two set hanging points, and further, the basic offset of the associated object relative to the movable bearer object may be determined according to the mutual binding position information of the associated object and the movable bearer object.
Specifically, in 3D mathematics, a matrix is an important tool for describing the relationship between two coordinate systems, an inflection point can be represented by the matrix in a program, and since the hanging point information includes not only position information in a three-dimensional space but also direction information in a three-dimensional attack, if the hanging point position is taken as an origin reference point, three direction components passing through the hanging point position as the origin reference point are taken as X, Y, Z axes, so that a physical coordinate system of the hanging point is formed.
For example, when an NPC object model needs to be bound to a gun platform in a warship model, two hanging point information need to be set, the first hanging point information is the hanging point information of the warship object model, and the hanging point is located at the gun platform at the bow of the warship object model, that is, the bound position information of the warship object model; the other hanging point information is the hanging point information of the NPC object model, the hanging point may be located at the head of the NPC object model, or may be the foot of the NPC object model, or may be any position of the NPC object model in the object coordinate system, it should be noted that if the hanging point is set on the foot of the NPC object model, the foot of the NPC object model is located at the position of the gunship object bow gun platform hanging point, and if the hanging point is set on the head of the NPC object, the head of the NCP object model is located at the position of the gunship object gunship bow gun platform hanging point.
Particularly, in an application scene that a battleship is used as a movable bearing object, the battleship is controlled by a player, the player can control the displacement of a battleship object through a direction key arranged above a UI interface, the initial position and the speed of the battleship object can be configured through an editor through planning, after the player object logs in the battleship, the player object can also move due to the displacement of the player controlled battleship, but the relative position coordinate of the object in the battleship object is not changed, a client can send the displacement parameters for controlling the displacement of the battleship object to a server, the server informs the current speed, the current direction and the movable target position of the battleship object of the client after legality verification, and the client can play animation after receiving the movable target position of the battleship object and the current speed and direction of the battleship object so that the battleship object can move to the target position coordinate, the target position coordinate is the absolute position coordinate of the warship, and further the absolute position coordinate of the associated object in the warship object can be calculated by utilizing the target position coordinate of the warship object.
In the embodiment of the invention, after the player presses the direction instruction key, only the direction information is sent to the server by the client, and since other information servers are known and cannot trust when the server receives any data of the client, the validity verification of the client, such as the position, the orientation and the like of the object model, is required to be carried out to prevent the player from cheating, so that the game experience of the player in a game scene is improved.
The embodiment provides another position synchronization method, as shown in fig. 3, which is applied to a server and includes the following steps:
301. receiving a position synchronization request of an object, and respectively determining the absolute position coordinate of the movable bearing object and the relative position coordinate of the object in the movable bearing object area according to the displacement parameter carried by the position synchronization request of the object.
Accordingly, for the movable carrying object, the server may set a subsystem responsible for managing the movable carrying object, specifically, a coordinate system may be established by using the subsystem with a central point of the movable carrying object as an origin, and the relative position coordinates of the object in the movable carrying object region may be modified according to the coordinate system.
It should be noted that the subsystem for managing the movable bearing object has various functions, which may specifically include, but is not limited to, the following:
(1) a player triggers an instruction on a movable bearing object control panel through a client, and the subsystem controls the movable bearing object according to the forward and backward turning of the instruction;
(2) a player triggers an instruction for a cannon in the movable bearing object through the client, and the subsystem controls the movable bearing object to cannon in the target direction according to the direction of the instruction;
(3) the player object can be revived in the movable bearing object after death, and in-situ revival and revival point revival are supported. For the in-place revival mode, the subsystem can record the relative position coordinates of the dead moment of the player object in the movable bearing object area, and the absolute position coordinates of the player object in the game world can be calculated through the relative position coordinates and the absolute position coordinates of the movable bearing object when the player object revives; for the revival point revival mode, the subsystem can set a plurality of revival point position coordinates in each movable carrying object region, the revival point position coordinates can be read when the player object revives, and the relative position coordinates of the player object in the movable carrying object region and the absolute position coordinates of the player object in the game world are calculated;
(4) the player triggers an instruction on the control panel of the movable bearing object through the client, the subsystem judges the direction of the instruction and the target position, and because the moving area of the movable bearing object is limited to the water surface area, if the player controls the movable bearing object to land, the movable bearing object stays on the land and cannot move to the target position.
(4) The player moves or releases skills in the movable carrying object area through the client, the subsystem can accurately calculate the absolute position coordinates of the player object according to the movement or release skills, and when the movable carrying object moves in one direction, the relative position coordinates of the player object in the movable carrying object area and the absolute position coordinates of the movable carrying object can be added to obtain the absolute position coordinates of the player object; when the movable carrying object turns, the player object needs to perform vector rotation around the central point of the movable carrying object according to the rotation angle of the movable carrying object to obtain the updated relative position coordinate of the player object, and the updated relative position coordinate and the absolute position coordinate of the movable carrying object are added to obtain the absolute position coordinate of the player object.
302. And calculating the absolute position coordinate of the object according to the absolute position coordinate of the movable bearing object and the relative position coordinate of the object in the movable bearing object area.
It is understood that, since the operation instruction for generating the object movement may be generated by the control object or the control movable bearing object, the following application scenarios may exist for the movement parameter including the displacement vector of different objects.
For an application scenario in the embodiment of the present invention, if the movement parameter only includes the displacement vector of the object, the absolute position coordinate of the movable bearing object is not changed, and the relative position coordinate of the object in the movable bearing object area is changed, specifically, the relative position coordinate of the object in the movable bearing object area may be adjusted based on the displacement vector of the object, and the absolute position coordinate of the object is further calculated according to the absolute position coordinate of the movable bearing object and the adjusted relative position coordinate of the object in the movable bearing object area.
For an application scenario in the embodiment of the present invention, if the movement parameter only includes the displacement vector of the movable carrying object, the absolute position coordinate of the movable carrying object changes, and the relative position coordinate of the object in the movable carrying object region does not change, specifically, the absolute position coordinate of the movable carrying object may be adjusted based on the displacement vector of the movable carrying object, and the absolute position coordinate of the object is further calculated according to the adjusted absolute position coordinate of the movable carrying object and the relative position coordinate of the object in the movable carrying object region.
For an application scenario in the embodiment of the present invention, if the movement parameter includes a displacement vector of the object and a displacement vector of the movable carrying object, the relative position coordinate of the object in the movable carrying object region changes, and the absolute position coordinate of the movable carrying object changes, specifically, the absolute position coordinate of the movable carrying object and the relative position coordinate of the object in the movable carrying object region may be respectively adjusted according to the displacement vector of the object and the displacement vector of the movable carrying object, and further, the absolute position coordinate of the object may be calculated according to the adjusted absolute position coordinate of the movable carrying object and the adjusted relative position coordinate of the object in the movable carrying object region.
For an application scenario in the embodiment of the present invention, if the displacement vector of the movable bearing object further includes a steering angle of the movable bearing object, before calculating the absolute position coordinate of the object according to the absolute position coordinate of the movable bearing object and the relative position coordinate of the object in the movable bearing object area, the object may be vector-rotated around the central point of the movable bearing object because the position of the object may be based on the steering angle of the movable bearing object, and the relative position coordinate of the object in the movable bearing object area is adjusted.
It should be noted that, the process of adjusting the relative position coordinates of the object in the movable object bearing area is mainly directed to the adjustment in the direction, and since the direction of the movable object bearing area changes during the turning process, the object in the movable object bearing area also needs the direction adjustment, so as to ensure the consistency of the directions of the objects in the movable object bearing area.
303. And transmitting the absolute position coordinates of the object to a client as broadcast information.
Compared with the method for realizing position synchronization by calculating the absolute position coordinates of an object through a client in the existing method, the method for realizing position synchronization acquires the operation instruction of moving the object in the movable bearing object area, extracts the displacement parameters corresponding to the operation instruction, generates the position synchronization request of the object by the displacement parameters, sends the position synchronization request of the object to the server, does not directly modify the absolute position coordinates of the object when the object moves, calculates the absolute position coordinates of the object according to the relative position coordinates of the object in the movable bearing object area by the server, considers the absolute position coordinates of the movable bearing object into the absolute position coordinates of the object, so that the absolute position coordinates of the object received by each client are more accurate, and the game scene can be really restored, the accuracy of object position synchronization in the game scene is improved.
To further illustrate the interaction relationship between the client and the server, in the process that position synchronization is required when a specific object moves in a movable object bearing area, an embodiment of the present invention provides a timing diagram of a position synchronization instance, as shown in fig. 4, including:
401. the client acquires an operation instruction of moving the object in the movable object bearing area, extracts a displacement parameter corresponding to the operation instruction, and sends a position synchronization request of the object generated according to the displacement parameter to the server.
402. And the server receives the position synchronization request of the object, and respectively determines the absolute position coordinates of the movable bearing object and the relative position coordinates of the object in the movable bearing object area according to the displacement parameters carried by the position synchronization request of the object.
403. And the server calculates the absolute position coordinates of the object according to the absolute position coordinates of the movable bearing object and the relative position coordinates of the object in the movable bearing object area, and transmits the absolute position coordinates of the object to the client as broadcast information.
404. The client receives absolute position coordinates of the object.
In a specific application scene, in order to improve the accuracy of position synchronization in a game, aiming at the condition that an object moves in a movable object bearing area in the game, a movement parameter is sent to a server, the server modifies the relative position coordinate of the object in the movable object bearing area, the absolute position coordinate of the object is further calculated, the absolute position coordinate of the object forms broadcast information and is transmitted to a client, so that the absolute position coordinate of the object is accurately synchronized to other clients, the game experience of a player can be improved, and the game cheating can be effectively prevented.
In a specific application scenario, in order to improve the smoothness of operation in a game, aiming at the absolute position coordinates of a binding associated object on a movable bearing object in the game, the client can use the hanging point information of the associated object to calculate so as to reduce the calculation pressure of the server, so that the game process can be smoothly expressed, and obvious operation delay in the game can be avoided.
Further, as a specific implementation of the methods in fig. 1 and fig. 2, an embodiment of the present application provides a location synchronization apparatus applied to a client side, as shown in fig. 5, the apparatus includes: an acquisition unit 51, a first transmission unit 52, and a first reception unit 53.
An obtaining unit 51, configured to obtain an operation instruction for moving an object in a movable object bearing area, and extract a displacement parameter corresponding to the operation instruction;
a first sending unit 52, configured to send a position synchronization request of the object generated according to the displacement parameter to a server, where the server calculates an absolute position coordinate of the object according to a relative position coordinate of the object in the movable object bearing area;
the first receiving unit 53 may be configured to receive absolute position coordinates of the object.
Compared with the prior art in which the absolute position coordinates of the object are calculated by the client, the position synchronization device provided by the embodiment of the invention realizes position synchronization, obtains the operation instruction of moving the object in the movable object bearing area, extracts the displacement parameter corresponding to the operation instruction, generates the position synchronization request of the object by the displacement parameter, and sends the position synchronization request of the object to the server, so that when the object moves, the absolute position coordinates of the object are not directly modified, but the server calculates the absolute position coordinates of the object according to the relative position coordinates of the object in the movable object bearing area, and considers the absolute position coordinates of the movable object bearing into the absolute position coordinates of the object, so that the absolute position coordinates of the object received by each client are more accurate, and the game scene can be truly restored, the accuracy of object position synchronization in the game scene is improved.
In a specific application scenario, as shown in fig. 6, the apparatus further includes:
the second sending unit 54 may be configured to, before the operation instruction for moving the object in the movable object bearing region is obtained and the displacement parameter corresponding to the operation instruction is extracted, send the initial position coordinate of the object to the server when the trigger instruction that the object enters the movable object bearing region is detected, and calculate and store the relative position coordinate of the object in the movable object bearing region by the server.
In a specific application scenario, as shown in fig. 6, the apparatus further includes:
the second receiving unit 55 may be configured to receive the target position coordinates of the movable carrying object calculated according to the displacement parameters after the position synchronization request of the object generated according to the displacement parameters is sent to the server, and determine the absolute position coordinates of the movable carrying object.
In a specific application scenario, as shown in fig. 6, an associated object is bound to the movable object, and the apparatus further includes:
the first calculating unit 56 may be configured to calculate the absolute position coordinates of the associated object in the movable carrying object region by using the absolute position coordinates of the movable carrying object after the target position coordinates of the movable carrying object calculated according to the displacement parameters are received and the absolute position coordinates of the movable carrying object are determined.
In a specific application scenario, as shown in fig. 6, the first calculating unit 56 includes:
a determining module 561, configured to determine a basic offset of the associated object with respect to the movable bearer object by using the hitching point information of the associated object bound to the movable bearer object;
the adding module 562 may be configured to add the basic offset to the absolute position coordinates of the movable carrying object, and calculate the absolute position coordinates of the associated object in the movable carrying object region.
In a specific application scenario, as shown in fig. 6, the determining module 561 includes:
the obtaining sub-module 5611 may be configured to obtain location information of the associated object and the movable bearer object bound to each other by using the hanging point information of the associated object bound to the movable bearer object;
the determining submodule 5612 may be configured to determine, according to the location information of the association object and the movable bearer object bound to each other, a basic offset of the association object with respect to the movable bearer object.
It should be noted that other corresponding descriptions of the functional units involved in the location synchronization apparatus applied to the client side provided in this embodiment may refer to the corresponding descriptions in fig. 1 and fig. 2, and are not described again here.
Further, as a specific implementation of the method in fig. 3, an embodiment of the present application provides a location synchronization apparatus applied to a server side, as shown in fig. 7, the apparatus includes: a determination unit 61, a second calculation unit 62, a broadcast unit 63.
The determining unit 61 may be configured to receive a position synchronization request of an object, and determine an absolute position coordinate of the movable bearing object and a relative position coordinate of the object in the movable bearing object area according to the displacement parameter carried in the position synchronization request of the object;
a second calculation unit 62, which is operable to calculate absolute position coordinates of the object based on the absolute position coordinates of the movable carrying object and the relative position coordinates of the object within the movable carrying object region;
a broadcasting unit 63, which may be configured to deliver the absolute position coordinates of the object as broadcast information to the client.
In a specific application scenario, as shown in fig. 8, if the movement parameter includes a displacement vector of an object, an absolute position coordinate of the movable bearing object is not changed, and a relative position coordinate of the object in a movable bearing object area is changed, the second calculating unit 62 includes:
an adjusting module 621, configured to adjust a relative position coordinate of the object in the movable object-bearing region based on the displacement vector of the object;
the calculating module 622 may be configured to calculate the absolute position coordinate of the object according to the absolute position coordinate of the movable carrying object and the adjusted relative position coordinate of the object in the movable carrying object area.
In a specific application scenario, if the movement parameter includes a displacement vector of a movable carrying object, an absolute position coordinate of the movable carrying object changes, a relative position coordinate of the object in a movable carrying object region does not change,
the adjusting module 621 is further configured to adjust the absolute position coordinate of the movable carrying object based on the displacement vector of the movable carrying object;
the calculating module 622 is further configured to calculate the absolute position coordinate of the object according to the adjusted absolute position coordinate of the movable carrying object and the relative position coordinate of the object in the movable carrying object area.
In a specific application scenario, if the movement parameters include a displacement vector of an object and a displacement vector of a movable carrying object, the relative position coordinates of the object in the movable carrying object region are changed, and the absolute position coordinates of the movable carrying object are changed,
the adjusting module 621 may be further configured to adjust the absolute position coordinate of the movable carrying object and the relative position coordinate of the object in the movable carrying object area based on the displacement vector of the object and the displacement vector of the movable carrying object, respectively;
the calculating module 622 is further configured to calculate the absolute position coordinate of the object according to the adjusted absolute position coordinate of the movable carrying object and the adjusted relative position coordinate of the object in the movable carrying object area.
In a specific application scenario, if the movement parameter includes a steering angle of the movable carrying object, the adjusting module 621 may be configured to perform vector rotation on the object around a central point of the movable carrying object based on the steering angle of the movable carrying object before calculating the absolute position coordinate of the object according to the absolute position coordinate of the movable carrying object and the relative position coordinate of the object in the movable carrying object area, so as to adjust the relative position coordinate of the object in the movable carrying object area.
It should be noted that other corresponding descriptions of the functional units related to the position synchronization apparatus applicable to the server side provided in this embodiment may refer to the corresponding description in fig. 3, and are not described herein again.
Based on the method shown in fig. 1-2, correspondingly, the embodiment of the present application further provides a storage medium, on which a computer program is stored, and the computer program, when executed by a processor, implements the position synchronization method shown in fig. 1-2; based on the method shown in fig. 3, correspondingly, the present application further provides another storage medium, on which a computer program is stored, and the computer program, when executed by a processor, implements the position synchronization method shown in fig. 3.
Based on such understanding, the technical solution of the present application may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (which may be a CD-ROM, a usb disk, a removable hard disk, etc.), and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method according to the implementation scenarios of the present application.
Based on the method shown in fig. 1-2 and the virtual device embodiment shown in fig. 5-6, to achieve the above object, an embodiment of the present application further provides a client entity device, which may specifically be a computer, a smart phone, a tablet computer, a smart watch, or a network device, where the entity device includes a storage medium and a processor; a storage medium for storing a computer program; a processor for executing a computer program to implement the position synchronization method as described above with reference to fig. 1-2.
Based on the method shown in fig. 3 and the virtual device embodiments shown in fig. 7 to fig. 8, in order to achieve the above object, an embodiment of the present application further provides a server entity device, which may specifically be a computer, a server, or other network devices, and the entity device includes a storage medium and a processor; a storage medium for storing a computer program; a processor for executing a computer program to implement the position synchronization method as shown in fig. 3 above.
Optionally, the two entity devices may further include a user interface, a network interface, a camera, a Radio Frequency (RF) circuit, a sensor, an audio circuit, a WI-FI module, and the like. The user interface may include a Display screen (Display), an input unit such as a keypad (Keyboard), etc., and the optional user interface may also include a USB interface, a card reader interface, etc. The network interface may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface), etc.
In an exemplary embodiment, referring to fig. 9, the entity device 700 includes a communication bus, a processor, a memory, and a communication interface, and may further include an input/output interface and a display device, wherein the functional units may communicate with each other through the bus. The memory stores computer programs, and the processor is used for executing the programs stored in the memory and executing the painting mounting method in the embodiment.
Those skilled in the art will appreciate that the structure of a location-synchronized physical device provided in the present embodiment does not constitute a limitation of the physical device, and may include more or less components, or some components in combination, or a different arrangement of components.
The storage medium may further include an operating system and a network communication module. The operating system is a program for managing hardware and software resources of the actual device for store search information processing, and supports the operation of the information processing program and other software and/or programs. The network communication module is used for realizing communication among components in the storage medium and communication with other hardware and software in the information processing entity device.
Through the above description of the embodiments, those skilled in the art will clearly understand that the present application can be implemented by software plus a necessary general hardware platform, and can also be implemented by hardware. Compared with the prior art, the method and the device have the advantages that the server side calculates the absolute position coordinates of the object according to the relative position coordinates of the object in the movable bearing object area, and the absolute position coordinates of the movable bearing object are considered into the absolute position coordinates of the object, so that the absolute position coordinates of the object received by each client side are more accurate, the game scene can be truly restored, and the object position synchronization accuracy in the game scene is improved.
Those skilled in the art will appreciate that the figures are merely schematic representations of one preferred implementation scenario and that the blocks or flow diagrams in the figures are not necessarily required to practice the present application. Those skilled in the art will appreciate that the modules in the devices in the implementation scenario may be distributed in the devices in the implementation scenario according to the description of the implementation scenario, or may be located in one or more devices different from the present implementation scenario with corresponding changes. The modules of the implementation scenario may be combined into one module, or may be further split into a plurality of sub-modules.
The above application serial numbers are for description purposes only and do not represent the superiority or inferiority of the implementation scenarios. The above disclosure is only a few specific implementation scenarios of the present application, but the present application is not limited thereto, and any variations that can be made by those skilled in the art are intended to fall within the scope of the present application.
Embodiments of the present invention also include these and other aspects as specified in the following numbered clauses:
1. a method of position synchronization, comprising:
acquiring an operation instruction of moving an object in a movable object bearing area, and extracting a displacement parameter corresponding to the operation instruction;
sending a position synchronization request of the object generated according to the displacement parameters to a server side, and calculating absolute position coordinates of the object by the server side according to relative position coordinates of the object in a movable bearing object area;
absolute position coordinates of the object are received.
2. The method according to clause 1, wherein before the obtaining the operation instruction for moving the object in the movable object bearing area and extracting the displacement parameter corresponding to the operation instruction, the method further comprises:
when a trigger instruction that the object enters the movable object bearing area is detected, the initial position coordinates of the object are sent to the server side, and the server side calculates and stores the relative position coordinates of the object in the movable object bearing area.
3. The method of clause 1, wherein after sending the request for location synchronization of the object generated according to the displacement parameters to a server, the method further comprises:
and receiving the target position coordinate of the movable bearing object calculated according to the displacement parameter, and determining the absolute position coordinate of the movable bearing object.
4. The method according to clause 3, wherein the movable carrying object has an associated object bound thereon, and after receiving the target position coordinates of the movable carrying object calculated according to the displacement parameters and determining the absolute position coordinates of the movable carrying object, the method further comprises:
and calculating the absolute position coordinates of the related objects in the movable bearing object area by using the absolute position coordinates of the movable bearing object.
5. The method according to clause 4, wherein the calculating the absolute position coordinates of the associated object in the movable carrying object region by using the absolute position coordinates of the movable carrying object specifically includes:
determining the basic offset of the associated object relative to the movable bearing object by utilizing the hanging point information of the associated object bound to the movable bearing object;
and adding the basic offset into the absolute position coordinates of the movable bearing object, and calculating the absolute position coordinates of the associated object in the movable bearing object area.
6. The method according to clause 5, wherein the determining the basic offset of the associated object with respect to the movable bearer object by using the hanging point information that the associated object is bound to the movable bearer object specifically includes:
acquiring the position information of the association object and the movable bearing object bound with each other by utilizing the hanging point information of the association object bound to the movable bearing object;
and determining the basic offset of the associated object relative to the movable bearing object according to the position information of the associated object and the movable bearing object bound with each other.
7. A method of position synchronization, comprising:
receiving a position synchronization request of an object, and respectively determining an absolute position coordinate of a movable bearing object and a relative position coordinate of the object in a movable bearing object area according to a displacement parameter carried by the position synchronization request of the object;
calculating the absolute position coordinate of the object according to the absolute position coordinate of the movable bearing object and the relative position coordinate of the object in the movable bearing object area;
and transmitting the absolute position coordinates of the object to a client as broadcast information.
8. The method according to clause 7, wherein if the motion parameter only includes a displacement vector of the object, the calculating the absolute position coordinate of the object according to the absolute position coordinate of the movable carrying object and the relative position coordinate of the object in the movable carrying object region specifically includes:
adjusting relative position coordinates of the object within a movable object bearing region based on the displacement vector of the object;
and calculating the absolute position coordinate of the object according to the absolute position coordinate of the movable bearing object and the relative position coordinate of the adjusted object in the movable bearing object area.
9. The method according to clause 7, wherein if the motion parameter includes a displacement vector of an object and a displacement vector of a movable carrying object, the calculating an absolute position coordinate of the object according to the absolute position coordinate of the movable carrying object and a relative position coordinate of the object in a movable carrying object region specifically includes:
respectively adjusting the absolute position coordinates of the movable bearing object and the relative position coordinates of the object in the movable bearing object area based on the displacement vector of the object and the displacement vector of the movable bearing object;
and calculating the absolute position coordinate of the object according to the adjusted absolute position coordinate of the movable bearing object and the adjusted relative position coordinate of the object in the movable bearing object area.
10. A position synchronization device, comprising:
the device comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring an operation instruction of moving an object in a movable object bearing area and extracting a displacement parameter corresponding to the operation instruction;
the first sending unit is used for sending the position synchronization request of the object generated according to the displacement parameter to a server side, and the server side calculates the absolute position coordinate of the object according to the relative position coordinate of the object in the movable bearing object area;
a first receiving unit for receiving absolute position coordinates of the object.
11. The apparatus of clause 10, wherein the apparatus further comprises:
and the second sending unit is used for sending the initial position coordinates of the object to the server when detecting a trigger instruction that the object enters the movable bearing object area before the operation instruction for moving the object in the movable bearing object area is obtained and the displacement parameter corresponding to the operation instruction is extracted, and calculating and storing the relative position coordinates of the object in the movable bearing object area by the server.
12. The apparatus of clause 10, wherein the apparatus further comprises:
and the second receiving unit is used for receiving the target position coordinate of the movable bearing object calculated according to the displacement parameter and determining the absolute position coordinate of the movable bearing object after the position synchronization request of the object generated according to the displacement parameter is sent to the server.
13. The apparatus of clause 12, wherein the movable carrying object has an associated object bound thereon, further comprising:
and the first calculation unit is used for calculating the absolute position coordinates of the related objects in the movable bearing object area by using the absolute position coordinates of the movable bearing object after the target position coordinates of the movable bearing object calculated according to the displacement parameters are received and the absolute position coordinates of the movable bearing object are determined.
14. The apparatus of clause 13, wherein the first computing unit comprises:
the determining module is used for determining the basic offset of the associated object relative to the movable bearing object by utilizing the hanging point information of the associated object bound to the movable bearing object;
and the adding module is used for adding the basic offset into the absolute position coordinates of the movable bearing object and calculating the absolute position coordinates of the associated object in the movable bearing object area.
15. The apparatus of clause 14, wherein the determining module comprises:
the obtaining submodule is used for obtaining the position information of the associated object and the movable bearing object bound with each other by utilizing the hanging point information of the associated object bound to the movable bearing object;
and the determining submodule is used for determining the basic offset of the associated object relative to the movable bearing object according to the position information of the associated object and the movable bearing object bound with each other.
16. A position synchronization device, comprising:
the determining unit is used for receiving a position synchronization request of an object, and respectively determining the absolute position coordinate of the movable bearing object and the relative position coordinate of the object in the movable bearing object area according to the displacement parameter carried by the position synchronization request of the object;
a second calculation unit for calculating absolute position coordinates of the object based on the absolute position coordinates of the movable carrying object and relative position coordinates of the object within the movable carrying object region;
a broadcasting unit for transmitting the absolute position coordinates of the object as broadcast information to a client.
17. The apparatus according to clause 16, wherein if the movement parameters only include a displacement vector of an object, the second calculation unit includes:
the adjusting module is used for adjusting the relative position coordinates of the object in the movable object bearing area based on the displacement vector of the object;
and the calculating module is used for calculating the absolute position coordinate of the object according to the absolute position coordinate of the movable bearing object and the adjusted relative position coordinate of the object in the movable bearing object area.
18. The apparatus of clause 16, wherein if the movement parameters include a displacement vector of an object and a displacement vector of a movable carrying object, then,
the adjusting module is further configured to adjust the absolute position coordinate of the movable carrying object and the relative position coordinate of the object in the movable carrying object region based on the displacement vector of the object and the displacement vector of the movable carrying object, respectively;
and the calculating module is also used for calculating the absolute position coordinate of the object according to the adjusted absolute position coordinate of the movable bearing object and the adjusted relative position coordinate of the object in the movable bearing object area.
19. A position synchronization system comprises a client and a server;
the client acquires an operation instruction of moving an object in a movable object bearing area, extracts a displacement parameter corresponding to the operation instruction, and sends a position synchronization request of the object generated according to the displacement parameter to a server;
the server receives a position synchronization request of an object, and respectively determines the absolute position coordinates of a movable bearing object and the relative position coordinates of the object in a movable bearing object area according to displacement parameters carried by the position synchronization request of the object;
the server calculates the absolute position coordinate of the object according to the absolute position coordinate of the movable bearing object and the relative position coordinate of the object in the movable bearing object area, and transmits the absolute position coordinate of the object to the client as broadcast information;
the client receives absolute position coordinates of the object.
20. A client device comprising a memory storing a computer program and a processor implementing the steps of the location synchronization method of any of clauses 1 to 6 when the computer program is executed.
21. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the position synchronization method of any one of clauses 1 to 6.
22. A server device comprising a memory and a processor, the memory storing a computer program, wherein the processor implements the steps of the position synchronization method of any one of clauses 7 to 9 when executing the computer program.
23. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the position synchronization method of any one of clauses 7 to 9.

Claims (10)

1. A method of position synchronization, comprising:
acquiring an operation instruction of moving an object in a movable object bearing area, and extracting a displacement parameter corresponding to the operation instruction;
sending a position synchronization request of the object generated according to the displacement parameters to a server side, and calculating absolute position coordinates of the object by the server side according to relative position coordinates of the object in a movable bearing object area;
absolute position coordinates of the object are received.
2. The method according to claim 1, wherein before the obtaining the operation instruction for moving the object in the movable object bearing area and extracting the displacement parameter corresponding to the operation instruction, the method further comprises:
when a trigger instruction that the object enters the movable object bearing area is detected, the initial position coordinates of the object are sent to the server side, and the server side calculates and stores the relative position coordinates of the object in the movable object bearing area.
3. The method according to claim 1, wherein after sending the request for position synchronization of the object generated according to the displacement parameter to a server, the method further comprises:
and receiving the target position coordinate of the movable bearing object calculated according to the displacement parameter, and determining the absolute position coordinate of the movable bearing object.
4. The method of claim 3, wherein the movable object is bound with an associated object, and after receiving the target position coordinates of the movable object calculated according to the displacement parameters and determining the absolute position coordinates of the movable object, the method further comprises:
and calculating the absolute position coordinates of the related objects in the movable bearing object area by using the absolute position coordinates of the movable bearing object.
5. The method according to claim 4, wherein the calculating absolute position coordinates of the associated object in the movable carrying object region using the absolute position coordinates of the movable carrying object specifically comprises:
determining the basic offset of the associated object relative to the movable bearing object by utilizing the hanging point information of the associated object bound to the movable bearing object;
and adding the basic offset into the absolute position coordinates of the movable bearing object, and calculating the absolute position coordinates of the associated object in the movable bearing object area.
6. A method of position synchronization, comprising:
receiving a position synchronization request of an object, and respectively determining an absolute position coordinate of a movable bearing object and a relative position coordinate of the object in a movable bearing object area according to a displacement parameter carried by the position synchronization request of the object;
calculating the absolute position coordinate of the object according to the absolute position coordinate of the movable bearing object and the relative position coordinate of the object in the movable bearing object area;
and transmitting the absolute position coordinates of the object to a client as broadcast information.
7. A position synchronization apparatus, comprising:
the device comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring an operation instruction of moving an object in a movable object bearing area and extracting a displacement parameter corresponding to the operation instruction;
the first sending unit is used for sending the position synchronization request of the object generated according to the displacement parameter to a server side, and the server side calculates the absolute position coordinate of the object according to the relative position coordinate of the object in the movable bearing object area;
a first receiving unit for receiving absolute position coordinates of the object.
8. A position synchronization apparatus, comprising:
the determining unit is used for receiving a position synchronization request of an object, and respectively determining the absolute position coordinate of the movable bearing object and the relative position coordinate of the object in the movable bearing object area according to the displacement parameter carried by the position synchronization request of the object;
a second calculation unit for calculating absolute position coordinates of the object based on the absolute position coordinates of the movable carrying object and relative position coordinates of the object within the movable carrying object region;
a broadcasting unit for transmitting the absolute position coordinates of the object as broadcast information to a client.
9. A client device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor, when executing the computer program, implements the steps of the position synchronization method according to any of claims 1 to 5.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the position synchronization method according to any one of claims 1 to 5.
CN202010615557.1A 2020-06-30 2020-06-30 Position synchronization method, device and equipment Pending CN111729312A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010615557.1A CN111729312A (en) 2020-06-30 2020-06-30 Position synchronization method, device and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010615557.1A CN111729312A (en) 2020-06-30 2020-06-30 Position synchronization method, device and equipment

Publications (1)

Publication Number Publication Date
CN111729312A true CN111729312A (en) 2020-10-02

Family

ID=72653834

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010615557.1A Pending CN111729312A (en) 2020-06-30 2020-06-30 Position synchronization method, device and equipment

Country Status (1)

Country Link
CN (1) CN111729312A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112190938A (en) * 2020-10-15 2021-01-08 顾春健 Game picture processing method and game platform based on data analysis and dynamic rendering
CN114047998A (en) * 2021-11-30 2022-02-15 珠海金山数字网络科技有限公司 Object updating method and device

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107137927A (en) * 2017-05-26 2017-09-08 网易(杭州)网络有限公司 The acquisition methods and device of the position coordinates of virtual game object
CN111054073A (en) * 2019-12-27 2020-04-24 珠海金山网络游戏科技有限公司 Method and device for moving double game roles

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107137927A (en) * 2017-05-26 2017-09-08 网易(杭州)网络有限公司 The acquisition methods and device of the position coordinates of virtual game object
CN111054073A (en) * 2019-12-27 2020-04-24 珠海金山网络游戏科技有限公司 Method and device for moving double game roles

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112190938A (en) * 2020-10-15 2021-01-08 顾春健 Game picture processing method and game platform based on data analysis and dynamic rendering
CN114047998A (en) * 2021-11-30 2022-02-15 珠海金山数字网络科技有限公司 Object updating method and device
CN114047998B (en) * 2021-11-30 2024-04-19 珠海金山数字网络科技有限公司 Object updating method and device

Similar Documents

Publication Publication Date Title
CN109847361B (en) Method and device for synchronizing motion states, storage medium and electronic device
CN107168532B (en) Virtual synchronous display method and system based on augmented reality
EP3882870B1 (en) Method and device for image display, storage medium and electronic device
CN107837530B (en) Game synchronization method, device and equipment
CN108771866B (en) Virtual object control method and device in virtual reality
US10977869B2 (en) Interactive method and augmented reality system
US20110119332A1 (en) Movement animation method and apparatus
JP7451563B2 (en) Virtual character control method, computer equipment, computer program, and virtual character control device
CN109731330B (en) Method and device for displaying picture, storage medium and electronic device
US11307677B2 (en) Method and device for object pointing in virtual reality (VR) scene using a gamepad, and VR apparatus
CN112891943B (en) Lens processing method and device and readable storage medium
CN111111168B (en) Control method and device of virtual prop, storage medium and electronic device
CN111729312A (en) Position synchronization method, device and equipment
US20160114243A1 (en) Image processing program, server device, image processing system, and image processing method
CN110163938B (en) Animation control method and device, storage medium and electronic device
CN109966741B (en) Position updating method, device, equipment and storage medium
CA2901609A1 (en) Storage medium, game system, and control method
US20230271084A1 (en) Method of displaying shooting for virtual firearm, apparatus, and computer-readable storage medium
CN111905368B (en) Method, device, equipment and storage medium for controlling virtual prop in game
CN111862345B (en) Information processing method and device, electronic equipment and computer readable storage medium
JP2023547721A (en) Screen display methods, devices, equipment, and programs in virtual scenes
CN111078031B (en) Virtual character position determining method, device, equipment and storage medium
CN113813607B (en) Game view angle switching method and device, storage medium and electronic equipment
KR101492248B1 (en) Method and apparatus for targeting object appeared in on-line game
KR101447850B1 (en) Game service method for real time match game and system thereof

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