CN113786610A - Carrier position correction method and device, second client and second electronic equipment - Google Patents

Carrier position correction method and device, second client and second electronic equipment Download PDF

Info

Publication number
CN113786610A
CN113786610A CN202111084892.4A CN202111084892A CN113786610A CN 113786610 A CN113786610 A CN 113786610A CN 202111084892 A CN202111084892 A CN 202111084892A CN 113786610 A CN113786610 A CN 113786610A
Authority
CN
China
Prior art keywords
carrier
client
vehicle
physical simulation
server
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202111084892.4A
Other languages
Chinese (zh)
Other versions
CN113786610B (en
Inventor
马仕员
方剑斌
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Jingcai Online Technology Dalian Co Ltd
Original Assignee
Jingcai Online Technology Dalian 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 Jingcai Online Technology Dalian Co Ltd filed Critical Jingcai Online Technology Dalian Co Ltd
Priority to CN202111084892.4A priority Critical patent/CN113786610B/en
Priority claimed from CN202111084892.4A external-priority patent/CN113786610B/en
Publication of CN113786610A publication Critical patent/CN113786610A/en
Application granted granted Critical
Publication of CN113786610B publication Critical patent/CN113786610B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/50Controlling the output signals based on the game progress
    • A63F13/52Controlling the output signals based on the game progress involving aspects of the displayed game scene
    • 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/57Simulating properties, behaviour or motion of objects in the game world, e.g. computing tyre load in a car race game
    • 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/60Generating or modifying game content before or while executing the game program, e.g. authoring tools specially adapted for game development or game-integrated level editor
    • 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/80Special adaptations for executing a specific game genre or game mode
    • A63F13/803Driving vehicles or craft, e.g. cars, airplanes, ships, robots or tanks
    • 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/80Special adaptations for executing a specific game genre or game mode
    • A63F13/822Strategy games; Role-playing games

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Processing Or Creating Images (AREA)
  • Telephonic Communication Services (AREA)

Abstract

The invention discloses a carrier position correction method and device, a second client and second electronic equipment. The method comprises the following steps: acquiring a position A of the carrier M before correction; receiving coordinate position information of the carrier M sent by the server, and hiding the carrier M; arranging a carrier N which is the same as the appearance model of the carrier M at the position A; controlling the carrier N to move along with the carrier M, keeping the carrier N and the carrier M relatively static, and not performing physical simulation on the carrier N; translating the carrier N to the coordinate position of the carrier M within N seconds; hiding the carrier N and displaying the carrier M under the condition that a relative offset vector C between the carrier M and the carrier N is linearly reduced to 0. Transient or flickering phenomena occurring during the correction of the position of the vehicle can be avoided or reduced.

Description

Carrier position correction method and device, second client and second electronic equipment
Technical Field
The present invention relates to the field of information processing technologies, and in particular, to a method and an apparatus for correcting a carrier position, a second client, and an electronic device.
Background
The requirements of users on game pictures and virtual reality effects are more and more strong, which leads to a larger scene design of the game. With the development and production level of the game being higher and higher, the scene of the game is larger and larger, and the details are finer and finer. Making a fine game brings a better game experience to the player. However, a large scene and a large amount of details occupy a large amount of resources, the performance requirement of a machine for running a game is high, and if the performance of the machine cannot meet the requirement, a phenomenon of stuttering is likely to occur, so that the game experience of a user is poor. For example, if a network game in which multiple persons participate together, especially a network game with 2D and 3D effects, is run on a mobile phone, if the resource occupation of the game on the mobile phone is too high, the mobile phone will be hot, the game will be jammed, and delay will occur, which indirectly causes the loss of the user, and the game that wants to achieve the same effect as the PC end at the mobile phone end is limited by the hardware of the mobile phone and the network, so that the problem of occupying hardware resources is more and more urgent to solve by improving the design scheme of software.
Disclosure of Invention
The invention provides a carrier position correction method, a carrier position correction device, a second client and a second electronic device, and aims to solve at least one of the technical problems.
The embodiment of the invention provides a carrier position correction method, which is applied to a carrier physical simulation system, the system comprises a server and a second client, the second client is used for carrying out physical simulation on a carrier M according to a carrier physical simulation method and correcting the position of the carrier M, and the carrier position correction method comprises the following steps:
acquiring a position A of the carrier M before correction;
receiving coordinate position information of the carrier M sent by the server, and hiding the carrier M;
arranging a carrier N which is the same as the appearance model of the carrier M at the position A;
controlling the carrier N to move along with the carrier M, keeping the carrier N and the carrier M relatively static, and not performing physical simulation on the carrier N;
translating the carrier N to the coordinate position of the carrier M within N seconds;
hiding the carrier N and displaying the carrier M under the condition that a relative offset vector C between the carrier M and the carrier N is linearly reduced to 0.
Optionally, the method further includes: acquiring a corrected position B of the carrier M;
the relative offset vector is initially a vector pointing from the position a to the position B, where the relative offset vector C is B-a.
Optionally, the vehicle physical simulation method is applied to the vehicle physical simulation system, where the vehicle physical simulation system further includes a first client, a first user controls a first role through the first client, and a second user controls a second role through the second client, and the vehicle physical simulation method includes the following steps:
under the condition that the first client detects that the first role triggers the carrier control, the first client acquires operation information of the first user on the carrier and position information of the carrier, and sends the operation information of the first user on the carrier and the position information of the carrier to the server, so that the server receives the operation information of the first user on the carrier and the position information of the carrier sent by the first client, and synchronizes the operation information of the first user on the carrier and the position information of the carrier to the second client;
the second client receives the operation information of the first user on the carrier and the position information of the carrier sent by the server, selectively closes physical simulation on the carrier according to the position information of the carrier and the sight distance range of the second role, and physically simulates the carrier according to the operation information of the first user on the carrier and the position information of the carrier in the second client when the physical simulation is selected on the carrier;
and the first client selectively closes physical simulation to the carrier according to the position information of the carrier and the sight distance range of the first role under the condition that the first client detects that the first role triggers the carrier to leave the control.
Optionally, in the second client, the physically simulating the vehicle according to the operation information of the first user on the vehicle and the position information of the vehicle specifically includes:
the second client judges whether the carrier is in the range of the visual distance of the second role, if the carrier is not in the range of the visual distance of the second role, physical simulation of the carrier is not started, and if the carrier is in the range of the visual distance of the second role, the carrier is physically simulated according to the operation information of the first user on the carrier and the position information of the carrier, which are sent by the server, until the carrier is stable or leaves the range of the visual distance of the second role.
Optionally, the vehicle physical simulation method further includes:
and under the condition that the first client detects that the first character triggers the carrier control, acquiring operation information of the carrier for the first character in the first client, and carrying out physical simulation on the carrier.
Optionally, the vehicle physical simulation method further includes:
when the first client detects that the first role triggers the carrier to leave the control, the first client judges whether the carrier is in a visual range of the first role, if the carrier is not in the visual range of the first role, physical simulation of the carrier is not started, if the carrier is in the visual range of the first role, whether the carrier is stable is further judged, if the carrier is stable, physical simulation of the carrier is stopped, and if the carrier is not stable, physical simulation of the carrier is carried out until the carrier is stable or leaves the visual range of the first role.
Optionally, the vehicle physical simulation method further includes:
and the first client and/or the second client acquires the topographic features of the carrier when the carrier is generated by the server, and performs physical simulation on the carrier generated by the server according to the topographic features of the carrier.
The embodiment of the invention provides a carrier position correction device, which is applied to a carrier physical simulation system, the system comprises a server and a second client, the second client is used for carrying out physical simulation on a carrier M according to a carrier physical simulation method and correcting the position of the carrier M, and the device comprises:
the position acquisition unit is used for acquiring a position A before the carrier is corrected;
the carrier hiding unit is used for receiving the coordinate position information of the carrier M sent by the server and hiding the carrier M;
the false carrier setting unit is used for setting a carrier N which is the same as the appearance model of the carrier M at the position A;
the false carrier control unit is used for controlling the carrier N to move along with the carrier M, keeping the carrier N and the carrier M relatively static and not physically simulating the carrier N;
the offset adjusting unit is used for translating the carrier N to the coordinate position of the carrier M within N seconds;
and the carrier display unit is used for hiding the carrier N and displaying the carrier M under the condition that the relative offset vector C between the carrier M and the carrier N is linearly reduced to 0.
The embodiment of the invention provides a second client, which belongs to a carrier physical simulation system, and further comprises a server, wherein the second client is used for carrying out physical simulation on a carrier M according to a carrier physical simulation method and correcting the position of the carrier M, and comprises:
the position acquisition module is used for acquiring a position A before the carrier is corrected;
the carrier hiding module is used for receiving the coordinate position information of the carrier M sent by the server and hiding the carrier M;
the false carrier setting module is used for setting a carrier N which is the same as the appearance model of the carrier M at the position A;
the false carrier control module is used for controlling the carrier N to move along with the carrier M, keeping the carrier N and the carrier M relatively static and not physically simulating the carrier N;
the offset adjusting module is used for translating the carrier N to the coordinate position of the carrier M within N seconds;
the carrier display module is used for hiding the carrier N and displaying the carrier M under the condition that the relative offset vector C between the carrier M and the carrier N is linearly reduced to 0.
An embodiment of the present invention provides a second electronic device, where a second client is installed in the electronic device, and the electronic device includes:
a processor; and
a memory for storing executable instructions of the processor;
wherein the processor is configured to execute any of the vehicle position correction methods described above via execution of the executable instructions.
Drawings
The foregoing and/or additional aspects and advantages of the present invention will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings of which:
fig. 1 is a block diagram of a vehicle physical simulation system according to an embodiment of the present invention;
FIG. 2 is a flow chart of a vehicle physics simulation method according to one embodiment of the present invention;
fig. 3 is a flowchart of a vehicle physics simulation method according to another embodiment of the present invention;
fig. 4 is a flowchart of a vehicle physics simulation method according to yet another embodiment of the invention;
fig. 5 is a flowchart of a vehicle physics simulation method according to yet another embodiment of the present invention;
FIG. 6 is a block diagram of a client according to one embodiment of the invention;
fig. 7 is a block diagram of a client according to another embodiment of the present invention;
FIG. 8 is a block diagram of a client according to yet another embodiment of the present invention;
FIG. 9 is a flow chart of a vehicle physics simulation method according to one embodiment of the present invention;
fig. 10 is a flowchart of a vehicle physics simulation method according to another embodiment of the present invention;
FIG. 11 is a block diagram of a server, according to one embodiment of the invention;
fig. 12 is a block diagram of a server according to another embodiment of the present invention.
Detailed Description
Reference will now be made in detail to embodiments of the present invention, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the drawings are illustrative and intended to be illustrative of the invention and are not to be construed as limiting the invention.
The following describes a vehicle physical simulation method, a vehicle physical simulation system, a client, an electronic device, and a server according to embodiments of the present invention with reference to the drawings.
Fig. 1 is a block diagram of a vehicle physical simulation system according to an embodiment of the present invention.
As shown in fig. 1, the vehicle physical simulation system includes a client 100 and a server 200.
Among other things, the client 100 may include a first client 110 and a second client 120.
The definitions of the terms in the following embodiments will be briefly described below.
A client installed in an application in an electronic device. The client may be an electronic device such as a mobile phone, a tablet computer, a notebook computer, a virtual reality device, an augmented reality device, a mixed reality device, and the like, which is not limited specifically here.
And the server provides equipment for computing and network communication service. The server may be a single device or a cluster of multiple devices, and is not limited herein.
And the first role uses the virtual character corresponding to the first user of the application in the application.
And the second role is a virtual character corresponding to any user in the application except the first role.
The first user controls the first role through the first client.
The second user controls the second role through the second client.
The vehicle, the vehicle in which the user using the application can drive, such as an airplane, an automobile, a bicycle, a motorcycle, a yacht, a ship, a balance car, etc., is not particularly limited herein.
The physical simulation refers to the simulation of the physical state change of the real vehicle. If the vehicle is a jeep, the rotation of tires of the jeep, the bump generated when the vehicle runs on an uneven road surface and the like can be simulated. When the jeep runs on uneven ground, the four groups of suspension springs can stretch out and draw back to different degrees to support the car body, and in the process, the car body can generate reciprocating shaking, tilting and other dynamic effects. The jeep physical simulation is briefly described as follows:
1. simulating the rotation speed of an engine and enabling a tire to rotate at a certain speed through a gearbox at a certain rotation speed ratio;
2. the contact point between the tyre and the ground has friction force which determines whether the tyre can slip or not and the thrust force applied to the vehicle by the tyre;
3. the thrust exerted by the tires on the vehicle moves the vehicle;
4. when the vehicle moves on uneven ground, the four groups of suspension springs can stretch out and draw back to different degrees to support the vehicle body, and the vehicle body can shake and incline in a reciprocating manner in the process.
The visual range refers to a visual range of a virtual character in an application by a user using the application, and refers to a visual range of the virtual character in an application scene. Such as the field of view of the first character, the field of view of the second character. When the virtual character looks straight ahead, the angles observable from left to right and from top to bottom of the eyes are limited, so that the visual range of the virtual character is an approximately conical area, and the range is represented by an aggregation area of three-dimensional coordinates in an application map.
Vehicle position, the three-dimensional coordinate position of the vehicle within the application scene (map).
The vehicle control comprises a driving control, a taking control, a leaving control, an accelerating control, a decelerating control, a direction control and the like. The user controls the vehicle by touching or sliding the vehicle control, such as driving the vehicle, riding the vehicle, leaving the vehicle, accelerating, decelerating, advancing, backing, moving left, moving right, and the like.
In an embodiment of the present invention, when the first client 110 detects that the first character triggers the vehicle control, the first client 110 may obtain operation information of the first user on the vehicle and position information of the vehicle, and send the operation information of the first user on the vehicle and the position information of the vehicle to the server 200. The server 200 may receive the operation information of the first user on the vehicle and the position information of the vehicle sent by the first client, and synchronize the operation information of the first user on the vehicle and the position information of the vehicle to the second client 120. The second client 120 receives the operation information of the first user on the vehicle and the position information of the vehicle sent by the server, and performs physical simulation on the vehicle according to the operation information of the first user on the vehicle and the position information of the vehicle in the second client 120.
Specifically, the second client 120 determines whether the vehicle is within the range of the line of sight of the second character. And if the carrier is not in the range of the visual distance of the second role, not starting physical simulation of the carrier, and if the carrier is in the range of the visual distance of the second role, carrying out physical simulation on the carrier according to the operation information of the first user on the carrier and the position information of the carrier, which are sent by the server, until the carrier is stable or leaves the range of the visual distance of the second role.
This embodiment describes a case where the vehicle is manipulated by the first character as viewed from the perspective of the second character. The first role refers to a role of controlling the vehicle, and the second role refers to a role of observing the vehicle. Specifically, the server stores data related to the application, including position information of a vehicle operated by the first character and operation information of the vehicle. The server establishes communication with the plurality of clients, and each client acquires the position information of the role using the client and the control information of the role on the carrier and sends the position information to the server. After receiving the information, the server synchronizes the information to each client, so that each client comprises the position information of the role corresponding to all the clients and the control information of the role on the carrier after acquiring the synchronization information. The second client obtains the control information of the first client to the carrier and the real-time carrier position information driven by the first client, which are sent by the server. The carrier position information may be sent by the server at a frequency of 100 ms/time. If the vehicle driven by the first character is observed in the sight distance range of the second character, the second client can continuously acquire the position information (three-dimensional coordinates) of the vehicle driven by the first character and detect whether the position information changes. If the position information of the vehicle continuously changes, the vehicle can be determined to be in a moving state. In the second client, the physical simulation of the carrier can be continued by utilizing the control information of the first user on the carrier. It should be appreciated that the second client, when not receiving the most up-to-date information, uses the last received information to perform the physical simulation. If the vehicle position does not change continuously, the vehicle can be determined to be stable, and the second client can stop the physical simulation of the vehicle. Taking an automobile vehicle as an example, the first user triggers a driving or riding control, and the corresponding first character enters the automobile vehicle. The first client carries out physical simulation on the automobile carrier, when a first character enters the automobile carrier, because the first character has weight, four groups of suspension springs of the automobile carrier bear the pressure of the gravity of the first character and contract to support the automobile body, and meanwhile, the automobile body can generate the visual effect of physical change processes such as reciprocating shaking and the like. The first client records operation information of the first user triggering the driving or riding control and sends the information to the server, and the server synchronizes the operation information of the first user triggering the driving or riding control to the second client. In the visual range of the second role, the second client receives operation information of a control triggered to drive or ride by the first user on the automobile carrier and position information of the automobile carrier sent by the server, and performs physical simulation on the carrier driven by the first user according to the information, so that the second user can observe the visual effect of physical change processes such as reciprocating shaking and the like generated by the first user driving or riding the automobile carrier body in the visual range of the second role, and the second client performs physical simulation on the operation information simulation pair of the first client by using the first role, so that the visual effect of the whole physical change process is closer to reality. Similarly, after a first user triggers a driving control and enters the vehicle, a vehicle control at least comprising an acceleration control is displayed on an interactive interface of the first user, the first user triggers the acceleration control, first user operation information is sent to equipment by first equipment, second equipment receives the information from a server, the operation information of the first user triggering the acceleration control carries out physical simulation on the vehicle controlled by the first user, and then a second role observes the visual effect of the physical change process of the accelerated advance of the first role driving vehicle; if the first user triggers the ride control, the acceleration control and the deceleration control are not displayed on the interactive interface of the first user. After the first user triggers the driving or riding control, the first character triggers the leaving control, and then the second character can also observe the vibration effect of the suspension spring when the first character leaves the vehicle. It should be understood that the physical simulation effect generated by the first user-triggered control occurs within the visual range of a second character that observes the visual effect of the physical change process physically simulated by the second device. If the client is not within the range of the visual range, the second role will not observe the visual effect of the physical state change process, that is, the corresponding second client will not start the physical simulation.
In order to simulate the virtual character more truly, some more realistic setting is made, for example, the virtual character can see 500 meters farthest in a sunny day; in foggy days, the virtual character can see 300 meters farthest. That is, the range of viewing distances may vary with weather.
In another embodiment of the present invention, when the first client 110 detects that the first character triggers the vehicle control, the first client performs a physical simulation on the vehicle according to the operation information of the vehicle and the position information of the vehicle sent by the server by the first user. This embodiment describes the situation of the first character perspective when the first character drives the vehicle. For example, the vehicle enters the field of view of the first character, and the user may select to touch a ride control in the interactive interface, thereby controlling the entry of the first character into the vehicle. The user can control driving of the vehicle and perform physical simulation on the vehicle, such as vehicle acceleration, vehicle deceleration and the like, on the acceleration control, the deceleration control and the like (inputting an instruction on the sliding direction or the pressure of the acceleration control and the deceleration control and inputting an instruction on the sliding direction or the sliding angle of the direction control) on the touch interactive interface.
The scheme aims to simulate real driving experience as much as possible and improve the operability of application and the operation enthusiasm of users.
In another embodiment of the present invention, the first client 110 is further configured to determine whether the vehicle is within the range of sight of the first character when the first client detects that the first character triggers the vehicle to leave the control. If the vehicle is not within the range of the line of sight of the first character, the physical simulation of the vehicle is not started. And if the carrier is within the range of the sight distance of the first role, further judging whether the carrier is stable. If the carrier is stable, stopping performing physical simulation on the carrier; and if the vehicle is not stable, performing physical simulation on the vehicle until the vehicle is stable or leaves the range of the visual distance of the first character. This embodiment describes the case where the first character leaves the carrier.
Specifically, the first client receives an input instruction of clicking a departure control in the interactive interface by the first user, and the first character immediately departs from the driven vehicle. The first client continuously acquires the carrier position and whether the carrier position changes or not. If the position of the carrier does not continuously change, the carrier can be determined to be stable, the first client stops physical simulation of the carrier, and the position of the carrier in stable stopping is sent to the server. If the vehicle position continues to change, it may be determined that the vehicle is still moving. The first client continues to perform physical simulation on the carrier. Further, the first client continuously acquires the carrier position and judges whether the carrier position is within the sight distance range of the first role. If the acquired carrier position is not within the visual distance range of the first role, the physical simulation of the carrier can be stopped in the first client, the carrier position is continuously acquired until the carrier is stably stopped, and the position after the stabilization is sent to the server. If the acquired position is within the range of the first character, the first client continues to physically simulate the vehicle until the vehicle is stabilized or the current position of the vehicle is away from the range of the first character. The first client continuously obtains the first role and the real-time carrier position driven by the first role and sends the position to the server.
In the above embodiments, the physical simulation is selectively turned off for the vehicle instead of continuously performing the physical simulation, which optimizes the device resources, improves the performance of the resource optimization device, prevents the stuck phenomenon, and improves the simulated driving experience.
In another embodiment of the present invention, the first client 110 and/or the second client 120 may further obtain a topographic feature of the vehicle when the vehicle is generated by the server 200, and perform a physical simulation on the vehicle generated by the server according to the topographic feature of the vehicle. This embodiment describes the case when the server initializes scene information and generates a vehicle.
Specifically, all the clients can obtain the application start instruction sent by the server, and the interactive interface in the waiting stage in the client is switched to the application scene interactive interface. Further (simultaneously), all the clients acquire the carrier generation instruction sent by the server. The vehicle generation instruction comprises each vehicle type required to be generated in an application scene (map) and a vehicle position appearing in the application scene. Various different types of carriers can be preset in the server, and the application scenes of the different types of carriers are different. For example, an application map is generally composed of three areas, land, water and air. The automobile, the bicycle and the balance car are suitable for land traffic, the yacht and the steamship are suitable for water traffic, the airplane is suitable for air traffic, the land traffic is parked on land for users to carry out land traffic, the water traffic is parked in a water area for users to carry out water traffic, and the airplane is parked on land for users to carry out air traffic after taking off from the ground. The client obtains an application starting instruction sent by the server, and further (simultaneously) the client obtains the type of the carrier needing to be generated in each area in the map and the three-dimensional coordinate position of the carrier in each area range in the map. After the client side obtains the carrier generation instruction generated by the server, 3D modeling can be carried out at the corresponding position in the map randomly to generate a corresponding carrier. Further, each client generates a vehicle at a three-dimensional coordinate position with a certain height above the ground and the water surface instead of generating the vehicle at the three-dimensional coordinate position of the ground and the water surface directly. The initial generating position of the carrier is higher than the ground or the water surface by a certain height, the carrier generated by the client is influenced by virtual gravity in application and falls down and contacts with fixed scenes such as the ground, buildings, trees, water areas and the like in application scenes after falling down so as to generate physical state change, so that the client can perform physical simulation to simulate the physical state change of the carrier until the position of the carrier is not changed any more, the carrier is considered to be stopped stably, and the client stops the physical simulation. The method comprises the steps of setting a client to generate a carrier position and carrying out physical simulation on a carrier until the carrier is stable, and is used for avoiding the visual effect that a land vehicle stops on a steep slope on a mountain, wherein a fixed scene possibly caused by a non-planar fixed scene is superposed with a carrier model or a physical phenomenon is violated in the prior art when the carrier model is attached to the fixed scene model. Through the physical simulation of the client to the carrier, the carrier is changed from a physical state to final stable halt in each area, and the carrier is closer to the physical phenomenon in a real environment, so that the reality sense of application is improved.
In addition, in another embodiment of the present invention, the second client 120 may also correct the position information of the vehicle. This embodiment describes a case where network communication between the second client 120 and the server 200 is delayed or lost.
Specifically, the position of the vehicle driven by the first user in the second client deviates from the position of the vehicle sent by the first client stored in the server, and at this time, the server sends the stored position of the vehicle sent by the first client to the second client. The second client can receive the position information of the first role driving carrier and can correct the position of the first role driving carrier in the second role sight distance range.
Under the above situation, by forcibly correcting the position of the vehicle, the second character can observe that the vehicle driven by the first character generates transient movement or flickering phenomenon, which affects the experience of the second user.
In order to avoid or reduce the transient or flicker phenomenon occurring in the process of correcting the position of the vehicle, in another embodiment, the second client may perform anti-flicker processing on the position information of the corrected vehicle. The method comprises the following steps:
step 1, assuming that the position of the carrier M before correction is A [ xa, ya, za ], and the position after correction is B [ xb, yb, zb ];
and 2, the second client receives the carrier coordinate position information sent by the server, simultaneously hides the carrier, and sets a carrier N which is only the same as the appearance model of the carrier M at the position A. The second client only controls the carrier N to move along with the carrier M and keeps the coordinate positions of the carrier N and the carrier M relatively static, and does not physically simulate the carrier N. During the moving process, the relative offset vector of the coordinate positions of the carrier M and the carrier N is C [ xc, yc, zc ], where C is B-a. At the moment, the second user can only see the carrier N with the same appearance model as the carrier M, so that the situation of instantaneous carrier movement does not occur visually;
step 3, the carrier M continues to move, and the carrier N moves together with the carrier M due to relative rest;
step 4, linearly reducing the relative offset vector C to 0 within N seconds, namely translating the false carrier N to the position of the real carrier M within N seconds;
and 5, hiding the false carrier N and displaying the real carrier M when the C is changed to be 0.
The purpose of adopting the scheme is that the carrier M is a real carrier, the second client performs physical simulation on the carrier M in real time, the carrier N without collision can be used when the carrier M is directly translated, the carrier N does not need to perform physical simulation, the carrier N does not collide with the scene in the client when the carrier N is directly translated, and the phenomenon of instant shift or flicker of the carrier M can be weakened by translating the carrier N.
In the carrier physical simulation system of the embodiment of the invention, under the condition that the first client detects that the first role triggers the carrier control, the first client acquires the carrier operation information and the carrier position information of the first user and sends the carrier operation information and the carrier position information of the first user to the server, the server receives the carrier operation information and the carrier position information of the first user sent by the first client and synchronizes the carrier operation information and the carrier position information of the first user to the second client, the second client receives the carrier operation information and the carrier position information of the first user sent by the server, and in the second client, the carrier is physically simulated according to the carrier operation information and the carrier position information of the first user, so that the equipment resource is optimized, and the performance of the resource optimization device is improved, prevent the phenomenon of blocking, promote simulation driving and experience.
In order to implement the above embodiments, the present invention further provides a physical simulation method for a vehicle.
Fig. 2 is a flowchart of a vehicle physical simulation method according to an embodiment of the invention.
As shown in fig. 2, the vehicle physical simulation method applied to the client includes the following steps:
step 201, when the first client detects that the first character triggers the vehicle control, the first client obtains operation information of the first user on the vehicle and position information of the vehicle, and sends the operation information of the first user on the vehicle and the position information of the vehicle to the server, so that the server receives the operation information of the first user on the vehicle and the position information of the vehicle sent by the first client, and synchronizes the operation information of the first user on the vehicle and the position information of the vehicle to the second client.
The client comprises a first client and a second client, the first user controls the first role through the first client, and the second user controls the second role through the second client.
Step 202, the second client receives the operation information of the first user on the vehicle and the position information of the vehicle sent by the server, and performs physical simulation on the vehicle according to the operation information of the first user on the vehicle and the position information of the vehicle in the second client.
Specifically, the second client determines whether the carrier is in the range of the line of sight of the second role, if the carrier is not in the range of the line of sight of the second role, the physical simulation of the carrier is not started, and if the carrier is in the range of the line of sight of the second role, the physical simulation of the carrier is performed according to the operation information of the first user on the carrier and the position information of the carrier, which are sent by the server, until the carrier is stable or leaves the range of the line of sight of the second role.
The present embodiment describes a situation that the first character is observed from the perspective of the second character to control the vehicle. The first role refers to a role of controlling the vehicle, and the second role refers to a role of observing the vehicle. Specifically, the server stores data related to the application, including position information of a vehicle operated by the first character and operation information of the vehicle. The server establishes communication with the plurality of clients, and each client acquires the position information of the role using the client and the control information of the role on the carrier and sends the position information to the server. After receiving the information, the server synchronizes the information to each client, so that each client comprises the position information of the role corresponding to all the clients and the control information of the role on the carrier after acquiring the synchronization information. The second client obtains the control information of the first client to the carrier and the real-time carrier position information driven by the first client, which are sent by the server. The carrier position information may be sent by the server at a frequency of 100 ms/time. If the vehicle driven by the first character is observed in the sight distance range of the second character, the second client can continuously acquire the position information (three-dimensional coordinates) of the vehicle driven by the first character and detect whether the position information changes. If the position information of the vehicle continuously changes, the vehicle can be determined to be in a moving state. In the second client, the physical simulation of the carrier can be continued by utilizing the control information of the first user on the carrier. It should be appreciated that the second client, when not receiving the most up-to-date information, uses the last received information to perform the physical simulation. If the vehicle position does not change continuously, the vehicle can be determined to be stable, and the second client can stop the physical simulation of the vehicle. Taking an automobile vehicle as an example, the first user triggers a driving or riding control, and the corresponding first character enters the automobile vehicle. The first client carries out physical simulation on the automobile carrier, when a first character enters the automobile carrier, because the first character has weight, four groups of suspension springs of the automobile carrier bear the pressure of the gravity of the first character and contract to support the automobile body, and meanwhile, the automobile body can generate the visual effect of physical change processes such as reciprocating shaking and the like. The first client records operation information of the first user triggering the driving or riding control and sends the information to the server, and the server synchronizes the operation information of the first user triggering the driving or riding control to the second client. In the visual range of the second role, the second client receives operation information of a control triggered to drive or ride by the first user on the automobile carrier and position information of the automobile carrier sent by the server, and performs physical simulation on the carrier driven by the first user according to the information, so that the second user can observe the visual effect of physical change processes such as reciprocating shaking and the like generated by the first user driving or riding the automobile carrier body in the visual range of the second role, and the second client performs physical simulation on the operation information simulation pair of the first client by using the first role, so that the visual effect of the whole physical change process is closer to reality. Similarly, after a first user triggers a driving control and enters the vehicle, a vehicle control at least comprising an acceleration control is displayed on an interactive interface of the first user, the first user triggers the acceleration control, first user operation information is sent to equipment by first equipment, second equipment receives the information from a server, the operation information of the first user triggering the acceleration control carries out physical simulation on the vehicle controlled by the first user, and then a second role observes the visual effect of the physical change process of the accelerated advance of the first role driving vehicle; if the first user triggers the ride control, the acceleration control and the deceleration control are not displayed on the interactive interface of the first user. After the first user triggers the driving or riding control, the first character triggers the leaving control, and then the second character can also observe the vibration effect of the suspension spring when the first character leaves the vehicle. It should be understood that the physical simulation effect generated by the first user-triggered control occurs within the visual range of a second character that observes the visual effect of the physical change process physically simulated by the second device. If the client is not within the range of the visual range, the second role will not observe the visual effect of the physical state change process, that is, the corresponding second client will not start the physical simulation.
In order to simulate the virtual character more truly, some more realistic setting is made, for example, the virtual character can see 500 meters farthest in a sunny day; in foggy days, the virtual character can see 300 meters farthest. That is, the range of viewing distances may vary with weather.
The second client receives the location information of the vehicle driven by the first user and the location information of the vehicle driven by the first user in the first client may have a deviation due to network delay and the like.
The server continuously updates the position information of the carrier driven by the first user sent by the first client, and the second client corrects the current position information of the carrier driven by the first user after receiving the information. Specifically, the server sends the saved carrier position driven by the first user sent by the first client to the second client. The second client can receive the position information of the first role driving carrier and correct the position of the first role driving carrier in the second role sight distance range.
After the position information of the vehicle driven by the first user is corrected, a phenomenon such as flicker may occur, so the second client needs to perform anti-flicker processing on the corrected position information of the vehicle. In order to avoid or reduce the transient or flicker phenomenon occurring in the process of correcting the position of the vehicle, in another embodiment, the second client may perform anti-flicker processing on the position information of the corrected vehicle. The method comprises the following steps:
step 1, assuming that the position of the carrier M before correction is A [ xa, ya, za ], and the position after correction is B [ xb, yb, zb ];
and 2, the second client receives the carrier coordinate position information sent by the server, simultaneously hides the carrier, and sets a carrier N which is only the same as the appearance model of the carrier M at the position A. The second client only controls the carrier N to move along with the carrier M and keeps the coordinate positions of the carrier N and the carrier M relatively static, and does not physically simulate the carrier N. During the moving process, the relative offset vector of the coordinate positions of the carrier M and the carrier N is C [ xc, yc, zc ], where C is B-a. At the moment, the second user can only see the carrier N with the same appearance model as the carrier M, so that the situation of instantaneous carrier movement does not occur visually;
step 3, the carrier M continues to move, and the carrier N moves together with the carrier M due to relative rest;
step 4, linearly reducing the relative offset vector C to 0 within N seconds, namely translating the false carrier N to the position of the real carrier M within N seconds;
and 5, hiding the false carrier N and displaying the real carrier M when the C is changed to be 0.
The purpose of adopting the scheme is that the carrier M is a real carrier, the second client performs physical simulation on the carrier M in real time, the carrier N without collision can be used when the carrier M is directly translated, the carrier N does not need to perform physical simulation, the carrier N does not collide with the scene in the client when the carrier N is directly translated, and the phenomenon of instant shift or flicker of the carrier M can be weakened by translating the carrier N.
In another embodiment of the present invention, as shown in fig. 3, the method further comprises:
step 203, when the first client detects that the first character triggers the vehicle control, operation information of the first character vehicle is obtained in the first client, and the vehicle is physically simulated.
This embodiment describes the situation of the first character perspective when the first character drives the vehicle. For example, the vehicle enters the field of view of the first character, and the user may select to touch a ride control in the interactive interface, thereby controlling the entry of the first character into the vehicle. The user can control driving of the vehicle and perform physical simulation on the vehicle, such as vehicle acceleration, vehicle deceleration and the like, on the acceleration control, the deceleration control and the like (inputting an instruction on the sliding direction or the pressure of the acceleration control and the deceleration control and inputting an instruction on the sliding direction or the sliding angle of the direction control) on the touch interactive interface.
The scheme aims to simulate real driving experience as much as possible and improve the operability of application and the operation enthusiasm of users.
In yet another embodiment of the present invention, as shown in fig. 4, the method further comprises:
step 204, when the first client detects that the first character triggers the carrier to leave the control, the first client determines whether the carrier is within the range of the visual range of the first character.
In step 205, if the vehicle is not within the range of the line of sight of the first character, the physical simulation of the vehicle is not started.
In step 206, if the vehicle is within the range of the first role, it is further determined whether the vehicle is stationary.
Step 207, if the vehicle is stable, stopping performing the physical simulation on the vehicle.
And step 208, if the vehicle is not stable, performing physical simulation on the vehicle until the vehicle is stable or leaves the range of the visual distance of the first role.
Specifically, the first client receives an input instruction of clicking a departure control in the interactive interface by the first user, and the first character immediately departs from the driven vehicle. The first client continuously acquires the carrier position and whether the carrier position changes or not. If the position of the carrier does not continuously change, the carrier can be determined to be stable, the first client stops physical simulation of the carrier, and the position of the carrier in stable stopping is sent to the server. If the vehicle position continues to change, it may be determined that the vehicle is still moving. The first client continues to perform physical simulation on the carrier. Further, the first client continuously acquires the carrier position and judges whether the carrier position is within the sight distance range of the first role. If the acquired carrier position is not within the visual distance range of the first role, the physical simulation of the carrier can be stopped in the first client, the carrier position is continuously acquired until the carrier is stably stopped, and the position after the stabilization is sent to the server. If the acquired position is within the range of the first character, the first client continues to physically simulate the vehicle until the vehicle is stabilized or the current position of the vehicle is away from the range of the first character. The first client continuously obtains the first role and the real-time carrier position driven by the first role and sends the position to the server.
In the above embodiments, the physical simulation is selectively turned off for the vehicle instead of continuously performing the physical simulation, which optimizes the device resources, improves the performance of the resource optimization device, prevents the stuck phenomenon, and improves the simulated driving experience.
In yet another embodiment of the present invention, as shown in fig. 5, the method further comprises:
and 209, the first client and/or the second client acquires the topographic characteristics of the carrier when the carrier is generated by the server, and performs physical simulation on the carrier generated by the server according to the topographic characteristics of the carrier.
The present embodiment describes a case when the server initializes scene information and generates a vehicle.
Specifically, all the clients can obtain the application start instruction sent by the server, and the interactive interface in the waiting stage in the client is switched to the application scene interactive interface. Further (simultaneously), all the clients acquire the carrier generation instruction sent by the server. The vehicle generation instruction comprises each vehicle type required to be generated in an application scene (map) and a vehicle position appearing in the application scene. Various different types of carriers can be preset in the server, and the application scenes of the different types of carriers are different. For example, an application map is generally composed of three areas, land, water and air. The automobile, the bicycle and the balance car are suitable for land traffic, the yacht and the steamship are suitable for water traffic, the airplane is suitable for air traffic, the land traffic is parked on land for users to carry out land traffic, the water traffic is parked in a water area for users to carry out water traffic, and the airplane is parked on land for users to carry out air traffic after taking off from the ground. The client obtains an application starting instruction sent by the server, and further (simultaneously) the client obtains the type of the carrier needing to be generated in each area in the map and the three-dimensional coordinate position of the carrier in each area range in the map. After the client side obtains the carrier generation instruction generated by the server, 3D modeling can be carried out at the corresponding position in the map randomly to generate a corresponding carrier. Further, each client generates a vehicle at a three-dimensional coordinate position with a certain height above the ground and the water surface instead of generating the vehicle at the three-dimensional coordinate position of the ground and the water surface directly. The initial generating position of the carrier is higher than the ground or the water surface by a certain height, the carrier generated by the client is influenced by virtual gravity in application and falls down and contacts with fixed scenes such as the ground, buildings, trees, water areas and the like in application scenes after falling down so as to generate physical state change, so that the client can perform physical simulation to simulate the physical state change of the carrier until the position of the carrier is not changed any more, the carrier is considered to be stopped stably, and the client stops the physical simulation. The method comprises the steps of setting a client to generate a carrier position and carrying out physical simulation on a carrier until the carrier is stable, and is used for avoiding the visual effect that a land vehicle stops on a steep slope on a mountain, wherein a fixed scene possibly caused by a non-planar fixed scene is superposed with a carrier model or a physical phenomenon is violated in the prior art when the carrier model is attached to the fixed scene model. Through the physical simulation of the client to the carrier, the carrier is changed from a physical state to final stable halt in each area, and the carrier is closer to the physical phenomenon in a real environment, so that the reality sense of application is improved.
The carrier physical simulation method of the embodiment of the invention comprises the steps that under the condition that a first client detects that a first role triggers a carrier control, the first client obtains operation information of a first user on a carrier and position information of the carrier and sends the operation information of the first user on the carrier and the position information of the carrier to a server, the server receives the operation information of the first user on the carrier and the position information of the carrier sent by the first client and synchronizes the operation information of the first user on the carrier and the position information of the carrier to a second client, the second client receives the operation information of the first user on the carrier and the position information of the carrier sent by the server, and in the second client, the carrier is physically simulated according to the operation information of the first user on the carrier and the position information of the carrier, so that equipment resources are optimized, and the performance of a resource optimization device is improved, prevent the phenomenon of blocking, promote simulation driving and experience.
In order to implement the above embodiment, the present invention further provides a client.
Fig. 6 is a block diagram of a client according to an embodiment of the present invention.
As shown in fig. 6, the client includes a processing module 610 and a physical simulation module 620.
The processing module 610 is configured to, when the first client detects that the first character triggers the vehicle control, obtain operation information of the first user on the vehicle and position information of the vehicle, and send the operation information of the first user on the vehicle and the position information of the vehicle to the server, so that the server receives the operation information of the first user on the vehicle and the position information of the vehicle sent by the first client, and synchronizes the operation information of the first user on the vehicle and the position information of the vehicle to the second client.
The physical simulation module 620 is configured to receive the operation information of the first user on the vehicle and the position information of the vehicle sent by the server, and perform physical simulation on the vehicle in the second client according to the operation information of the first user on the vehicle and the position information of the vehicle.
As shown in fig. 7, the client further includes a modification module 630.
And a correcting module 630, configured to correct the position information of the vehicle.
As shown in fig. 8, the client further includes an anti-flicker module 640.
And the anti-flicker module 640 is configured to perform anti-flicker processing on the corrected position information of the vehicle.
It should be noted that the explanation of the vehicle physical simulation system is also applicable to the vehicle physical simulation method according to the embodiment of the present invention, and details not disclosed in the embodiment of the present invention are not repeated herein.
In the client of the embodiment of the invention, when the first client detects that the first role triggers the carrier control, the first client acquires the carrier operation information of the first user and the carrier position information, and sends the carrier operation information of the first user and the carrier position information to the server, the server receives the carrier operation information of the first user and the carrier position information sent by the first client, and synchronizes the carrier operation information of the first user and the carrier position information to the second client, the second client receives the carrier operation information of the first user and the carrier position information sent by the server, and in the second client, the carrier is physically simulated according to the carrier operation information of the first user and the carrier position information, so that equipment resources are optimized, and the performance of a resource optimization device is improved, prevent the phenomenon of blocking, promote simulation driving and experience.
In order to achieve the above embodiments, the present invention further provides a computer-readable storage medium, on which a computer program is stored, wherein the computer program is executed by a processor to implement the vehicle physical simulation method of the above aspect.
In order to implement the above embodiments, the present invention further provides an electronic device.
The electronic device is installed with a client, and includes a processor, a memory, and a computer program stored on the memory and capable of running on the processor, and the processor is used for executing the vehicle physical simulation method of the embodiment of the last aspect of the present invention.
In the electronic device of the embodiment of the invention, when the first client detects that the first role triggers the carrier control, the first client obtains the operation information of the first user on the carrier and the position information of the carrier, and sends the operation information of the first user on the carrier and the position information of the carrier to the server, the server receives the operation information of the first user on the carrier and the position information of the carrier sent by the first client, and synchronizes the operation information of the first user on the carrier and the position information of the carrier to the second client, the second client receives the operation information of the first user on the carrier and the position information of the carrier sent by the server, and in the second client, the carrier is physically simulated according to the operation information of the first user on the carrier and the position information of the carrier, so that the device resource is optimized, and the performance of the resource optimization device is improved, prevent the phenomenon of blocking, promote simulation driving and experience.
In order to implement the above embodiments, the present invention further provides a physical simulation method for a vehicle.
Fig. 9 is a flowchart of a vehicle physical simulation method according to an embodiment of the invention.
As shown in fig. 9, the vehicle physical simulation method applied to a server includes the following steps:
step 901, when the first client detects that the first character triggers the vehicle control, the server receives operation information of the first user on the vehicle and position information of the vehicle sent by the first client.
Step 902, synchronizing the operation information of the first user on the vehicle and the position information of the vehicle to the second client, so that the second client receives the operation information of the first user on the vehicle and the position information of the vehicle sent by the server, and in the second client, performing physical simulation on the vehicle according to the operation information of the first user on the vehicle and the position information of the vehicle.
As shown in fig. 10, the embodiment of the present invention may further include the steps of:
in step 903, the server initializes the application scenario.
The application scenario includes a variety of different topographical features.
And 904, randomly generating a carrier on various different terrain features, so that the first client and/or the second client performs physical simulation on the carrier generated by the server according to the terrain features where the carrier is located.
The present embodiment is a method executed by a server side corresponding to a vehicle physical simulation system. The explanation of the carrier physical simulation system is also applicable to the carrier physical simulation method according to the embodiment of the present invention, and details not disclosed in the embodiment of the present invention are not described herein again.
In the method for physically simulating the carrier, the server receives the operation information of the first user on the carrier and the position information of the carrier sent by the first client under the condition that the first client detects that the first role triggers the carrier control, synchronizes the operation information of the first user on the carrier and the position information of the carrier to the second client, so that the second client receives the operation information of the first user on the carrier and the position information of the carrier sent by the server, and physically simulates the carrier in the second client according to the operation information of the first user on the carrier and the position information of the carrier, thereby optimizing equipment resources, improving the performance of a resource optimization device, preventing a pause phenomenon and improving the driving experience.
In order to implement the above embodiment, the present invention further provides a server.
Fig. 11 is a block diagram of a server according to an embodiment of the present invention.
As shown in fig. 11, the server includes a receiving module 1100 and a synchronization module 1120.
The receiving module 1100 is configured to receive, by the server, operation information of the first user on the vehicle and location information of the vehicle sent by the first client when the first client detects that the first character triggers the vehicle control.
The client comprises a first client and a second client, the first user controls the first role through the first client, and the second user controls the second role through the second client.
The synchronization module 1120 is configured to synchronize the operation information of the first user on the vehicle and the position information of the vehicle to the second client, so that the second client receives the operation information of the first user on the vehicle and the position information of the vehicle sent by the server, and performs physical simulation on the vehicle in the second client according to the operation information of the first user on the vehicle and the position information of the vehicle.
As shown in fig. 12, the server may also include a generation module 1130.
The generating module 1130 is configured to initialize an application scenario, where the application scenario includes a plurality of different topographic features, and randomly generate a carrier on the plurality of different topographic features, so that the first client and/or the second client performs a physical simulation on the carrier generated by the server according to the topographic feature where the carrier is located.
It should be noted that the foregoing explanation of the vehicle physical simulation method is also applicable to the server in the embodiment of the present invention, and details not disclosed in the embodiment of the present invention are not repeated herein.
According to the server provided by the embodiment of the invention, under the condition that the first client detects that the first role triggers the carrier control, the server receives the operation information of the first user on the carrier and the position information of the carrier, which are sent by the first client, and synchronizes the operation information of the first user on the carrier and the position information of the carrier to the second client, so that the second client receives the operation information of the first user on the carrier and the position information of the carrier, which are sent by the server, and in the second client, the carrier is physically simulated according to the operation information of the first user on the carrier and the position information of the carrier, so that equipment resources are optimized, the performance of a resource optimization device is improved, the pause phenomenon is prevented, and the driving simulation experience is improved.
In order to achieve the above embodiments, the present invention further provides a computer-readable storage medium, on which a computer program is stored, wherein the computer program is executed by a processor to implement the vehicle physical simulation method of the above aspect.
In order to implement the above embodiment, the present invention further provides a server.
The server includes a processor for executing the vehicle physical simulation method of the embodiment of the last aspect of the present invention, a memory, and a computer program stored on the memory and executable on the processor.
According to the server provided by the embodiment of the invention, under the condition that the first client detects that the first role triggers the carrier control, the server receives the operation information of the first user on the carrier and the position information of the carrier, which are sent by the first client, and synchronizes the operation information of the first user on the carrier and the position information of the carrier to the second client, so that the second client receives the operation information of the first user on the carrier and the position information of the carrier, which are sent by the server, and in the second client, the carrier is physically simulated according to the operation information of the first user on the carrier and the position information of the carrier, so that equipment resources are optimized, the performance of a resource optimization device is improved, the pause phenomenon is prevented, and the driving simulation experience is improved.
In the description herein, references to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above are not necessarily intended to refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, various embodiments or examples and features of different embodiments or examples described in this specification can be combined and combined by one skilled in the art without contradiction.
Furthermore, the terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In the description of the present invention, "a plurality" means at least two, e.g., two, three, etc., unless specifically limited otherwise.
Any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing specific logical functions or steps of the process, and alternate implementations are included within the scope of the preferred embodiment of the present invention in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the present invention.
The logic and/or steps represented in the flowcharts or otherwise described herein, e.g., an ordered listing of executable instructions that can be considered to implement logical functions, can be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. For the purposes of this description, a "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of the computer-readable medium would include the following: an electrical connection (electronic device) having one or more wires, a portable computer diskette (magnetic device), a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). Additionally, the computer-readable medium could even be paper or another suitable medium upon which the program is printed, as the program can be electronically captured, via for instance optical scanning of the paper or other medium, then compiled, interpreted or otherwise processed in a suitable manner if necessary, and then stored in a computer memory.
It should be understood that portions of the present invention may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, the various steps or methods may be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, any one or combination of the following techniques, which are known in the art, may be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application specific integrated circuit having an appropriate combinational logic gate circuit, a Programmable Gate Array (PGA), a Field Programmable Gate Array (FPGA), or the like.
It will be understood by those skilled in the art that all or part of the steps carried by the method for implementing the above embodiments may be implemented by hardware that is related to instructions of a program, and the program may be stored in a computer-readable storage medium, and when executed, the program includes one or a combination of the steps of the method embodiments.
In addition, functional units in the embodiments of the present invention may be integrated into one processing module, or each unit may exist alone physically, or two or more units are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. The integrated module, if implemented in the form of a software functional module and sold or used as a separate product, may also be stored in a computer readable storage medium.
The storage medium mentioned above may be a read-only memory, a magnetic or optical disk, etc. Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention, and that variations, modifications, substitutions and alterations can be made to the above embodiments by those of ordinary skill in the art within the scope of the present invention.

Claims (10)

1. A vehicle position correction method is applied to a vehicle physical simulation system, the system comprises a server and a second client, the second client is used for carrying out physical simulation on a vehicle M according to the vehicle physical simulation method and correcting the position of the vehicle M, and the vehicle position correction method comprises the following steps:
acquiring a position A of the carrier M before correction;
receiving coordinate position information of the carrier M sent by the server, and hiding the carrier M;
arranging a carrier N which is the same as the appearance model of the carrier M at the position A;
controlling the carrier N to move along with the carrier M, keeping the carrier N and the carrier M relatively static, and not performing physical simulation on the carrier N;
translating the carrier N to the coordinate position of the carrier M within N seconds;
hiding the carrier N and displaying the carrier M under the condition that a relative offset vector C between the carrier M and the carrier N is linearly reduced to 0.
2. The method of claim 1, further comprising: acquiring a corrected position B of the carrier M;
the relative offset vector is initially a vector pointing from the position a to the position B, where the relative offset vector C is B-a.
3. The method according to claim 1, wherein the vehicle physical simulation method is applied to the vehicle physical simulation system, wherein the vehicle physical simulation system further comprises a first client, a first user controls a first role through the first client, and a second user controls a second role through the second client, and the vehicle physical simulation method comprises the following steps:
under the condition that the first client detects that the first role triggers the carrier control, the first client acquires operation information of the first user on the carrier and position information of the carrier, and sends the operation information of the first user on the carrier and the position information of the carrier to the server, so that the server receives the operation information of the first user on the carrier and the position information of the carrier sent by the first client, and synchronizes the operation information of the first user on the carrier and the position information of the carrier to the second client;
the second client receives the operation information of the first user on the carrier and the position information of the carrier sent by the server, selectively closes physical simulation on the carrier according to the position information of the carrier and the sight distance range of the second role, and physically simulates the carrier according to the operation information of the first user on the carrier and the position information of the carrier in the second client when the physical simulation is selected on the carrier;
and the first client selectively closes physical simulation to the carrier according to the position information of the carrier and the sight distance range of the first role under the condition that the first client detects that the first role triggers the carrier to leave the control.
4. The method of claim 3, wherein the physically simulating, in the second client, the vehicle according to the operation information of the vehicle by the first user and the position information of the vehicle comprises:
the second client judges whether the carrier is in the range of the visual distance of the second role, if the carrier is not in the range of the visual distance of the second role, physical simulation of the carrier is not started, and if the carrier is in the range of the visual distance of the second role, the carrier is physically simulated according to the operation information of the first user on the carrier and the position information of the carrier, which are sent by the server, until the carrier is stable or leaves the range of the visual distance of the second role.
5. The method of claim 3, wherein the vehicle physics simulation method further comprises:
and under the condition that the first client detects that the first character triggers the carrier control, acquiring operation information of the carrier for the first character in the first client, and carrying out physical simulation on the carrier.
6. The method of claim 5, wherein the vehicle physics simulation method further comprises:
when the first client detects that the first role triggers the carrier to leave the control, the first client judges whether the carrier is in a visual range of the first role, if the carrier is not in the visual range of the first role, physical simulation of the carrier is not started, if the carrier is in the visual range of the first role, whether the carrier is stable is further judged, if the carrier is stable, physical simulation of the carrier is stopped, and if the carrier is not stable, physical simulation of the carrier is carried out until the carrier is stable or leaves the visual range of the first role.
7. The method of claim 3, wherein the vehicle physics simulation method further comprises:
and the first client and/or the second client acquires the topographic features of the carrier when the carrier is generated by the server, and performs physical simulation on the carrier generated by the server according to the topographic features of the carrier.
8. A vehicle position correction device is applied to a vehicle physical simulation system, the system comprises a server and a second client, the second client is used for carrying out physical simulation on a vehicle M according to a vehicle physical simulation method and correcting the position of the vehicle M, and the device comprises:
the position acquisition unit is used for acquiring a position A before the carrier is corrected;
the carrier hiding unit is used for receiving the coordinate position information of the carrier M sent by the server and hiding the carrier M;
the false carrier setting unit is used for setting a carrier N which is the same as the appearance model of the carrier M at the position A;
the false carrier control unit is used for controlling the carrier N to move along with the carrier M, keeping the carrier N and the carrier M relatively static and not physically simulating the carrier N;
the offset adjusting unit is used for translating the carrier N to the coordinate position of the carrier M within N seconds;
and the carrier display unit is used for hiding the carrier N and displaying the carrier M under the condition that the relative offset vector C between the carrier M and the carrier N is linearly reduced to 0.
9. A second client, belonging to a vehicle physical simulation system, the system further comprising a server, wherein the second client is configured to perform physical simulation on a vehicle M according to a vehicle physical simulation method and correct a position of the vehicle M, and the second client comprises:
the position acquisition module is used for acquiring a position A before the carrier is corrected;
the carrier hiding module is used for receiving the coordinate position information of the carrier M sent by the server and hiding the carrier M;
the false carrier setting module is used for setting a carrier N which is the same as the appearance model of the carrier M at the position A;
the false carrier control module is used for controlling the carrier N to move along with the carrier M, keeping the carrier N and the carrier M relatively static and not physically simulating the carrier N;
the offset adjusting module is used for translating the carrier N to the coordinate position of the carrier M within N seconds;
the carrier display module is used for hiding the carrier N and displaying the carrier M under the condition that the relative offset vector C between the carrier M and the carrier N is linearly reduced to 0.
10. A second electronic device, wherein a second client is installed in the electronic device, the electronic device comprising:
a processor; and
a memory for storing executable instructions of the processor;
wherein the processor is configured to perform the vehicle position correction method of any one of claims 1-7 via execution of the executable instructions.
CN202111084892.4A 2018-02-11 Carrier position correction method and device, second client and second electronic equipment Active CN113786610B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111084892.4A CN113786610B (en) 2018-02-11 Carrier position correction method and device, second client and second electronic equipment

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202111084892.4A CN113786610B (en) 2018-02-11 Carrier position correction method and device, second client and second electronic equipment
CN201810141927.5A CN108429793B (en) 2018-02-11 2018-02-11 Carrier physical simulation method, system, client, electronic equipment and server

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
CN201810141927.5A Division CN108429793B (en) 2018-02-11 2018-02-11 Carrier physical simulation method, system, client, electronic equipment and server

Publications (2)

Publication Number Publication Date
CN113786610A true CN113786610A (en) 2021-12-14
CN113786610B CN113786610B (en) 2024-05-31

Family

ID=

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030134714A1 (en) * 2002-01-11 2003-07-17 Konami Corporation Exercise assistance apparatus
US20030216161A1 (en) * 2002-05-17 2003-11-20 Electronic Arts, Inc. Systems and methods for simulating game state changes responsive to an interrupt condition
JP2004013202A (en) * 2002-06-03 2004-01-15 Nintendo Co Ltd Game device and game program
TW200922659A (en) * 2007-11-22 2009-06-01 Univ Nat Central Carrier device of guide toy with automatic positioning functions
CN103177470A (en) * 2011-12-21 2013-06-26 哈曼贝克自动系统股份有限公司 Method and system for playing an augmented reality in a motor vehicle display
CN105807922A (en) * 2016-03-07 2016-07-27 湖南大学 Implementation method, device and system for virtual reality entertainment driving
CN106559426A (en) * 2016-11-24 2017-04-05 腾讯科技(深圳)有限公司 A kind of data processing method and server and client based on frame synchronization
CN107137927A (en) * 2017-05-26 2017-09-08 网易(杭州)网络有限公司 The acquisition methods and device of the position coordinates of virtual game object

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030134714A1 (en) * 2002-01-11 2003-07-17 Konami Corporation Exercise assistance apparatus
US20030216161A1 (en) * 2002-05-17 2003-11-20 Electronic Arts, Inc. Systems and methods for simulating game state changes responsive to an interrupt condition
JP2004013202A (en) * 2002-06-03 2004-01-15 Nintendo Co Ltd Game device and game program
TW200922659A (en) * 2007-11-22 2009-06-01 Univ Nat Central Carrier device of guide toy with automatic positioning functions
CN103177470A (en) * 2011-12-21 2013-06-26 哈曼贝克自动系统股份有限公司 Method and system for playing an augmented reality in a motor vehicle display
CN105807922A (en) * 2016-03-07 2016-07-27 湖南大学 Implementation method, device and system for virtual reality entertainment driving
CN106559426A (en) * 2016-11-24 2017-04-05 腾讯科技(深圳)有限公司 A kind of data processing method and server and client based on frame synchronization
CN107137927A (en) * 2017-05-26 2017-09-08 网易(杭州)网络有限公司 The acquisition methods and device of the position coordinates of virtual game object

Also Published As

Publication number Publication date
CN108429793B (en) 2021-10-08
CN108429793A (en) 2018-08-21

Similar Documents

Publication Publication Date Title
CN108429793B (en) Carrier physical simulation method, system, client, electronic equipment and server
CN109847337A (en) Game control method and device, storage medium
US11410634B2 (en) Information processing apparatus, information processing method, display system, and mobile object
WO2015176599A1 (en) Interaction method, interaction apparatus and user equipment
CN108657089B (en) Amusement device for automatically driving a motor vehicle
CN106780674B (en) Lens moving method and device
CN109491624A (en) Multi-screen control method and device, storage medium and the vehicle device of onboard system
WO1999017852A2 (en) Multi-player entertainment system
CN110891659B (en) Optimized delayed illumination and foveal adaptation of particle and simulation models in a point of gaze rendering system
CN202171880U (en) A three-dimensional visual simulation driving system
US11219833B2 (en) Information synchronization method and apparatus, and storage medium
CN110772784B (en) Carrier control method and device, storage medium and electronic device
CN113534466A (en) Display method and device, head-mounted augmented reality equipment and storage medium
US10132639B2 (en) Systems and methods to provide updates at first device of location of second device as the devices travel to a destination
CN113786610B (en) Carrier position correction method and device, second client and second electronic equipment
CN117141388A (en) Method, device and system for changing vehicle style
CN105383406A (en) Method and device for displaying car logo
US20200371532A1 (en) Information processing device, autonomous vehicle, information processing method and program
CN114398120A (en) Interface display method and device, storage medium and electronic equipment
KR20210133344A (en) Apparatus for controlling mixed reality attraction and method thereof
CN110176159A (en) A kind of display systems and host of traffic accident case
US20240161428A1 (en) Method and system for presenting a shared virtual environment to users residing in different vehicles, and server unit, user device, and vehicle
CN108159699A (en) Equipment moving control method, apparatus and system
WO2023221879A1 (en) Method and apparatus for controlling virtual vehicle, and device and computer-readable storage medium
CN118093075A (en) Method and device for generating dynamic wallpaper of vehicle and vehicle

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