[go: up one dir, main page]

CN113786610B - 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
CN113786610B
CN113786610B CN202111084892.4A CN202111084892A CN113786610B CN 113786610 B CN113786610 B CN 113786610B CN 202111084892 A CN202111084892 A CN 202111084892A CN 113786610 B CN113786610 B CN 113786610B
Authority
CN
China
Prior art keywords
vehicle
client
character
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.)
Active
Application number
CN202111084892.4A
Other languages
Chinese (zh)
Other versions
CN113786610A (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
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

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 before correction of the carrier M; receiving the coordinate position information of the carrier M sent by the server, and hiding the carrier M; setting 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 a coordinate position of the carrier M within N seconds; in the case that the relative offset vector C between the carrier M and the carrier N linearly decreases to 0, the carrier N is hidden and the carrier M is displayed. The phenomenon of transient movement or flickering occurring in the process of correcting the position of the carrier can be avoided or reduced.

Description

载具位置修正方法、装置、第二客户端、第二电子设备Vehicle position correction method, device, second client, and second electronic device

技术领域Technical Field

本发明涉及信息处理技术领域,尤其涉及载具位置修正方法、装置、第二客户端、第二电子设备。The present invention relates to the field of information processing technology, and in particular to a vehicle position correction method, device, second client, and second electronic device.

背景技术Background technique

用户对游戏画面、虚拟现实效果的要求越来越强烈,导致游戏的场景设计的更加宏大。随着游戏开发制作的水平越来越高,游戏的场景也越来越宏大,细节也越来越精细。制作精良的游戏带给玩家更好的游戏体验。但是,大场景、细节多会占用大量的资源,对运行游戏的机器性能要求很高,如果机器性能跟不上需求,很可能产生卡顿的现象,导致用户游戏体验变差。比如,在手机上运行多人共同参与的网络游戏,尤其是2D、3D效果的网络游戏,如果游戏对手机的资源占用太高,将导致手机发烫、游戏卡顿、延迟发生,间接导致用户的流失,在手机端又想实现像PC端一样效果的游戏受到手机硬件和网络的诸多限制,因此通过改善软件的设计方案来解决占用硬件资源的问题,变得越来越迫切。Users have increasingly strong requirements for game graphics and virtual reality effects, resulting in more ambitious game scene designs. As the level of game development and production increases, game scenes are becoming more and more ambitious, and details are becoming more and more refined. Well-made games bring players a better gaming experience. However, large scenes and many details will take up a lot of resources, and the performance of the machine running the game is very high. If the machine performance cannot keep up with the demand, it is likely to cause lag, resulting in a poor gaming experience for users. For example, running online games with multiple participants on mobile phones, especially online games with 2D and 3D effects, if the game occupies too many mobile phone resources, it will cause the phone to heat up, the game to freeze, and delays to occur, indirectly leading to the loss of users. Games that want to achieve the same effects as PCs on mobile phones are subject to many restrictions on mobile phone hardware and networks. Therefore, it is becoming more and more urgent to solve the problem of occupying hardware resources by improving software design solutions.

发明内容Summary of the invention

本发明提供载具位置修正方法、装置、第二客户端、第二电子设备,以解决上述技术问题中的至少一个。The present invention provides a vehicle position correction method, device, second client, and second electronic device to solve at least one of the above-mentioned technical problems.

本发明实施例提供一种载具位置修正方法,所述方法应用于载具物理模拟系统,所述系统包括服务器及第二客户端,所述第二客户端用于根据载具物理模拟方法对载具M进行物理模拟,并对所述载具M的位置进行修正,所述载具位置修正方法包括:An embodiment of the present invention provides a vehicle position correction method, which is applied to a vehicle physical simulation system. The system includes a server and a second client. The second client is used to perform physical simulation on a vehicle M according to the vehicle physical simulation method and correct the position of the vehicle M. The vehicle position correction method includes:

获取所述载具M修正前的位置A;Obtaining the position A of the vehicle M before correction;

接收所述服务器发送的所述载具M的坐标位置信息,并隐藏所述载具M;receiving the coordinate position information of the vehicle M sent by the server, and hiding the vehicle M;

在所述位置A设置与所述载具M外观模型相同的载具N;Arrange a vehicle N having the same appearance model as the vehicle M at the position A;

控制所述载具N跟随所述载具M进行运动,并保持所述载具N与所述载具M相对静止,并且不对所述载具N进行物理模拟;Control the vehicle N to follow the vehicle M to move, keep the vehicle N and the vehicle M relatively still, and do not perform physical simulation on the vehicle N;

在n秒内,将所述载具N平移至所述载具M的坐标位置;Within n seconds, translate the vehicle N to the coordinate position of the vehicle M;

在所述载具M与所述载具N之间的相对偏移向量C线性减少至0的情况下,隐藏所述载具N并显示所述载具M。When the relative offset vector C between the vehicle M and the vehicle N decreases linearly to 0, the vehicle N is hidden and the vehicle M is displayed.

可选的,所述方法还包括:获取所述载具M修正后的位置B;Optionally, the method further includes: obtaining a corrected position B of the vehicle M;

所述相对偏移向量初始时为由所述位置A指向所述位置B的向量,其中,相对偏移向量C=B-A。The relative offset vector is initially a vector pointing from the position A to the position B, wherein the relative offset vector C=B-A.

可选的,所述载具物理模拟方法应用于所述载具物理模拟系统,其中,所述载具物理模拟系统还包括第一客户端,第一用户通过所述第一客户端控制第一角色,第二用户通过所述第二客户端控制第二角色,所述载具物理模拟方法包括以下步骤:Optionally, the vehicle physics simulation method is applied to the vehicle physics simulation system, wherein the vehicle physics simulation system further includes a first client, a first user controls a first character through the first client, and a second user controls a second character through the second client, and the vehicle physics simulation method includes the following steps:

在所述第一客户端检测到所述第一角色触发所述载具操控控件的情况下,所述第一客户端获取所述第一用户对所述载具的操作信息以及所述载具的位置信息,并将所述第一用户对所述载具的操作信息和所述载具的位置信息发送至所述服务器,以使所述服务器接收所述第一客户端发送的所述第一用户对所述载具的操作信息和所述载具的位置信息,并将所述第一用户对所述载具的操作信息和所述载具的位置信息同步至所述第二客户端;When the first client detects that the first character triggers the vehicle control control, the first client obtains the first user's operation information on the vehicle and the location information of the vehicle, and sends the first user's operation information on the vehicle and the location information of the vehicle to the server, so that the server receives the first user's operation information on the vehicle and the location information of the vehicle sent by the first client, and synchronizes the first user's operation information on the vehicle and the location information of the vehicle to the second client;

所述第二客户端接收所述服务器发送的所述第一用户对载具的操作信息和所述载具的位置信息,并根据所述载具的位置信息和所述第二角色的视距范围对所述载具选择性关闭物理模拟,并在对所述载具选择进行物理模拟时,在所述第二客户端中,根据所述第一用户对载具的操作信息和所述载具的位置信息对所述载具进行物理模拟;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 selectively turns off the physical simulation of the vehicle according to the position information of the vehicle and the sight range of the second character, and when the physical simulation is selected for the vehicle, the second client performs the physical simulation on the vehicle according to the operation information of the first user on the vehicle and the position information of the vehicle;

其中,所述第一客户端在所述第一客户端检测到所述第一角色触发所述载具离开控件的情况下,根据所述载具的位置信息和所述第一角色的视距范围,对所述载具选择性关闭物理模拟。Among them, when the first client detects that the first character triggers the vehicle to leave the control, the first client selectively turns off the physical simulation of the vehicle according to the position information of the vehicle and the viewing range of the first character.

可选的,在所述第二客户端中,根据所述第一用户对载具的操作信息和所述载具的位置信息对所述载具进行物理模拟,具体包括:Optionally, in the second client, 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 determines whether the vehicle is within the sight range of the second character. If the vehicle is not within the sight range of the second character, physical simulation of the vehicle is not started. If the vehicle is within the sight range of the second character, physical simulation of the vehicle is performed according to the operation information of the first user on the vehicle and the position information of the vehicle sent by the server until the vehicle stops or leaves the sight range of the second character.

可选的,所述载具物理模拟方法还包括:Optionally, the vehicle physics simulation method further includes:

在所述第一客户端检测到所述第一角色触发所述载具操控控件的情况下,在所述第一客户端中,获取对所述第一角色所述载具的操作信息,对所述载具进行物理模拟。When the first client detects that the first character triggers the vehicle control control, the first client obtains operation information of the vehicle of the first character and performs physical simulation on the vehicle.

可选的,所述载具物理模拟方法还包括:Optionally, the vehicle physics simulation method further includes:

在所述第一客户端检测到所述第一角色触发所述载具离开控件的情况下,所述第一客户端判断所述载具是否在所述第一角色的视距范围内,如果所述载具不在所述第一角色的视距范围内,则不开启对所述载具的物理模拟,如果所述载具在所述第一角色的视距范围内,则进一步判断所述载具是否停稳,如果所述载具停稳,则停止对所述载具进行物理模拟,如果所述载具未停稳,则对所述载具进行物理模拟,直至所述载具停稳或离开所述第一角色的视距范围。When the first client detects that the first character triggers the vehicle to leave the control, the first client determines whether the vehicle is within the line of sight of the first character. If the vehicle is not within the line of sight of the first character, the physical simulation of the vehicle is not started. If the vehicle is within the line of sight of the first character, it is further determined whether the vehicle is stopped. If the vehicle is stopped, the physical simulation of the vehicle is stopped. If the vehicle is not stopped, the physical simulation of the vehicle is performed until the vehicle stops or leaves the line of sight of the first character.

可选的,所述载具物理模拟方法还包括:Optionally, the vehicle physics simulation method further includes:

所述第一客户端和/或所述第二客户端获取所述服务器生成所述载具时所述载具所处的地形特征,根据所述载具所处的地形特征对所述服务器生成的所述载具进行物理模拟。The first client and/or the second client obtains the terrain features where the vehicle is located when the server generates the vehicle, and performs physical simulation on the vehicle generated by the server according to the terrain features where the vehicle is located.

本发明实施例提供了一种载具位置修正装置,所述装置应用于载具物理模拟系统,所述系统包括服务器及第二客户端,所述第二客户端用于根据载具物理模拟方法对载具M进行物理模拟,并对所述载具M的位置进行修正,所述装置包括:An embodiment of the present invention provides a vehicle position correction device, which is applied to a vehicle physical simulation system. The system includes a server and a second client. The second client is used to perform physical simulation on a vehicle M according to a vehicle physical simulation method and correct the position of the vehicle M. The device includes:

位置获取单元,用于获取所述载具修正前的位置A;A position acquisition unit, used to acquire the position A of the vehicle before correction;

载具隐藏单元,用于接收所述服务器发送的所述载具M的坐标位置信息,并隐藏所述载具M;A vehicle hiding unit, used for receiving the coordinate position information of the vehicle M sent by the server, and hiding the vehicle M;

虚假载具设置单元,用于在所述位置A设置与所述载具M外观模型相同的载具N;A false vehicle setting unit, used for setting a vehicle N having the same appearance model as the vehicle M at the position A;

虚假载具控制单元,用于控制所述载具N跟随所述载具M进行运动,并保持所述载具N与所述载具M相对静止,并且不对所述载具N进行物理模拟;A fake vehicle control unit, used for controlling the vehicle N to follow the vehicle M in movement, keeping the vehicle N and the vehicle M relatively still, and not performing physical simulation on the vehicle N;

偏移量调整单元,用于在n秒内,将所述载具N平移至所述载具M的坐标位置;An offset adjustment unit, used to translate the vehicle N to the coordinate position of the vehicle M within n seconds;

载具显示单元,在所述载具M与所述载具N之间的相对偏移向量C线性减少至0的情况下,用于隐藏所述载具N并显示所述载具M。The vehicle display unit is used to hide the vehicle N and display the vehicle M when the relative offset vector C between the vehicle M and the vehicle N is linearly reduced to 0.

本发明实施例提供了一种第二客户端,所述第二客户端属于载具物理模拟系统,所述系统还包括服务器,所述第二客户端用于根据载具物理模拟方法对载具M进行物理模拟,并对所述载具M的位置进行修正,所述第二客户端包括:An embodiment of the present invention provides a second client, the second client belongs to a vehicle physical simulation system, the system further includes a server, the second client is used to perform physical simulation on a vehicle M according to a vehicle physical simulation method, and correct the position of the vehicle M, the second client includes:

位置获取模块,用于获取所述载具修正前的位置A;A position acquisition module, used to acquire the position A of the vehicle before correction;

载具隐藏模块,用于接收所述服务器发送的所述载具M的坐标位置信息,并隐藏所述载具M;A vehicle hiding module, used for receiving the coordinate position information of the vehicle M sent by the server, and hiding the vehicle M;

虚假载具设置模块,用于在所述位置A设置与所述载具M外观模型相同的载具N;A false vehicle setting module, used for setting a vehicle N having the same appearance model as the vehicle M at the position A;

虚假载具控制模块,用于控制所述载具N跟随所述载具M进行运动,并保持所述载具N与所述载具M相对静止,并且不对所述载具N进行物理模拟;A fake vehicle control module, used for controlling the vehicle N to follow the vehicle M in movement, keeping the vehicle N and the vehicle M relatively still, and not performing physical simulation on the vehicle N;

偏移量调整模块,用于在n秒内,将所所述载具N平移至所述载具M的坐标位置;An offset adjustment module, used to translate the vehicle N to the coordinate position of the vehicle M within n seconds;

载具显示模块,用于在所述载具M与所述载具N之间的相对偏移向量C线性减少至0的情况下,隐藏所述载具N并显示所述载具M。The vehicle display module is used to hide the vehicle N and display the vehicle M when the relative offset vector C between the vehicle M and the vehicle N is linearly reduced to 0.

本发明实施例提供了一种第二电子设备,所述电子设备中安装有第二客户端,所述电子设备包括:An embodiment of the present invention provides a second electronic device, in which a second client is installed. The electronic device includes:

处理器;以及Processor; and

存储器,用于存储所述处理器的可执行指令;A memory, configured to store executable instructions of the processor;

其中,所述处理器配置为经由执行所述可执行指令来执行上述任一项所述的载具位置修正方法。Wherein, the processor is configured to execute any of the above-mentioned vehicle position correction methods by executing the executable instructions.

附图说明BRIEF DESCRIPTION OF THE DRAWINGS

本发明上述的和/或附加的方面和优点从下面结合附图对实施例的描述中将变得明显和容易理解,其中:The above and/or additional aspects and advantages of the present invention will become apparent and easily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:

图1是根据本发明一个实施例的载具物理模拟系统的结构框图;FIG1 is a structural block diagram of a vehicle physics simulation system according to an embodiment of the present invention;

图2是根据本发明一个实施例的载具物理模拟方法的流程图;FIG2 is a flow chart of a vehicle physics simulation method according to an embodiment of the present invention;

图3是根据本发明另一个实施例的载具物理模拟方法的流程图;FIG3 is a flow chart of a vehicle physics simulation method according to another embodiment of the present invention;

图4是根据本发明又一个实施例的载具物理模拟方法的流程图;FIG4 is a flow chart of a vehicle physics simulation method according to yet another embodiment of the present invention;

图5是根据本发明再一个实施例的载具物理模拟方法的流程图;FIG5 is a flow chart of a vehicle physics simulation method according to yet another embodiment of the present invention;

图6是根据本发明一个实施例的客户端的结构框图;FIG6 is a structural block diagram of a client according to an embodiment of the present invention;

图7是根据本发明另一个实施例的客户端的结构框图;FIG7 is a structural block diagram of a client according to another embodiment of the present invention;

图8是根据本发明又一个实施例的客户端的结构框图;FIG8 is a structural block diagram of a client according to yet another embodiment of the present invention;

图9是根据本发明一个实施例的载具物理模拟方法的流程图;FIG9 is a flow chart of a vehicle physics simulation method according to an embodiment of the present invention;

图10是根据本发明另一个实施例的载具物理模拟方法的流程图;FIG10 is a flow chart of a vehicle physics simulation method according to another embodiment of the present invention;

图11是根据本发明一个实施例的服务器的结构框图;FIG11 is a structural block diagram of a server according to an embodiment of the present invention;

图12是根据本发明另一个实施例的服务器的结构框图。FIG. 12 is a structural block diagram of a server according to another embodiment of the present invention.

具体实施方式Detailed ways

下面详细描述本发明的实施例,实施例的示例在附图中示出,其中自始至终相同或类似的标号表示相同或类似的元件或具有相同或类似功能的元件。下面通过参考附图描述的实施例是示例性的,旨在用于解释本发明,而不能理解为对本发明的限制。Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present invention, and should not be construed as limiting the present invention.

下面参考附图描述本发明实施例的载具物理模拟方法、系统、客户端、电子设备以及服务器。The vehicle physics simulation method, system, client, electronic device and server of embodiments of the present invention are described below with reference to the accompanying drawings.

图1是根据本发明一个实施例的载具物理模拟系统的结构框图。FIG. 1 is a structural block diagram of a vehicle physics simulation system according to an embodiment of the present invention.

如图1所示,该载具物理模拟系统包括客户端100和服务器200。As shown in FIG. 1 , the vehicle physics simulation system includes a client 100 and a server 200 .

其中,客户端100可包括第一客户端110和第二客户端120。The client 100 may include a first client 110 and a second client 120 .

下面先简单介绍下实施例中名词的定义。The following is a brief introduction to the definitions of the nouns in the embodiments.

客户端,安装在电子设备中的应用。客户端可以是手机、平板电脑、笔记本电脑、虚拟现实设备、增强现实设备、混合现实设备等电子设备,此处不作具体限定。Client: An application installed in an electronic device. The client can be a mobile phone, tablet computer, laptop computer, virtual reality device, augmented reality device, mixed reality device, etc., which is not specifically limited here.

服务器,提供计算与网络通讯服务的设备。服务器可以是单台设备,也可以是多台设备的集群,此处不作具体限定。Server: A device that provides computing and network communication services. A server can be a single device or a cluster of multiple devices, which is not specifically limited here.

第一角色,使用应用的第一用户在该应用中对应的虚拟人物。The first role is a virtual character corresponding to the first user of the application in the application.

第二角色,除第一用户外任一用户在该应用中对应的虚拟人物。The second role is a virtual character corresponding to any user in the application except the first user.

第一用户通过第一客户端控制第一角色。The first user controls the first character through the first client.

第二用户通过第二客户端控制第二角色。The second user controls the second character through the second client.

载具,使用应用的用户在该应用中能够驾驶的交通工具,例如飞机、汽车、自行车、摩托车、游艇、轮船、平衡车等等,此处不作具体限定。Vehicles are vehicles that users of the application can drive in the application, such as airplanes, cars, bicycles, motorcycles, yachts, ships, balance bikes, etc., which are not specifically limited here.

物理模拟,是指对真实载具物理状态变化的模拟。假设载具为吉普车,则可以模拟吉普车轮胎的转动、行驶在不平路面上产生的颠簸等。如吉普车在不平整的地面行驶时,四组悬挂弹簧会发生不同程度的伸缩来支撑车体,在此过程中,车体会发生往复式晃动、倾斜等动态效果等。吉普车物理模拟简单描述如下:Physical simulation refers to the simulation of the physical state changes of real vehicles. If the vehicle is a jeep, the rotation of the jeep's tires and the bumps caused by driving on uneven roads can be simulated. For example, when the jeep is driving on uneven ground, the four sets of suspension springs will expand and contract to varying degrees to support the vehicle body. During this process, the vehicle body will experience dynamic effects such as reciprocating shaking and tilting. A brief description of the jeep's physical simulation is as follows:

1.模拟引擎转速并通过变速箱以一定的转速比使轮胎以一定速度转动;1. Simulate the engine speed and make the tires rotate at a certain speed through the gearbox at a certain speed ratio;

2.轮胎与地面接触点有摩擦力,该摩擦力决定轮胎是否会打滑及轮胎对车施加的推力;2. There is friction at the point where the tire contacts the ground, which determines whether the tire will slip and the thrust the tire exerts on the car;

3.轮胎对车施加的推力使车辆发生移动;3. The thrust exerted by the tires on the vehicle causes the vehicle to move;

4.车辆在不平整地面运动时四组悬挂弹簧会发生不同程度的伸缩来支撑车体,在此过程中车体会发生往复式晃动、倾斜。4. When the vehicle moves on uneven ground, the four sets of suspension springs will expand and contract to varying degrees to support the vehicle body. During this process, the vehicle body will shake and tilt back and forth.

视距范围,是指使用应用的用户在应用内虚拟人物的视野范围,是指虚拟人物在应用场景中的可视范围。例如第一角色的视野范围、第二角色的视野范围。虚拟人物在向前平视的时候,眼睛左右可观察的角度,上下可观察的角度都是有限的,因此虚拟人物的可视范围是近似一个锥形的区域,用应用地图中三维坐标的集合区域表示范围。The visual range refers to the visual range of the virtual character in the application by the user of the application, and refers to the visual range of the virtual character in the application scene. For example, the visual range of the first character and the visual range of the second character. When the virtual character looks forward, the angles that the eyes can observe left and right, and the angles that can be observed up and down are limited. Therefore, the visual range of the virtual character is approximately a cone-shaped area, and the range is represented by the collection area of 3D coordinates in the application map.

载具位置,载具在应用场景(地图)内的三维坐标位置。Vehicle position, the three-dimensional coordinate position of the vehicle in the application scene (map).

载具操控控件,交互界面中可供用户操控载具的控件,包括驾驶控件、乘坐控件、离开控件、加速控件、减速控件、方向控件等。用户通过触碰或滑动载具操控控件,对载具进行操控,如驾驶载具、乘坐载具、离开载具、加速、减速、前进、后退、左移、右移等等。Vehicle control controls are controls in the interactive interface that allow users to control the vehicle, including driving controls, riding controls, leaving controls, acceleration controls, deceleration controls, direction controls, etc. Users can control the vehicle by touching or sliding the vehicle control controls, such as driving the vehicle, riding the vehicle, leaving the vehicle, accelerating, decelerating, moving forward, backward, moving left, moving right, etc.

在本发明的一个实施例中,在第一客户端110检测到第一角色触发载具操控控件的情况下,第一客户端110可获取第一用户对载具的操作信息以及载具的位置信息,并将第一用户对载具的操作信息和载具的位置信息发送至服务器200。服务器200可接收第一客户端发送的第一用户对载具的操作信息和载具的位置信息,并将第一用户对载具的操作信息和载具的位置信息同步至第二客户端120。第二客户端120接收服务器发送的第一用户对载具的操作信息和载具的位置信息,并在第二客户端120中,根据第一用户对载具的操作信息和载具的位置信息对载具进行物理模拟。In one embodiment of the present invention, when the first client 110 detects that the first character triggers the vehicle control control, the first client 110 may obtain the first user's operation information on the vehicle and the vehicle's location information, and send the first user's operation information on the vehicle and the vehicle's location information to the server 200. The server 200 may receive the first user's operation information on the vehicle and the vehicle's location information sent by the first client, and synchronize the first user's operation information on the vehicle and the vehicle's location information to the second client 120. The second client 120 receives the first user's operation information on the vehicle and the vehicle's location information sent by the server, and in the second client 120, physically simulates the vehicle according to the first user's operation information on the vehicle and the vehicle's location information.

具体地,第二客户端120中判断载具是否在第二角色的视距范围内。如果载具不在第二角色的视距范围内,则不开启对载具的物理模拟,如果载具在第二角色的视距范围内,根据服务器发送的第一用户对载具的操作信息和载具的位置信息,对载具进行物理模拟,直至载具停稳或离开第二角色的视距范围。Specifically, the second client 120 determines whether the vehicle is within the sight range of the second character. If the vehicle is not within the sight range of the second character, physical simulation of the vehicle is not started. If the vehicle is within the sight range of the second character, physical simulation of the vehicle is performed according to the operation information of the first user on the vehicle and the position information of the vehicle sent by the server until the vehicle stops or leaves the sight range of the second character.

该实施例描述的是以第二角色的视角观察第一角色对载具进行操控的情况。第一角色指的是对载具进行操控的一类角色,第二角色为观察载具的一类角色。具体来说,服务器中保存与应用相关的数据,其中包括第一角色所操控载具的位置信息以及对载具的操控信息。服务器与多个客户端建立通讯,每个客户端获取使用该客户端的角色的位置信息以及角色对载具的操控信息,并将该位置信息发送至服务器。服务器收到信息后,再把上述信息同步至每个客户端,因此每个客户端在获取同步信息后都包含有所有客户端对应的角色的位置信息以及角色对载具的操控信息。第二客户端获取服务器发送的第一客户端对载具的操控信息以及其所驾驶的实时载具位置信息。其中,载具位置信息可以是服务器以频次100毫秒/次发送的。如果第二角色的视距范围中,观察到第一角色驾驶的载具,那么第二客户端可持续地获取第一角色驾驶的载具的位置信息(三维坐标)并检测其是否发生变化。如果该载具的位置信息持续发生变化,则可确定该载具处于移动状态。在第二客户端中,可利用第一用户对载具的操控信息继续对载具进行物理模拟。应当理解的是,第二客户端在未收到最新信息时,其使用的是最后一次收到的信息,以进行物理模拟。如果载具位置一旦没有持续发生变化,则可确定载具已停稳,第二客户端可停止对载具的物理模拟。以汽车载具为例,第一用户触发了驾驶或乘坐控件,其对应的第一角色进入汽车载具。第一客户端对汽车载具进行物理模拟,在第一角色进入汽车载具时,由于第一角色有重量,汽车载具四组悬挂弹簧承受第一角色重力的压力而收缩来支撑车体,同时车体会发生往复式晃动等物理变化过程的视觉效果。第一客户端记录第一用户触发驾驶或乘坐控件的操作信息并将信息发送至服务器,服务器将第一用户触发驾驶或乘坐控件的操作信息同步至第二客户端。在第二角色的视距范围内,第二客户端接收到服务器发送的第一用户对汽车载具触发驾驶或乘坐控件的操作信息和汽车载具的位置信息,并根据以上信息对第一用户驾驶的载具进行物理模拟,第二用户在第二角色的视距范围内就可以观察到第一用户所驾驶或乘坐汽车载具车体发生的往复式晃动等物理变化过程的视觉效果,第二客户端以第一角色在第一客户端的操作信息模拟对进行物理模拟,使得整个物理变化过程的视觉效果更加接近于真实。同理,第一用户触发驾驶控件后,进入车内,第一用户的交互界面上显示至少包括加速控件的载具操控控件,第一用户触发加速控件,第一设备将第一用户操作信息发送至设备,第二设备从服务器接收到,第一用户触发加速控件的操作信息对第一用户操控的载具进行物理模拟,进而第二角色观察到第一角色驾驶载具加速前进的物理变化过程的视觉效果;如第一用户触发乘坐控件,第一用户的交互界面上不会显示加速控件、减速控件。第一用户触发驾驶或乘坐控件后,第一角色触发离开控件,那么第二角色还可以观察到第一角色离开载具时,悬挂弹簧震动的效果。应当理解的是,上述第一用户触发控件产生的物理模拟效果,发生在某个第二角色的视距范围内,该第二角色才会观察到第二设备物理模拟出的物理变化过程的视觉效果。不在视距范围内,则第二角色不会观察到物理状态变化过程的视觉效果,就是说对应的第二客户端不会开启物理模拟。This embodiment describes the situation where the first character controls the vehicle from the perspective of the second character. The first character refers to a type of character that controls the vehicle, and the second character is a type of character that observes the vehicle. Specifically, the server stores data related to the application, including the location information of the vehicle controlled by the first character and the control information of the vehicle. The server establishes communication with multiple clients, and each client obtains the location information of the character using the client and the control information of the character on the vehicle, and sends the location information to the server. After receiving the information, the server synchronizes the above information to each client, so each client contains the location information of the characters corresponding to all clients and the control information of the character on the vehicle after obtaining the synchronization information. The second client obtains the control information of the vehicle sent by the first client and the real-time location information of the vehicle driven by it. Among them, the vehicle location information can be sent by the server at a frequency of 100 milliseconds/time. If the vehicle driven by the first character is observed in the line of sight of the second character, the second client can continuously obtain the location information (three-dimensional coordinates) of the vehicle driven by the first character and detect whether it changes. If the location information of the vehicle continues to change, it can be determined that the vehicle is in a moving state. In the second client, the vehicle can be physically simulated using the first user's control information of the vehicle. It should be understood that when the second client does not receive the latest information, it uses the last received information for physical simulation. If the position of the vehicle does not change continuously, it can be determined that the vehicle has stopped, and the second client can stop the physical simulation of the vehicle. Taking the car vehicle as an example, the first user triggers the driving or riding control, and the corresponding first character enters the car vehicle. The first client performs a physical simulation of the car vehicle. When the first character enters the car vehicle, due to the weight of the first character, the four sets of suspension springs of the car vehicle bear the pressure of the gravity of the first character and shrink to support the car body, and the car body will have a visual effect of physical change process such as reciprocating shaking. The first client records the 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. Within the sight range of the second character, the second client receives the operation information of the first user triggering the driving or riding control of the automobile vehicle and the position information of the automobile vehicle sent by the server, and performs physical simulation on the vehicle driven by the first user based on the above information. The second user can observe the visual effects of the physical change process such as the reciprocating shaking of the body of the automobile vehicle driven or ridden by the first user within the sight range of the second character. The second client simulates the physical effect of the operation information of the first character on the first client, so that the visual effect of the entire physical change process is closer to reality. Similarly, after the first user triggers the driving control, he enters the car, and the vehicle control control including at least the acceleration control is displayed on the interaction interface of the first user. The first user triggers the acceleration control, and the first device sends the operation information of the first user to the device. The second device receives the operation information of the first user triggering the acceleration control from the server, and performs physical simulation on the vehicle controlled by the first user, so that the second character observes the visual effect of the physical change process of the first character driving the vehicle to accelerate forward; if the first user triggers the riding control, the acceleration control and the deceleration control will not be displayed on the interaction interface of the first user. After the first user triggers the driving or riding control, the first character triggers the leaving control, then the second character can also observe the effect of the suspension spring vibration when the first character leaves the vehicle. It should be understood that the physical simulation effect generated by the above-mentioned first user triggering control occurs within the line of sight of a second character, and the second character will observe the visual effect of the physical change process simulated by the second device. If it is not within the line of sight, the second character will not observe the visual effect of the physical state change process, that is, the corresponding second client will not turn on the physical simulation.

为了更加真实地对虚拟角色进行模拟,会进行一些更真实地设定,例如晴天时,虚拟角色最远能够看到500米;雾天时,虚拟角色最远能够看到300米。也就是说,视距范围可随天气的变化而变化。In order to simulate the virtual character more realistically, some more realistic settings will be made. For example, on a sunny day, the virtual character can see up to 500 meters; on a foggy day, the virtual character can see up to 300 meters. In other words, the viewing range can change with the weather.

在本发明的另一个实施例中,第一客户端110在检测到第一角色触发载具操控控件的情况下,在第一客户端中,根据服务器发送的第一用户对载具的操作信息和载具的位置信息,对载具进行物理模拟。该实施例描述的是第一角色驾驶载具时,第一角色视角的情况。例如,载具进入第一角色的视野范围内,用户可选择触碰交互界面中的乘坐控件,从而控制第一角色进入到载具中。用户可以在触控交互界面上的加速控件、减速控件等(对加速控件和减速控件的滑动方向或者压力大小输入指令以及对方向控件的滑动方向或者滑动角度输入指令),对载具进行驾驶控制,同时对载具进行物理模拟,如载具加速、载具减速等等。In another embodiment of the present invention, when the first client 110 detects that the first character triggers the vehicle control control, the first client 110 performs a physical simulation of the vehicle according to the first user's operation information on the vehicle and the vehicle's position information sent by the server. This embodiment describes the situation of the first character's perspective when the first character drives the vehicle. For example, when the vehicle enters the field of view of the first character, the user can choose to touch the ride control in the interactive interface to control the first character to enter the vehicle. The user can use the acceleration control, deceleration control, etc. on the touch interactive interface (input instructions for the sliding direction or pressure size of the acceleration control and the deceleration control, and input instructions for the sliding direction or sliding angle of the direction control) to control the driving of the vehicle and perform physical simulation of the vehicle, such as vehicle acceleration, vehicle deceleration, etc.

采用此方案的目的是,尽可能模拟真实的驾驶体验,提高应用的可操作性以及用户的操作热情。The purpose of adopting this solution is to simulate the real driving experience as much as possible, improve the operability of the application and the user's enthusiasm for operation.

在本发明的又一个实施例中,第一客户端110还用于在第一客户端检测到第一角色触发载具离开控件的情况下,判断载具是否在第一角色的视距范围内。如果载具不在第一角色的视距范围内,则不开启对载具的物理模拟。如果载具在第一角色的视距范围内,则进一步判断载具是否停稳。如果载具停稳,则停止对载具进行物理模拟;如果载具未停稳,则对载具进行物理模拟,直至载具停稳或离开第一角色的视距范围。该实施例描述的是第一角色离开载具的情况。In another embodiment of the present invention, the first client 110 is also used to determine whether the vehicle is within the line 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 line of sight of the first character, the physical simulation of the vehicle is not enabled. If the vehicle is within the line of sight of the first character, it is further determined whether the vehicle has stopped. If the vehicle has stopped, the physical simulation of the vehicle is stopped; if the vehicle has not stopped, the physical simulation of the vehicle is performed until the vehicle stops or leaves the line of sight of the first character. This embodiment describes the situation where the first character leaves the vehicle.

具体地,第一客户端接收到第一用户在交互界面中点击离开控件的输入指令,第一角色立即离开所驾驶的载具。第一客户端持续获取载具位置并其是否发生变化。如果载具位置没有持续发生变化,则可确定载具已停稳,第一客户端停止对载具的物理模拟,并将停稳时的位置发送至服务器。如果载具位置持续发生变化,则可确定载具仍在移动。第一客户端继续对载具进行物理模拟。进一步地,第一客户端持续地获取载具位置并判断其是否在第一角色的视距范围内。如果所获取的载具位置不在第一角色的视距范围内,则可在第一客户端中,停止对载具的物理模拟,同时持续地获取该载具位置直到载具停稳,并将停稳后的位置发送至服务器。如果所获取的位置在第一角色的视距范围内,那么第一客户端则继续对载具进行物理模拟,直到载具已停稳或载具当前位置离开第一角色的视距范围。第一客户端持续地获得第一角色以及其驾驶的实时载具位置并将上述位置发送至服务器。Specifically, the first client receives an input instruction from the first user to click on the leave control in the interactive interface, and the first character immediately leaves the vehicle being driven. The first client continuously obtains the vehicle position and checks whether it changes. If the vehicle position does not change continuously, it can be determined that the vehicle has stopped, the first client stops the physical simulation of the vehicle, and sends the position when it stops to the server. If the vehicle position continues to change, it can be determined that the vehicle is still moving. The first client continues to perform physical simulation on the vehicle. Further, the first client continuously obtains the vehicle position and determines whether it is within the line of sight of the first character. If the obtained vehicle position is not within the line of sight of the first character, the physical simulation of the vehicle can be stopped in the first client, and the vehicle position is continuously obtained until the vehicle stops, and the position after stopping is sent to the server. If the obtained position is within the line of sight of the first character, the first client continues to perform physical simulation on the vehicle until the vehicle stops or the current position of the vehicle leaves the line of sight of the first character. The first client continuously obtains the real-time position of the first character and the vehicle it drives and sends the above position to the server.

上述实施例中对载具选择性关闭物理模拟而并非是持续地进行物理模拟,是对设备资源进行优化,提高资源优化装置性能,防止卡顿现象,提升模拟驾驶体验。In the above embodiment, the physical simulation of the vehicle is selectively turned off instead of continuously performing the physical simulation, so as to optimize the device resources, improve the performance of the resource optimization device, prevent jamming, and enhance the simulated driving experience.

在本发明的再一个实施例中,第一客户端110和/或第二客户端120,还可获取服务器200生成载具时载具所处的地形特征,根据载具所处的地形特征对服务器生成的载具进行物理模拟。该实施例描述的是服务器初始化场景信息,生成载具时的情况。In another embodiment of the present invention, the first client 110 and/or the second client 120 may also obtain the terrain features where the vehicle is located when the server 200 generates the vehicle, and perform physical simulation on the vehicle generated by the server according to the terrain features where the vehicle is located. This embodiment describes the situation when the server initializes scene information and generates a vehicle.

具体地,所有客户端可获得服务器发出的应用开始指令,客户端中处于等待阶段的交互界面切换为应用场景交互界面。进一步(同时),所有客户端获取服务器发出的载具生成指令。其中,载具生成指令包括需要在应用场景(地图)内生成的每一个载具类型以及在应用场景中所出现的载具位置。服务器中会预设各种不同类型载具,不同类型载具应用场景不同。举例来说,一张应用地图通常由陆地,水域和空中三种区域构成。其中汽车、自行车、平衡车适用于陆地交通,游艇、轮船适用于水上交通,飞机适用于空中交通,陆地交通工具停放在陆地上供用户进行陆地交通,水上交通工具停放在水域供用户进行水上交通,飞机停放在陆地上,从地面起飞后供用户进行空中交通。客户端获得服务器发出的应用开始指令,进一步(同时),客户端获得服务器随机选出需要在地图中各区域生成的载具类型以及在地图中各区域范围内随机生成载具所出现的三维坐标位置。在客户端获取到服务器生成的载具生成指令后,可随机地在地图内对应的位置处进行3D建模,生成相应的载具。进一步,各客户端并非直接于地面和水面三维坐标位置处生成载具,而是在地面和水面上方一定高度的三维坐标位置生成载具。载具初始生成位置高出地面或水面一定高度,客户端生成的载具受应用中虚拟重力影响会落下并在落下后与应用场景内如地面、建筑、树木、水域等固定场景接触从而产生物理状态变化,因此客户端可以进行物理模拟来模拟载具的物理状态变化,直到载具的位置不再变化,可视为载具已经停稳,客户端停止物理模拟。设置客户端生成载具位置以及对载具进行物理模拟,直至载具停稳的过程,是为了避免现有技术中将载具模型贴合在固定场景模型中,由于非平面固定场景可能导致的固定场景与载具模型重合,或违反物理现象,如陆地交通工具停在山上陡坡处的视觉效果。通过客户端对载具的物理模拟,载具在各区域内从物理状态发生变化到最终停稳,更贴近与现实环境中的物理现象,提高应用的真实感。Specifically, all clients can obtain the application start instruction issued 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 clients obtain the vehicle generation instruction issued by the server. Among them, the vehicle generation instruction includes each vehicle type that needs to be generated in the application scene (map) and the vehicle position that appears in the application scene. Various types of vehicles are preset in the server, and different types of vehicles have different application scenarios. For example, an application map is usually composed of three areas: land, water and air. Among them, cars, bicycles, and balance cars are suitable for land transportation, yachts and ships are suitable for water transportation, and airplanes are suitable for air transportation. Land vehicles are parked on land for users to carry out land transportation, water vehicles are parked in waters for users to carry out water transportation, and airplanes are parked on land and take off from the ground for users to carry out air transportation. The client obtains the application start instruction issued by the server, and further (simultaneously), the client obtains the vehicle type that needs to be generated in each area of the map randomly selected by the server and the three-dimensional coordinate position where the vehicle appears randomly generated within each area of the map. After the client obtains the vehicle generation instruction generated by the server, it can randomly perform 3D modeling at the corresponding position in the map to generate the corresponding vehicle. Furthermore, each client does not directly generate the vehicle at the three-dimensional coordinate position of the ground and the water surface, but generates the vehicle at the three-dimensional coordinate position at a certain height above the ground and the water surface. The initial generation position of the vehicle is higher than the ground or the water surface by a certain height. The vehicle generated by the client will fall under the influence of the virtual gravity in the application and will contact with the fixed scenes such as the ground, buildings, trees, waters, etc. in the application scene after falling, thereby causing a change in physical state. Therefore, the client can perform physical simulation to simulate the physical state change of the vehicle until the position of the vehicle no longer changes, which can be regarded as the vehicle has stopped steadily, and the client stops the physical simulation. The process of setting the client to generate the vehicle position and perform physical simulation on the vehicle until the vehicle stops steadily is to avoid the prior art of fitting the vehicle model into the fixed scene model, the fixed scene and the vehicle model may overlap due to the non-planar fixed scene, or violate physical phenomena, such as the visual effect of a land vehicle parked on a steep slope on a mountain. Through the client's physical simulation of the vehicle, the vehicle changes from physical state to final stop in each area, which is closer to the physical phenomena in the real environment and improves the realism of the application.

此外,在本发明的又一个实施例中,第二客户端120还可以对载具的位置信息进行修正。该实施例描述的是第二客户端120与服务器200之间网络通信发生延迟或丢包的情况。In addition, in another embodiment of the present invention, the second client 120 may also correct the location information of the vehicle. This embodiment describes a situation where a delay or packet loss occurs in the network communication between the second client 120 and the server 200.

具体地,第二客户端中的第一用户驾驶载具位置会与服务器中保存第一客户端发送的载具位置发生偏差,此时服务器会将保存的第一客户端所发送的载具位置发送给第二客户端。第二客户端可接收第一角色驾驶载具的位置信息,会修正第二角色视距范围中的第一角色所驾驶载具的位置。Specifically, the position of the vehicle driven by the first user in the second client will deviate from the vehicle position sent by the first client in the server. At this time, the server will send the vehicle position sent by the first client to the second client. The second client can receive the position information of the vehicle driven by the first character and correct the position of the vehicle driven by the first character in the second character's sight range.

在上述情况下,采用强行修正载具位置,第二角色会观察到第一角色所驾驶的载具发生瞬移或者闪烁现象,影响第二用户的体验。In the above situation, by forcibly correcting the position of the vehicle, the second character will observe that the vehicle driven by the first character is teleporting or flickering, which affects the experience of the second user.

为了避免或减轻在修正载具位置过程中发生的瞬移或者闪烁现象,在另一个实施例中,第二客户端可对修正后的载具的位置信息进行防闪烁处理。步骤如下:In order to avoid or reduce the phenomenon of instantaneous movement or flickering that occurs during the process of correcting the vehicle position, in another embodiment, the second client may perform anti-flickering processing on the corrected vehicle position information. The steps are as follows:

步骤1.假设载具M修正前的位置为A[xa,ya,za],修正后的位置为B[xb,yb,zb];Step 1. Assume that the position of vehicle M before correction is A[xa,ya,za], and the position after correction is B[xb,yb,zb];

步骤2.第二客户端接收服务器发送的载具坐标位置信息,同时隐藏载具,并在位置A设置一个只是与载具M外观模型相同的载具N。第二客户端仅控制载具N跟随载具M进行移动并保持两者坐标位置相对静止,不对载具N进行物理模拟。在移动过程中,载具M与载具N坐标位置的相对偏移向量为C[xc,yc,zc],其中C=B-A。此时,第二用户只能看到与载具M外观模型相同的载具N,故在视觉上未出现载具瞬移的情况;Step 2. The second client receives the vehicle coordinate position information sent by the server, hides the vehicle at the same time, and sets a vehicle N with the same appearance model as vehicle M at position A. The second client only controls vehicle N to move with vehicle M and keeps the coordinate positions of the two relatively still, and does not perform physical simulation on vehicle N. During the movement, the relative offset vector of the coordinate positions of vehicle M and vehicle N is C[xc, yc, zc], where C = B-A. At this time, the second user can only see vehicle N with the same appearance model as vehicle M, so there is no visual teleportation of the vehicle;

步骤3.载具M继续移动,载具N因与载具M相对静止而一起移动;Step 3. Vehicle M continues to move, and vehicle N moves together with vehicle M because it is relatively stationary;

步骤4.在N秒内,将相对偏移向量C线性减少至0,即在N秒内把假的载具N平移至真实的载具M的位置;Step 4. Within N seconds, the relative offset vector C is linearly reduced to 0, that is, the fake vehicle N is translated to the position of the real vehicle M within N seconds;

步骤5.当C变为0时,隐藏假的载具N并显示真实的载具M。Step 5. When C becomes 0, hide the fake vehicle N and show the real vehicle M.

采用此方案的目的是,载具M是真实载具,第二客户端实时对载具M进行物理模拟,直接平移载具会出现与客户端中场景发生各种碰撞,故使用一个没有碰撞的载具N,由于载具N无需进行物理模拟,直接平移不会出现与客户端中场景发生各种碰撞,而且通过平移载具N可以弱化载具M瞬移或闪烁现象。The purpose of adopting this solution is that vehicle M is a real vehicle, and the second client performs physical simulation on vehicle M in real time. Direct translation of the vehicle will cause various collisions with the scene in the client, so a collision-free vehicle N is used. Since vehicle N does not need to be physically simulated, direct translation will not cause various collisions with the scene in the client, and by translating vehicle N, the teleportation or flickering phenomenon of vehicle M can be weakened.

本发明实施例的载具物理模拟系统,在第一客户端检测到第一角色触发载具操控控件的情况下,第一客户端获取第一用户对载具的操作信息以及载具的位置信息,并将第一用户对载具的操作信息和载具的位置信息发送至服务器,服务器接收第一客户端发送的第一用户对载具的操作信息和载具的位置信息,并将第一用户对载具的操作信息和载具的位置信息同步至第二客户端,第二客户端接收服务器发送的第一用户对载具的操作信息和载具的位置信息,并在第二客户端中,根据第一用户对载具的操作信息和载具的位置信息对载具进行物理模拟,从而对设备资源进行优化,提高资源优化装置性能,防止卡顿现象,提升模拟驾驶体验。In the vehicle physics simulation system of an embodiment of the present invention, when the first client detects that the first character triggers the vehicle control control, the first client obtains the first user's operation information on the vehicle and the vehicle's location information, and sends the first user's operation information on the vehicle and the vehicle's location information to the server. The server receives the first user's operation information on the vehicle and the vehicle's location information sent by the first client, and synchronizes the first user's operation information on the vehicle and the vehicle's location information to the second client. The second client receives the first user's operation information on the vehicle and the vehicle's location information sent by the server, and in the second client, physically simulates the vehicle according to the first user's operation information on the vehicle and the vehicle's location information, thereby optimizing device resources, improving the performance of the resource optimization device, preventing jamming, and enhancing the simulated driving experience.

为了实现上述实施例,本发明还提出了一种载具物理模拟方法。In order to implement the above embodiment, the present invention also proposes a vehicle physics simulation method.

图2是根据本发明一个实施例的载具物理模拟方法的流程图。FIG. 2 is a flow chart of a vehicle physics simulation method according to an embodiment of the present invention.

如图2所示,该载具物理模拟方法应用于客户端,包括以下步骤:As shown in FIG2 , the vehicle physics simulation method is applied to the client, and includes the following steps:

步骤201,在第一客户端检测到第一角色触发载具操控控件的情况下,第一客户端获取第一用户对载具的操作信息以及载具的位置信息,并将第一用户对载具的操作信息和载具的位置信息发送至服务器,以使服务器接收第一客户端发送的第一用户对载具的操作信息和载具的位置信息,并将第一用户对载具的操作信息和载具的位置信息同步至第二客户端。Step 201, when the first client detects that the first character triggers the vehicle control control, the first client obtains the first user's operation information on the vehicle and the vehicle's location information, and sends the first user's operation information on the vehicle and the vehicle's location information to the server, so that the server receives the first user's operation information on the vehicle and the vehicle's location information sent by the first client, and synchronizes the first user's operation information on the vehicle and the vehicle's location information to the second client.

其中,客户端包括第一客户端和第二客户端,第一用户通过第一客户端控制第一角色,第二用户通过第二客户端控制第二角色。The client includes a first client and a second client, a first user controls a first character through the first client, and a second user controls a second character through the second client.

步骤202,第二客户端接收服务器发送的第一用户对载具的操作信息和载具的位置信息,并在第二客户端中,根据第一用户对载具的操作信息和载具的位置信息对载具进行物理模拟。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 of 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.

具体地,第二客户端判断载具是否在第二角色的视距范围内,如果载具不在第二角色的视距范围内,则不开启对载具的物理模拟,如果载具在第二角色的视距范围内,根据服务器发送的第一用户对载具的操作信息和载具的位置信息,对载具进行物理模拟,直至载具停稳或离开第二角色的视距范围。Specifically, the second client determines whether the vehicle is within the line of sight of the second character. If the vehicle is not within the line of sight of the second character, the physical simulation of the vehicle is not started. If the vehicle is within the line of sight of the second character, the vehicle is physically simulated according to the operation information of the first user on the vehicle and the position information of the vehicle sent by the server until the vehicle stops or leaves the line of sight of the second character.

本实施例描述的是以第二角色的视角观察第一角色对载具进行操控的情况。第一角色指的是对载具进行操控的一类角色,第二角色为观察载具的一类角色。具体来说,服务器中保存与应用相关的数据,其中包括第一角色所操控载具的位置信息以及对载具的操控信息。服务器与多个客户端建立通讯,每个客户端获取使用该客户端的角色的位置信息以及角色对载具的操控信息,并将该位置信息发送至服务器。服务器收到信息后,再把上述信息同步至每个客户端,因此每个客户端在获取同步信息后都包含有所有客户端对应的角色的位置信息以及角色对载具的操控信息。第二客户端获取服务器发送的第一客户端对载具的操控信息以及其所驾驶的实时载具位置信息。其中,载具位置信息可以是服务器以频次100毫秒/次发送的。如果第二角色的视距范围中,观察到第一角色驾驶的载具,那么第二客户端可持续地获取第一角色驾驶的载具的位置信息(三维坐标)并检测其是否发生变化。如果该载具的位置信息持续发生变化,则可确定该载具处于移动状态。在第二客户端中,可利用第一用户对载具的操控信息继续对载具进行物理模拟。应当理解的是,第二客户端在未收到最新信息时,其使用的是最后一次收到的信息,以进行物理模拟。如果载具位置一旦没有持续发生变化,则可确定载具已停稳,第二客户端可停止对载具的物理模拟。以汽车载具为例,第一用户触发了驾驶或乘坐控件,其对应的第一角色进入汽车载具。第一客户端对汽车载具进行物理模拟,在第一角色进入汽车载具时,由于第一角色有重量,汽车载具四组悬挂弹簧承受第一角色重力的压力而收缩来支撑车体,同时车体会发生往复式晃动等物理变化过程的视觉效果。第一客户端记录第一用户触发驾驶或乘坐控件的操作信息并将信息发送至服务器,服务器将第一用户触发驾驶或乘坐控件的操作信息同步至第二客户端。在第二角色的视距范围内,第二客户端接收到服务器发送的第一用户对汽车载具触发驾驶或乘坐控件的操作信息和汽车载具的位置信息,并根据以上信息对第一用户驾驶的载具进行物理模拟,第二用户在第二角色的视距范围内就可以观察到第一用户所驾驶或乘坐汽车载具车体发生的往复式晃动等物理变化过程的视觉效果,第二客户端以第一角色在第一客户端的操作信息模拟对进行物理模拟,使得整个物理变化过程的视觉效果更加接近于真实。同理,第一用户触发驾驶控件后,进入车内,第一用户的交互界面上显示至少包括加速控件的载具操控控件,第一用户触发加速控件,第一设备将第一用户操作信息发送至设备,第二设备从服务器接收到,第一用户触发加速控件的操作信息对第一用户操控的载具进行物理模拟,进而第二角色观察到第一角色驾驶载具加速前进的物理变化过程的视觉效果;如第一用户触发乘坐控件,第一用户的交互界面上不会显示加速控件、减速控件。第一用户触发驾驶或乘坐控件后,第一角色触发离开控件,那么第二角色还可以观察到第一角色离开载具时,悬挂弹簧震动的效果。应当理解的是,上述第一用户触发控件产生的物理模拟效果,发生在某个第二角色的视距范围内,该第二角色才会观察到第二设备物理模拟出的物理变化过程的视觉效果。不在视距范围内,则第二角色不会观察到物理状态变化过程的视觉效果,就是说对应的第二客户端不会开启物理模拟。This embodiment describes the situation where the first character controls the vehicle from the perspective of the second character. The first character refers to a type of character that controls the vehicle, and the second character is a type of character that observes the vehicle. Specifically, the server stores data related to the application, including the location information of the vehicle controlled by the first character and the control information of the vehicle. The server establishes communication with multiple clients, and each client obtains the location information of the character using the client and the control information of the character on the vehicle, and sends the location information to the server. After receiving the information, the server synchronizes the above information to each client, so each client contains the location information of the characters corresponding to all clients and the control information of the character on the vehicle after obtaining the synchronization information. The second client obtains the control information of the vehicle sent by the first client and the real-time location information of the vehicle driven by it. Among them, the vehicle location information can be sent by the server at a frequency of 100 milliseconds/time. If the vehicle driven by the first character is observed in the line of sight of the second character, the second client can continuously obtain the location information (three-dimensional coordinates) of the vehicle driven by the first character and detect whether it changes. If the location information of the vehicle continues to change, it can be determined that the vehicle is in a moving state. In the second client, the vehicle can be physically simulated using the first user's control information of the vehicle. It should be understood that when the second client does not receive the latest information, it uses the last received information for physical simulation. If the position of the vehicle does not change continuously, it can be determined that the vehicle has stopped, and the second client can stop the physical simulation of the vehicle. Taking the car vehicle as an example, the first user triggers the driving or riding control, and the corresponding first character enters the car vehicle. The first client performs a physical simulation of the car vehicle. When the first character enters the car vehicle, due to the weight of the first character, the four sets of suspension springs of the car vehicle bear the pressure of the gravity of the first character and shrink to support the car body, and the car body will have a visual effect of physical change process such as reciprocating shaking. The first client records the 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. Within the sight range of the second character, the second client receives the operation information of the first user triggering the driving or riding control of the automobile vehicle and the position information of the automobile vehicle sent by the server, and performs physical simulation on the vehicle driven by the first user based on the above information. The second user can observe the visual effects of the physical change process such as the reciprocating shaking of the body of the automobile vehicle driven or ridden by the first user within the sight range of the second character. The second client simulates the physical effect of the operation information of the first character on the first client, so that the visual effect of the entire physical change process is closer to reality. Similarly, after the first user triggers the driving control, he enters the car, and the vehicle control control including at least the acceleration control is displayed on the interaction interface of the first user. The first user triggers the acceleration control, and the first device sends the operation information of the first user to the device. The second device receives the operation information of the first user triggering the acceleration control from the server, and performs physical simulation on the vehicle controlled by the first user, so that the second character observes the visual effect of the physical change process of the first character driving the vehicle to accelerate forward; if the first user triggers the riding control, the acceleration control and the deceleration control will not be displayed on the interaction interface of the first user. After the first user triggers the driving or riding control, the first character triggers the leaving control, then the second character can also observe the effect of the suspension spring vibration when the first character leaves the vehicle. It should be understood that the physical simulation effect generated by the above-mentioned first user triggering control occurs within the line of sight of a second character, and the second character will observe the visual effect of the physical change process simulated by the second device. If it is not within the line of sight, the second character will not observe the visual effect of the physical state change process, that is, the corresponding second client will not turn on the physical simulation.

为了更加真实地对虚拟角色进行模拟,会进行一些更真实地设定,例如晴天时,虚拟角色最远能够看到500米;雾天时,虚拟角色最远能够看到300米。也就是说,视距范围可随天气的变化而变化。In order to simulate the virtual character more realistically, some more realistic settings will be made. For example, on a sunny day, the virtual character can see up to 500 meters; on a foggy day, the virtual character can see up to 300 meters. In other words, the viewing range can change with the weather.

其中,由于网络延迟等原因,第二客户端在接收第一用户所驾驶载具的位置信息与第一客户端内第一用户所驾驶载具的位置信息可能会有偏差。Among them, due to network delays and other reasons, there may be a deviation between the location information of the vehicle driven by the first user received by the second client and the location information of the vehicle driven by the first user in the first client.

服务器端在持续更新第一客户端所发送的第一用户所驾驶载具的位置信息,第二客户端接收上述信息后,对当前第一用户所驾驶载具的位置信息进行修正。具体地,服务器会将保存的第一客户端所发送的第一用户所驾驶载具位置发送给第二客户端。第二客户端可接收第一角色驾驶载具的位置信息,修正第二角色视距范围中的第一角色所驾驶载具的位置。The server side continuously updates the position information of the vehicle driven by the first user sent by the first client. After the second client receives the above information, it corrects the position information of the vehicle driven by the first user. Specifically, the server sends the saved position of the vehicle driven by the first user sent by the first client to the second client. The second client can receive the position information of the vehicle driven by the first character and correct the position of the vehicle driven by the first character within the line of sight of the second character.

而在第一用户所驾驶载具的位置信息进行修正后,会产生闪烁等现象,因此第二客户端还需要对修正后的载具的位置信息进行防闪烁处理。为了避免或减轻在修正载具位置过程中发生的瞬移或者闪烁现象,在另一个实施例中,第二客户端可对修正后的载具的位置信息进行防闪烁处理。步骤如下:After the position information of the vehicle driven by the first user is corrected, flickering and other phenomena may occur, so the second client also needs to perform anti-flicker processing on the corrected vehicle position information. In order to avoid or reduce the teleportation or flickering phenomenon that occurs during the process of correcting the vehicle position, in another embodiment, the second client may perform anti-flicker processing on the corrected vehicle position information. The steps are as follows:

步骤1.假设载具M修正前的位置为A[xa,ya,za],修正后的位置为B[xb,yb,zb];Step 1. Assume that the position of vehicle M before correction is A[xa,ya,za], and the position after correction is B[xb,yb,zb];

步骤2.第二客户端接收服务器发送的载具坐标位置信息,同时隐藏载具,并在位置A设置一个只是与载具M外观模型相同的载具N。第二客户端仅控制载具N跟随载具M进行移动并保持两者坐标位置相对静止,不对载具N进行物理模拟。在移动过程中,载具M与载具N坐标位置的相对偏移向量为C[xc,yc,zc],其中C=B-A。此时,第二用户只能看到与载具M外观模型相同的载具N,故在视觉上未出现载具瞬移的情况;Step 2. The second client receives the vehicle coordinate position information sent by the server, hides the vehicle at the same time, and sets a vehicle N with the same appearance model as vehicle M at position A. The second client only controls vehicle N to move with vehicle M and keeps the coordinate positions of the two relatively still, and does not perform physical simulation on vehicle N. During the movement, the relative offset vector of the coordinate positions of vehicle M and vehicle N is C[xc, yc, zc], where C = B-A. At this time, the second user can only see vehicle N with the same appearance model as vehicle M, so there is no visual teleportation of the vehicle;

步骤3.载具M继续移动,载具N因与载具M相对静止而一起移动;Step 3. Vehicle M continues to move, and vehicle N moves together with vehicle M because it is relatively stationary;

步骤4.在N秒内,将相对偏移向量C线性减少至0,即在N秒内把假的载具N平移至真实的载具M的位置;Step 4. Within N seconds, the relative offset vector C is linearly reduced to 0, that is, the fake vehicle N is translated to the position of the real vehicle M within N seconds;

步骤5.当C变为0时,隐藏假的载具N并显示真实的载具M。Step 5. When C becomes 0, hide the fake vehicle N and show the real vehicle M.

采用此方案的目的是,载具M是真实载具,第二客户端实时对载具M进行物理模拟,直接平移载具会出现与客户端中场景发生各种碰撞,故使用一个没有碰撞的载具N,由于载具N无需进行物理模拟,直接平移不会出现与客户端中场景发生各种碰撞,而且通过平移载具N可以弱化载具M瞬移或闪烁现象。The purpose of adopting this solution is that vehicle M is a real vehicle, and the second client performs physical simulation on vehicle M in real time. Direct translation of the vehicle will cause various collisions with the scene in the client, so a collision-free vehicle N is used. Since vehicle N does not need to be physically simulated, direct translation will not cause various collisions with the scene in the client, and by translating vehicle N, the teleportation or flickering phenomenon of vehicle M can be weakened.

在本发明的另一个实施例中,如图3所示,方法还包括:In another embodiment of the present invention, as shown in FIG3 , the method further includes:

步骤203,在第一客户端检测到第一角色触发载具操控控件的情况下,在第一客户端中,获取对第一角色载具的操作信息,对载具进行物理模拟。Step 203, when the first client detects that the first character triggers the vehicle control control, in the first client, the operation information of the first character's vehicle is obtained, and the vehicle is physically simulated.

本实施例描述的是第一角色驾驶载具时,第一角色视角的情况。例如,载具进入第一角色的视野范围内,用户可选择触碰交互界面中的乘坐控件,从而控制第一角色进入到载具中。用户可以在触控交互界面上的加速控件、减速控件等(对加速控件和减速控件的滑动方向或者压力大小输入指令以及对方向控件的滑动方向或者滑动角度输入指令),对载具进行驾驶控制,同时对载具进行物理模拟,如载具加速、载具减速等等。This embodiment describes the perspective of the first character when the first character is driving a vehicle. For example, when the vehicle enters the field of view of the first character, the user can choose to touch the ride control in the interactive interface to control the first character to enter the vehicle. The user can use the acceleration control, deceleration control, etc. on the touch interactive interface (input instructions for the sliding direction or pressure size of the acceleration control and the deceleration control, and input instructions for the sliding direction or sliding angle of the direction control) to control the driving of the vehicle, and perform physical simulation of the vehicle, such as vehicle acceleration, vehicle deceleration, etc.

采用此方案的目的是,尽可能模拟真实的驾驶体验,提高应用的可操作性以及用户的操作热情。The purpose of adopting this solution is to simulate the real driving experience as much as possible, improve the operability of the application and the user's enthusiasm for operation.

在本发明的又一个实施例中,如图4所示,方法还包括:In yet another embodiment of the present invention, as shown in FIG4 , the method further includes:

步骤204,在第一客户端检测到第一角色触发载具离开控件的情况下,第一客户端判断载具是否在第一角色的视距范围内。Step 204 , when the first client detects that the first character triggers the vehicle to leave the control, the first client determines whether the vehicle is within the sight range of the first character.

步骤205,如果载具不在第一角色的视距范围内,则不开启对载具的物理模拟。Step 205: If the vehicle is not within the sight range of the first character, physical simulation of the vehicle is not enabled.

步骤206,如果载具在第一角色的视距范围内,则进一步判断载具是否停稳。Step 206: If the vehicle is within the sight range of the first character, further determine whether the vehicle is stopped.

步骤207,如果载具停稳,则停止对载具进行物理模拟。Step 207: If the vehicle stops, then stop performing physical simulation on the vehicle.

步骤208,如果载具未停稳,则对载具进行物理模拟,直至载具停稳或离开第一角色的视距范围。Step 208: If the vehicle has not stopped, physical simulation is performed on the vehicle until the vehicle stops or leaves the sight range of the first character.

具体地,第一客户端接收到第一用户在交互界面中点击离开控件的输入指令,第一角色立即离开所驾驶的载具。第一客户端持续获取载具位置并其是否发生变化。如果载具位置没有持续发生变化,则可确定载具已停稳,第一客户端停止对载具的物理模拟,并将停稳时的位置发送至服务器。如果载具位置持续发生变化,则可确定载具仍在移动。第一客户端继续对载具进行物理模拟。进一步地,第一客户端持续地获取载具位置并判断其是否在第一角色的视距范围内。如果所获取的载具位置不在第一角色的视距范围内,则可在第一客户端中,停止对载具的物理模拟,同时持续地获取该载具位置直到载具停稳,并将停稳后的位置发送至服务器。如果所获取的位置在第一角色的视距范围内,那么第一客户端则继续对载具进行物理模拟,直到载具已停稳或载具当前位置离开第一角色的视距范围。第一客户端持续地获得第一角色以及其驾驶的实时载具位置并将上述位置发送至服务器。Specifically, the first client receives an input instruction from the first user to click on the leave control in the interactive interface, and the first character immediately leaves the vehicle being driven. The first client continuously obtains the vehicle position and checks whether it changes. If the vehicle position does not change continuously, it can be determined that the vehicle has stopped, the first client stops the physical simulation of the vehicle, and sends the position when it stops to the server. If the vehicle position continues to change, it can be determined that the vehicle is still moving. The first client continues to perform physical simulation on the vehicle. Further, the first client continuously obtains the vehicle position and determines whether it is within the line of sight of the first character. If the obtained vehicle position is not within the line of sight of the first character, the physical simulation of the vehicle can be stopped in the first client, and the vehicle position is continuously obtained until the vehicle stops, and the position after stopping is sent to the server. If the obtained position is within the line of sight of the first character, the first client continues to perform physical simulation on the vehicle until the vehicle stops or the current position of the vehicle leaves the line of sight of the first character. The first client continuously obtains the real-time position of the first character and the vehicle it drives and sends the above position to the server.

上述实施例中对载具选择性关闭物理模拟而并非是持续地进行物理模拟,是对设备资源进行优化,提高资源优化装置性能,防止卡顿现象,提升模拟驾驶体验。In the above embodiment, the physical simulation of the vehicle is selectively turned off instead of continuously performing the physical simulation, so as to optimize the device resources, improve the performance of the resource optimization device, prevent jamming, and enhance the simulated driving experience.

在本发明的再一个实施例中,如图5所示,方法还包括:In yet another embodiment of the present invention, as shown in FIG5 , the method further includes:

步骤209,第一客户端和/或第二客户端获取服务器生成载具时载具所处的地形特征,根据载具所处的地形特征对服务器生成的载具进行物理模拟。Step 209: The first client and/or the second client obtains the terrain features where the vehicle is located when the server generates the vehicle, and performs physical simulation on the vehicle generated by the server according to the terrain features where the vehicle is located.

本实施例描述的是服务器初始化场景信息,生成载具时的情况。This embodiment describes the situation when the server initializes scene information and generates a vehicle.

具体地,所有客户端可获得服务器发出的应用开始指令,客户端中处于等待阶段的交互界面切换为应用场景交互界面。进一步(同时),所有客户端获取服务器发出的载具生成指令。其中,载具生成指令包括需要在应用场景(地图)内生成的每一个载具类型以及在应用场景中所出现的载具位置。服务器中会预设各种不同类型载具,不同类型载具应用场景不同。举例来说,一张应用地图通常由陆地,水域和空中三种区域构成。其中汽车、自行车、平衡车适用于陆地交通,游艇、轮船适用于水上交通,飞机适用于空中交通,陆地交通工具停放在陆地上供用户进行陆地交通,水上交通工具停放在水域供用户进行水上交通,飞机停放在陆地上,从地面起飞后供用户进行空中交通。客户端获得服务器发出的应用开始指令,进一步(同时),客户端获得服务器随机选出需要在地图中各区域生成的载具类型以及在地图中各区域范围内随机生成载具所出现的三维坐标位置。在客户端获取到服务器生成的载具生成指令后,可随机地在地图内对应的位置处进行3D建模,生成相应的载具。进一步,各客户端并非直接于地面和水面三维坐标位置处生成载具,而是在地面和水面上方一定高度的三维坐标位置生成载具。载具初始生成位置高出地面或水面一定高度,客户端生成的载具受应用中虚拟重力影响会落下并在落下后与应用场景内如地面、建筑、树木、水域等固定场景接触从而产生物理状态变化,因此客户端可以进行物理模拟来模拟载具的物理状态变化,直到载具的位置不再变化,可视为载具已经停稳,客户端停止物理模拟。设置客户端生成载具位置以及对载具进行物理模拟,直至载具停稳的过程,是为了避免现有技术中将载具模型贴合在固定场景模型中,由于非平面固定场景可能导致的固定场景与载具模型重合,或违反物理现象,如陆地交通工具停在山上陡坡处的视觉效果。通过客户端对载具的物理模拟,载具在各区域内从物理状态发生变化到最终停稳,更贴近与现实环境中的物理现象,提高应用的真实感。Specifically, all clients can obtain the application start instruction issued 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 clients obtain the vehicle generation instruction issued by the server. Among them, the vehicle generation instruction includes each vehicle type that needs to be generated in the application scene (map) and the vehicle position that appears in the application scene. Various types of vehicles are preset in the server, and different types of vehicles have different application scenarios. For example, an application map is usually composed of three areas: land, water and air. Among them, cars, bicycles, and balance cars are suitable for land transportation, yachts and ships are suitable for water transportation, and airplanes are suitable for air transportation. Land vehicles are parked on land for users to carry out land transportation, water vehicles are parked in waters for users to carry out water transportation, and airplanes are parked on land and take off from the ground for users to carry out air transportation. The client obtains the application start instruction issued by the server, and further (simultaneously), the client obtains the vehicle type that needs to be generated in each area of the map randomly selected by the server and the three-dimensional coordinate position where the vehicle appears within each area of the map. After the client obtains the vehicle generation instruction generated by the server, it can randomly perform 3D modeling at the corresponding position in the map to generate the corresponding vehicle. Furthermore, each client does not directly generate the vehicle at the three-dimensional coordinate position of the ground and the water surface, but generates the vehicle at the three-dimensional coordinate position at a certain height above the ground and the water surface. The initial generation position of the vehicle is higher than the ground or the water surface by a certain height. The vehicle generated by the client will fall under the influence of the virtual gravity in the application and will contact with the fixed scenes such as the ground, buildings, trees, waters, etc. in the application scene after falling, thereby causing a change in physical state. Therefore, the client can perform physical simulation to simulate the physical state change of the vehicle until the position of the vehicle no longer changes, which can be regarded as the vehicle has stopped steadily, and the client stops the physical simulation. The process of setting the client to generate the vehicle position and perform physical simulation on the vehicle until the vehicle stops steadily is to avoid the prior art of fitting the vehicle model into the fixed scene model, the fixed scene and the vehicle model may overlap due to the non-planar fixed scene, or violate physical phenomena, such as the visual effect of a land vehicle parked on a steep slope on a mountain. Through the client's physical simulation of the vehicle, the vehicle changes from physical state to final stop in each area, which is closer to the physical phenomena in the real environment and improves the realism of the application.

本发明实施例的载具物理模拟方法,在第一客户端检测到第一角色触发载具操控控件的情况下,第一客户端获取第一用户对载具的操作信息以及载具的位置信息,并将第一用户对载具的操作信息和载具的位置信息发送至服务器,服务器接收第一客户端发送的第一用户对载具的操作信息和载具的位置信息,并将第一用户对载具的操作信息和载具的位置信息同步至第二客户端,第二客户端接收服务器发送的第一用户对载具的操作信息和载具的位置信息,并在第二客户端中,根据第一用户对载具的操作信息和载具的位置信息对载具进行物理模拟,从而对设备资源进行优化,提高资源优化装置性能,防止卡顿现象,提升模拟驾驶体验。In the vehicle physics simulation method of an embodiment of the present invention, when the first client detects that the first character triggers the vehicle control control, the first client obtains the first user's operation information on the vehicle and the vehicle's location information, and sends the first user's operation information on the vehicle and the vehicle's location information to the server. The server receives the first user's operation information on the vehicle and the vehicle's location information sent by the first client, and synchronizes the first user's operation information on the vehicle and the vehicle's location information to the second client. The second client receives the first user's operation information on the vehicle and the vehicle's location information sent by the server, and in the second client, physically simulates the vehicle according to the first user's operation information on the vehicle and the vehicle's location information, thereby optimizing device resources, improving the performance of the resource optimization device, preventing jamming, and enhancing the simulated driving experience.

为了实现上述实施例,本发明还提出了一种客户端。In order to implement the above embodiment, the present invention also proposes a client.

图6是根据本发明一个实施例的客户端的结构框图。FIG. 6 is a structural block diagram of a client according to an embodiment of the present invention.

如图6所示,该客户端包括处理模块610和物理模拟模块620。As shown in FIG. 6 , the client includes a processing module 610 and a physical simulation module 620 .

其中,处理模块610,用于在第一客户端检测到第一角色触发载具操控控件的情况下,获取第一用户对载具的操作信息以及载具的位置信息,并将第一用户对载具的操作信息和载具的位置信息发送至服务器,以使服务器接收第一客户端发送的第一用户对载具的操作信息和载具的位置信息,并将第一用户对载具的操作信息和载具的位置信息同步至第二客户端。Among them, the processing module 610 is used to obtain the first user's operation information on the vehicle and the vehicle's location information when the first client detects that the first character triggers the vehicle control control, and send the first user's operation information on the vehicle and the vehicle's location information to the server, so that the server receives the first user's operation information on the vehicle and the vehicle's location information sent by the first client, and synchronizes the first user's operation information on the vehicle and the vehicle's location information to the second client.

物理模拟模块620,用于接收服务器发送的第一用户对载具的操作信息和载具的位置信息,并在第二客户端中,根据第一用户对载具的操作信息和载具的位置信息对载具进行物理模拟。The physical simulation module 620 is used 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 of 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.

如图7所示,该客户端还包括修正模块630。As shown in FIG. 7 , the client further includes a correction module 630 .

修正模块630,用于对载具的位置信息进行修正。The correction module 630 is used to correct the position information of the vehicle.

如图8所示,该客户端还包括防闪烁模块640。As shown in FIG. 8 , the client further includes an anti-flicker module 640 .

防闪烁模块640,用于对修正后的载具的位置信息进行防闪烁处理。The anti-flicker module 640 is used to perform anti-flicker processing on the corrected position information of the vehicle.

需要说明的是,前述对载具物理模拟系统的解释说明,也适用于本发明实施例的载具物理模拟方法,本发明实施例中未公布的细节,在此不再赘述。It should be noted that the above explanation of the vehicle physics simulation system is also applicable to the vehicle physics simulation method of the embodiment of the present invention. The details not disclosed in the embodiment of the present invention will not be repeated here.

本发明实施例的客户端,在第一客户端检测到第一角色触发载具操控控件的情况下,第一客户端获取第一用户对载具的操作信息以及载具的位置信息,并将第一用户对载具的操作信息和载具的位置信息发送至服务器,服务器接收第一客户端发送的第一用户对载具的操作信息和载具的位置信息,并将第一用户对载具的操作信息和载具的位置信息同步至第二客户端,第二客户端接收服务器发送的第一用户对载具的操作信息和载具的位置信息,并在第二客户端中,根据第一用户对载具的操作信息和载具的位置信息对载具进行物理模拟,从而对设备资源进行优化,提高资源优化装置性能,防止卡顿现象,提升模拟驾驶体验。In the client of the embodiment of the present invention, when the first client detects that the first character triggers the vehicle control control, the first client obtains the first user's operation information on the vehicle and the vehicle's location information, and sends the first user's operation information on the vehicle and the vehicle's location information to the server. The server receives the first user's operation information on the vehicle and the vehicle's location information sent by the first client, and synchronizes the first user's operation information on the vehicle and the vehicle's location information to the second client. The second client receives the first user's operation information on the vehicle and the vehicle's location information sent by the server, and in the second client, physically simulates the vehicle according to the first user's operation information on the vehicle and the vehicle's location information, thereby optimizing device resources, improving the performance of the resource optimization device, preventing jamming, and enhancing the simulated driving experience.

为了实现上述实施例,本发明还提出了一种计算机可读存储介质,其上存储有计算机程序,其特征在于,该程序被处理器执行时实现上一方面实施例的载具物理模拟方法。In order to implement the above-mentioned embodiment, the present invention further proposes a computer-readable storage medium on which a computer program is stored, characterized in that when the program is executed by a processor, the vehicle physics simulation method of the above-mentioned embodiment is implemented.

为了实现上述实施例,本发明还提出了一种电子设备。In order to implement the above embodiment, the present invention also provides an electronic device.

电子设备中安装有客户端,电子设备包括处理器、存储器及存储在存储器上并可在处理器上运行的计算机程序,处理器用于执行本发明上一方面实施例的载具物理模拟方法。A client is installed in the electronic device, which includes a processor, a memory, and a computer program stored in the memory and executable on the processor. The processor is used to execute the vehicle physics simulation method of the above embodiment of the present invention.

本发明实施例的电子设备,在第一客户端检测到第一角色触发载具操控控件的情况下,第一客户端获取第一用户对载具的操作信息以及载具的位置信息,并将第一用户对载具的操作信息和载具的位置信息发送至服务器,服务器接收第一客户端发送的第一用户对载具的操作信息和载具的位置信息,并将第一用户对载具的操作信息和载具的位置信息同步至第二客户端,第二客户端接收服务器发送的第一用户对载具的操作信息和载具的位置信息,并在第二客户端中,根据第一用户对载具的操作信息和载具的位置信息对载具进行物理模拟,从而对设备资源进行优化,提高资源优化装置性能,防止卡顿现象,提升模拟驾驶体验。In the electronic device of an embodiment of the present invention, when the first client detects that the first character triggers the vehicle control control, the first client obtains the first user's operation information on the vehicle and the vehicle's location information, and sends the first user's operation information on the vehicle and the vehicle's location information to the server. The server receives the first user's operation information on the vehicle and the vehicle's location information sent by the first client, and synchronizes the first user's operation information on the vehicle and the vehicle's location information to the second client. The second client receives the first user's operation information on the vehicle and the vehicle's location information sent by the server, and in the second client, physically simulates the vehicle according to the first user's operation information on the vehicle and the vehicle's location information, thereby optimizing device resources, improving the performance of the resource optimization device, preventing jamming, and enhancing the simulated driving experience.

为了实现上述实施例,本发明还提出了一种载具物理模拟方法。In order to implement the above embodiment, the present invention also proposes a vehicle physics simulation method.

图9是根据本发明一个实施例的载具物理模拟方法的流程图。FIG. 9 is a flow chart of a vehicle physics simulation method according to an embodiment of the present invention.

如图9所示,该载具物理模拟方法应用于服务器,包括以下步骤:As shown in FIG9 , the vehicle physics simulation method is applied to the server, and includes the following steps:

步骤901,在第一客户端检测到第一角色触发载具操控控件的情况下,服务器接收第一客户端发送的第一用户对载具的操作信息和载具的位置信息。Step 901, when the first client detects that the first character triggers the vehicle control control, the server receives the first user's operation information on the vehicle and the vehicle position information sent by the first client.

步骤902,将第一用户对载具的操作信息和载具的位置信息同步至第二客户端,以使第二客户端接收服务器发送的第一用户对载具的操作信息和载具的位置信息,并在第二客户端中,根据第一用户对载具的操作信息和载具的位置信息对载具进行物理模拟。Step 902, synchronizes the first user's operation information on the vehicle and the vehicle's location information to the second client, so that the second client receives the first user's operation information on the vehicle and the vehicle's location information sent by the server, and in the second client, physically simulates the vehicle based on the first user's operation information on the vehicle and the vehicle's location information.

如图10所示,本发明实施例还可包括以下步骤:As shown in FIG. 10 , the embodiment of the present invention may further include the following steps:

步骤903,服务器初始化应用场景。Step 903: The server initializes the application scenario.

应用场景包括多种不同的地形特征。The application scenarios include a variety of different terrain features.

步骤904,在多种不同的地形特征上,随机生成载具,以使第一客户端和/或第二客户端根据载具所处的地形特征对服务器生成的载具进行物理模拟。Step 904, randomly generating vehicles on a variety of different terrain features, so that the first client and/or the second client performs physical simulation on the vehicle generated by the server according to the terrain features where the vehicle is located.

本实施例为载具物理模拟系统对应的服务器侧执行的方法。前述对载具物理模拟系统的解释说明,也适用于本发明实施例的载具物理模拟方法,本发明实施例中未公布的细节,在此不再赘述。This embodiment is a method executed by the server side corresponding to the vehicle physics simulation system. The above explanation of the vehicle physics simulation system is also applicable to the vehicle physics simulation method of the embodiment of the present invention. The details not disclosed in the embodiment of the present invention will not be repeated here.

本发明实施例的载具物理模拟方法,在第一客户端检测到第一角色触发载具操控控件的情况下,服务器接收第一客户端发送的第一用户对载具的操作信息和载具的位置信息,将第一用户对载具的操作信息和载具的位置信息同步至第二客户端,以使第二客户端接收服务器发送的第一用户对载具的操作信息和载具的位置信息,并在第二客户端中,根据第一用户对载具的操作信息和载具的位置信息对载具进行物理模拟,从而对设备资源进行优化,提高资源优化装置性能,防止卡顿现象,提升模拟驾驶体验。In the vehicle physics simulation method of an embodiment of the present invention, when the first client detects that the first character triggers the vehicle control control, the server receives the first user's operation information on the vehicle and the vehicle's location information sent by the first client, and synchronizes the first user's operation information on the vehicle and the vehicle's location information to the second client, so that the second client receives the first user's operation information on the vehicle and the vehicle's location information sent by the server, and in the second client, physically simulates the vehicle according to the first user's operation information on the vehicle and the vehicle's location information, thereby optimizing equipment resources, improving the performance of the resource optimization device, preventing jamming, and enhancing the simulated driving experience.

为了实现上述实施例,本发明还提出了一种服务器。In order to implement the above embodiment, the present invention also proposes a server.

图11是根据本发明一个实施例的服务器的结构框图。FIG. 11 is a structural block diagram of a server according to an embodiment of the present invention.

如图11所示,该服务器包括接收模块1100以及同步模块1120。As shown in FIG. 11 , the server includes a receiving module 1100 and a synchronization module 1120 .

其中,接收模块1100,用于在第一客户端检测到第一角色触发载具操控控件的情况下,服务器接收第一客户端发送的第一用户对载具的操作信息和载具的位置信息。Among them, the receiving module 1100 is used for receiving, on the server, the operation information of the first user on the vehicle and the location information of the vehicle sent by the first client when the first client detects that the first character triggers the vehicle control control.

其中,客户端包括第一客户端和第二客户端,第一用户通过第一客户端控制第一角色,第二用户通过第二客户端控制第二角色。The client includes a first client and a second client, a first user controls a first character through the first client, and a second user controls a second character through the second client.

同步模块1120,用于将第一用户对载具的操作信息和载具的位置信息同步至第二客户端,以使第二客户端接收服务器发送的第一用户对载具的操作信息和载具的位置信息,并在第二客户端中,根据第一用户对载具的操作信息和载具的位置信息对载具进行物理模拟。The synchronization module 1120 is used to synchronize the first user's operation information on the vehicle and the vehicle's location information to the second client, so that the second client receives the first user's operation information on the vehicle and the vehicle's location information sent by the server, and in the second client, physically simulates the vehicle based on the first user's operation information on the vehicle and the vehicle's location information.

如图12所示,该服务器还可包括生成模块1130。As shown in FIG. 12 , the server may further include a generating module 1130 .

生成模块1130,用于初始化应用场景,应用场景包括多种不同的地形特征,并在多种不同的地形特征上,随机生成载具,以使第一客户端和/或第二客户端根据载具所处的地形特征对服务器生成的载具进行物理模拟。The generation module 1130 is used to initialize the application scenario, which includes a variety of different terrain features and randomly generates vehicles on the various different terrain features, so that the first client and/or the second client can perform physical simulation on the vehicle generated by the server according to the terrain features where the vehicle is located.

需要说明的是,前述对载具物理模拟方法的解释说明,也适用于本发明实施例的服务器,本发明实施例中未公布的细节,在此不再赘述。It should be noted that the above explanation of the vehicle physics simulation method is also applicable to the server in the embodiment of the present invention, and the details not disclosed in the embodiment of the present invention will not be repeated here.

本发明实施例的服务器,在第一客户端检测到第一角色触发载具操控控件的情况下,服务器接收第一客户端发送的第一用户对载具的操作信息和载具的位置信息,将第一用户对载具的操作信息和载具的位置信息同步至第二客户端,以使第二客户端接收服务器发送的第一用户对载具的操作信息和载具的位置信息,并在第二客户端中,根据第一用户对载具的操作信息和载具的位置信息对载具进行物理模拟,从而对设备资源进行优化,提高资源优化装置性能,防止卡顿现象,提升模拟驾驶体验。The server of an embodiment of the present invention, when the first client detects that the first character triggers the vehicle control control, the server receives the first user's operation information on the vehicle and the vehicle's location information sent by the first client, and synchronizes the first user's operation information on the vehicle and the vehicle's location information to the second client, so that the second client receives the first user's operation information on the vehicle and the vehicle's location information sent by the server, and in the second client, physically simulates the vehicle according to the first user's operation information on the vehicle and the vehicle's location information, thereby optimizing equipment resources, improving the performance of the resource optimization device, preventing jamming, and enhancing the simulated driving experience.

为了实现上述实施例,本发明还提出了一种计算机可读存储介质,其上存储有计算机程序,其特征在于,该程序被处理器执行时实现上一方面实施例的载具物理模拟方法。In order to implement the above-mentioned embodiment, the present invention further proposes a computer-readable storage medium on which a computer program is stored, characterized in that when the program is executed by a processor, the vehicle physics simulation method of the above-mentioned embodiment is implemented.

为了实现上述实施例,本发明还提出了一种服务器。In order to implement the above embodiment, the present invention also proposes a server.

服务器包括处理器、存储器及存储在存储器上并可在处理器上运行的计算机程序,处理器用于执行本发明上一方面实施例的载具物理模拟方法。The server includes a processor, a memory, and a computer program stored in the memory and executable on the processor. The processor is used to execute the vehicle physics simulation method of the above embodiment of the present invention.

本发明实施例的服务器,在第一客户端检测到第一角色触发载具操控控件的情况下,服务器接收第一客户端发送的第一用户对载具的操作信息和载具的位置信息,将第一用户对载具的操作信息和载具的位置信息同步至第二客户端,以使第二客户端接收服务器发送的第一用户对载具的操作信息和载具的位置信息,并在第二客户端中,根据第一用户对载具的操作信息和载具的位置信息对载具进行物理模拟,从而对设备资源进行优化,提高资源优化装置性能,防止卡顿现象,提升模拟驾驶体验。The server of an embodiment of the present invention, when the first client detects that the first character triggers the vehicle control control, the server receives the first user's operation information on the vehicle and the vehicle's location information sent by the first client, and synchronizes the first user's operation information on the vehicle and the vehicle's location information to the second client, so that the second client receives the first user's operation information on the vehicle and the vehicle's location information sent by the server, and in the second client, physically simulates the vehicle according to the first user's operation information on the vehicle and the vehicle's location information, thereby optimizing equipment resources, improving the performance of the resource optimization device, preventing jamming, and enhancing the simulated driving experience.

在本说明书的描述中,参考术语“一个实施例”、“一些实施例”、“示例”、“具体示例”、或“一些示例”等的描述意指结合该实施例或示例描述的具体特征、结构、材料或者特点包含于本发明的至少一个实施例或示例中。在本说明书中,对上述术语的示意性表述不必须针对的是相同的实施例或示例。而且,描述的具体特征、结构、材料或者特点可以在任一个或多个实施例或示例中以合适的方式结合。此外,在不相互矛盾的情况下,本领域的技术人员可以将本说明书中描述的不同实施例或示例以及不同实施例或示例的特征进行结合和组合。In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.

此外,术语“第一”、“第二”仅用于描述目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括至少一个该特征。在本发明的描述中,“多个”的含义是至少两个,例如两个,三个等,除非另有明确具体的限定。In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In the description of the present invention, the meaning of "plurality" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.

流程图中或在此以其他方式描述的任何过程或方法描述可以被理解为,表示包括一个或更多个用于实现特定逻辑功能或过程的步骤的可执行指令的代码的模块、片段或部分,并且本发明的优选实施方式的范围包括另外的实现,其中可以不按所示出或讨论的顺序,包括根据所涉及的功能按基本同时的方式或按相反的顺序,来执行功能,这应被本发明的实施例所属技术领域的技术人员所理解。Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, segment or portion of code that includes one or more executable instructions for implementing the steps of a specific logical function or process, and the scope of the preferred embodiments of the present invention includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in the reverse order depending on the functions involved, which should be understood by those skilled in the art to which the embodiments of the present invention belong.

在流程图中表示或在此以其他方式描述的逻辑和/或步骤,例如,可以被认为是用于实现逻辑功能的可执行指令的定序列表,可以具体实现在任何计算机可读介质中,以供指令执行系统、装置或设备(如基于计算机的系统、包括处理器的系统或其他可以从指令执行系统、装置或设备取指令并执行指令的系统)使用,或结合这些指令执行系统、装置或设备而使用。就本说明书而言,"计算机可读介质"可以是任何可以包含、存储、通信、传播或传输程序以供指令执行系统、装置或设备或结合这些指令执行系统、装置或设备而使用的装置。计算机可读介质的更具体的示例(非穷尽性列表)包括以下:具有一个或多个布线的电连接部(电子装置),便携式计算机盘盒(磁装置),随机存取存储器(RAM),只读存储器(ROM),可擦除可编辑只读存储器(EPROM或闪速存储器),光纤装置,以及便携式光盘只读存储器(CDROM)。另外,计算机可读介质甚至可以是可在其上打印程序的纸或其他合适的介质,因为可以例如通过对纸或其他介质进行光学扫描,接着进行编辑、解译或必要时以其他合适方式进行处理来以电子方式获得程序,然后将其存储在计算机存储器中。The logic and/or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute the instructions), or in combination with these instruction execution systems, devices or apparatuses. For the purposes of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in combination with these instruction execution systems, devices or apparatuses. More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic device), a portable computer disk box (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), a fiber optic device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium and then editing, interpreting or otherwise processing in a suitable manner if necessary, and then stored in a computer memory.

应当理解,本发明的各部分可以用硬件、软件、固件或它们的组合来实现。在上述实施方式中,多个步骤或方法可以用存储在存储器中且由合适的指令执行系统执行的软件或固件来实现。例如,如果用硬件来实现,和在另一实施方式中一样,可用本领域公知的下列技术中的任一项或他们的组合来实现:具有用于对数据信号实现逻辑功能的逻辑门电路的离散逻辑电路,具有合适的组合逻辑门电路的专用集成电路,可编程门阵列(PGA),现场可编程门阵列(FPGA)等。It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, a plurality of steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

本技术领域的普通技术人员可以理解实现上述实施例方法携带的全部或部分步骤是可以通过程序来指令相关的硬件完成,的程序可以存储于一种计算机可读存储介质中,该程序在执行时,包括方法实施例的步骤之一或其组合。A person skilled in the art may understand that all or part of the steps in the method for implementing the above-mentioned embodiment may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiment.

此外,在本发明各个实施例中的各功能单元可以集成在一个处理模块中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。集成的模块如果以软件功能模块的形式实现并作为独立的产品销售或使用时,也可以存储在一个计算机可读取存储介质中。In addition, each functional unit in each embodiment of the present invention may be integrated into a processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium.

上述提到的存储介质可以是只读存储器,磁盘或光盘等。尽管上面已经示出和描述了本发明的实施例,可以理解的是,上述实施例是示例性的,不能理解为对本发明的限制,本领域的普通技术人员在本发明的范围内可以对上述实施例进行变化、修改、替换和变型。The storage medium mentioned above may be a read-only memory, a magnetic disk or an optical disk, etc. Although the embodiments of the present invention have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be understood as limiting the present invention. A person of ordinary skill in the art may change, modify, replace and modify the above embodiments within the scope of the present invention.

Claims (10)

1.一种载具位置修正方法,其特征在于,所述方法应用于载具物理模拟系统,所述系统包括服务器及第二客户端,所述第二客户端用于根据载具物理模拟方法对载具M进行物理模拟,并对所述载具M的位置进行修正,所述载具位置修正方法包括:1. A vehicle position correction method, characterized in that the method is applied to a vehicle physical simulation system, the system includes a server and a second client, the second client is used to perform physical simulation on a vehicle M according to the vehicle physical simulation method, and correct the position of the vehicle M, the vehicle position correction method includes: 获取所述载具M修正前的位置A;Obtaining the position A of the vehicle M before correction; 接收所述服务器发送的所述载具M的坐标位置信息,并隐藏所述载具M;receiving the coordinate position information of the vehicle M sent by the server, and hiding the vehicle M; 在所述位置A设置与所述载具M外观模型相同的载具N;Arrange a vehicle N having the same appearance model as the vehicle M at the position A; 控制所述载具N跟随所述载具M进行运动,并保持所述载具N与所述载具M相对静止,并且不对所述载具N进行物理模拟;Control the vehicle N to follow the vehicle M to move, keep the vehicle N and the vehicle M relatively still, and do not perform physical simulation on the vehicle N; 在n秒内,将所述载具N平移至所述载具M的坐标位置;Within n seconds, translate the vehicle N to the coordinate position of the vehicle M; 在所述载具M与所述载具N之间的相对偏移向量C线性减少至0的情况下,隐藏所述载具N并显示所述载具M。When the relative offset vector C between the vehicle M and the vehicle N decreases linearly to 0, the vehicle N is hidden and the vehicle M is displayed. 2.根据权利要求1所述的载具位置修正方法,其特征在于,所述载具位置修正方法还包括:获取所述载具M修正后的位置B;2. The method for correcting the position of a carrier according to claim 1, characterized in that the method for correcting the position of a carrier further comprises: obtaining a corrected position B of the carrier M; 所述相对偏移向量初始时为由所述位置A指向所述位置B的向量,其中,相对偏移向量C=B-A。The relative offset vector is initially a vector pointing from the position A to the position B, wherein the relative offset vector C=B-A. 3.根据权利要求1所述的载具位置修正方法,其特征在于,所述载具物理模拟方法应用于所述载具物理模拟系统,其中,所述载具物理模拟系统还包括第一客户端,第一用户通过所述第一客户端控制第一角色,第二用户通过所述第二客户端控制第二角色,所述载具物理模拟方法包括以下步骤:3. The vehicle position correction method according to claim 1, characterized in that the vehicle physics simulation method is applied to the vehicle physics simulation system, wherein the vehicle physics simulation system further comprises a first client, a first user controls a first character through the first client, and a second user controls a second character through the second client, and the vehicle physics simulation method comprises the following steps: 在所述第一客户端检测到所述第一角色触发所述载具操控控件的情况下,所述第一客户端获取所述第一用户对所述载具的操作信息以及所述载具的位置信息,并将所述第一用户对所述载具的操作信息和所述载具的位置信息发送至所述服务器,以使所述服务器接收所述第一客户端发送的所述第一用户对所述载具的操作信息和所述载具的位置信息,并将所述第一用户对所述载具的操作信息和所述载具的位置信息同步至所述第二客户端;When the first client detects that the first character triggers the vehicle control control, the first client obtains the first user's operation information on the vehicle and the location information of the vehicle, and sends the first user's operation information on the vehicle and the location information of the vehicle to the server, so that the server receives the first user's operation information on the vehicle and the location information of the vehicle sent by the first client, and synchronizes the first user's operation information on the vehicle and the location information of the vehicle to the second client; 所述第二客户端接收所述服务器发送的所述第一用户对载具的操作信息和所述载具的位置信息,并根据所述载具的位置信息和所述第二角色的视距范围对所述载具选择性关闭物理模拟,并在对所述载具选择进行物理模拟时,在所述第二客户端中,根据所述第一用户对载具的操作信息和所述载具的位置信息对所述载具进行物理模拟;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 selectively turns off the physical simulation of the vehicle according to the position information of the vehicle and the sight range of the second character, and when the physical simulation is selected for the vehicle, the second client performs the physical simulation on the vehicle according to the operation information of the first user on the vehicle and the position information of the vehicle; 其中,所述第一客户端在所述第一客户端检测到所述第一角色触发所述载具离开控件的情况下,根据所述载具的位置信息和所述第一角色的视距范围,对所述载具选择性关闭物理模拟。Among them, when the first client detects that the first character triggers the vehicle to leave the control, the first client selectively turns off the physical simulation of the vehicle according to the position information of the vehicle and the viewing range of the first character. 4.根据权利要求3所述的载具位置修正方法,其特征在于,在所述第二客户端中,根据所述第一用户对载具的操作信息和所述载具的位置信息对所述载具进行物理模拟,具体包括:4. The vehicle position correction method according to claim 3, characterized in that, in the second client, physical simulation of the vehicle is performed according to the operation information of the first user on the vehicle and the position information of the vehicle, specifically comprising: 所述第二客户端判断所述载具是否在所述第二角色的视距范围内,如果所述载具不在所述第二角色的视距范围内,则不开启对所述载具的物理模拟,如果所述载具在所述第二角色的视距范围内,根据所述服务器发送的所述第一用户对载具的操作信息和所述载具的位置信息,对所述载具进行物理模拟,直至所述载具停稳或离开所述第二角色的视距范围。The second client determines whether the vehicle is within the sight range of the second character. If the vehicle is not within the sight range of the second character, physical simulation of the vehicle is not started. If the vehicle is within the sight range of the second character, physical simulation of the vehicle is performed according to the operation information of the first user on the vehicle and the position information of the vehicle sent by the server until the vehicle stops or leaves the sight range of the second character. 5.根据权利要求3所述的载具位置修正方法,其特征在于,所述载具物理模拟方法还包括:5. The vehicle position correction method according to claim 3, characterized in that the vehicle physical simulation method further comprises: 在所述第一客户端检测到所述第一角色触发所述载具操控控件的情况下,在所述第一客户端中,获取对所述第一角色所述载具的操作信息,对所述载具进行物理模拟。When the first client detects that the first character triggers the vehicle control control, the first client obtains operation information of the vehicle of the first character and performs physical simulation on the vehicle. 6.根据权利要求5所述的载具位置修正方法,其特征在于,所述载具物理模拟方法还包括:6. The vehicle position correction method according to claim 5, characterized in that the vehicle physical simulation method further comprises: 在所述第一客户端检测到所述第一角色触发所述载具离开控件的情况下,所述第一客户端判断所述载具是否在所述第一角色的视距范围内,如果所述载具不在所述第一角色的视距范围内,则不开启对所述载具的物理模拟,如果所述载具在所述第一角色的视距范围内,则进一步判断所述载具是否停稳,如果所述载具停稳,则停止对所述载具进行物理模拟,如果所述载具未停稳,则对所述载具进行物理模拟,直至所述载具停稳或离开所述第一角色的视距范围。When the first client detects that the first character triggers the vehicle to leave the control, the first client determines whether the vehicle is within the line of sight of the first character. If the vehicle is not within the line of sight of the first character, the physical simulation of the vehicle is not started. If the vehicle is within the line of sight of the first character, it is further determined whether the vehicle is stopped. If the vehicle is stopped, the physical simulation of the vehicle is stopped. If the vehicle is not stopped, the physical simulation of the vehicle is performed until the vehicle stops or leaves the line of sight of the first character. 7.根据权利要求3所述的载具位置修正方法,其特征在于,所述载具物理模拟方法还包括:7. The vehicle position correction method according to claim 3, characterized in that the vehicle physical simulation method further comprises: 所述第一客户端和/或所述第二客户端获取所述服务器生成所述载具时所述载具所处的地形特征,根据所述载具所处的地形特征对所述服务器生成的所述载具进行物理模拟。The first client and/or the second client obtains the terrain features where the vehicle is located when the server generates the vehicle, and performs physical simulation on the vehicle generated by the server according to the terrain features where the vehicle is located. 8.一种载具位置修正装置,其特征在于,所述装置应用于载具物理模拟系统,所述系统包括服务器及第二客户端,所述第二客户端用于根据载具物理模拟方法对载具M进行物理模拟,并对所述载具M的位置进行修正,所述装置包括:8. A vehicle position correction device, characterized in that the device is applied to a vehicle physical simulation system, the system includes a server and a second client, the second client is used to perform physical simulation on a vehicle M according to a vehicle physical simulation method, and correct the position of the vehicle M, the device includes: 位置获取单元,用于获取所述载具修正前的位置A;A position acquisition unit, used to acquire the position A of the vehicle before correction; 载具隐藏单元,用于接收所述服务器发送的所述载具M的坐标位置信息,并隐藏所述载具M;A vehicle hiding unit, used for receiving the coordinate position information of the vehicle M sent by the server, and hiding the vehicle M; 虚假载具设置单元,用于在所述位置A设置与所述载具M外观模型相同的载具N;A false vehicle setting unit, used for setting a vehicle N having the same appearance model as the vehicle M at the position A; 虚假载具控制单元,用于控制所述载具N跟随所述载具M进行运动,并保持所述载具N与所述载具M相对静止,并且不对所述载具N进行物理模拟;A fake vehicle control unit, used for controlling the vehicle N to follow the vehicle M in movement, keeping the vehicle N and the vehicle M relatively still, and not performing physical simulation on the vehicle N; 偏移量调整单元,用于在n秒内,将所述载具N平移至所述载具M的坐标位置;An offset adjustment unit, used to translate the vehicle N to the coordinate position of the vehicle M within n seconds; 载具显示单元,在所述载具M与所述载具N之间的相对偏移向量C线性减少至0的情况下,用于隐藏所述载具N并显示所述载具M。The vehicle display unit is used to hide the vehicle N and display the vehicle M when the relative offset vector C between the vehicle M and the vehicle N is linearly reduced to 0. 9.一种第二客户端,其特征在于,所述第二客户端属于载具物理模拟系统,所述系统还包括服务器,所述第二客户端用于根据载具物理模拟方法对载具M进行物理模拟,并对所述载具M的位置进行修正,所述第二客户端包括:9. A second client, characterized in that the second client belongs to a vehicle physical simulation system, the system further includes a server, the second client is used to perform physical simulation on a vehicle M according to a vehicle physical simulation method, and correct the position of the vehicle M, the second client includes: 位置获取模块,用于获取所述载具修正前的位置A;A position acquisition module, used to acquire the position A of the vehicle before correction; 载具隐藏模块,用于接收所述服务器发送的所述载具M的坐标位置信息,并隐藏所述载具M;A vehicle hiding module, used for receiving the coordinate position information of the vehicle M sent by the server, and hiding the vehicle M; 虚假载具设置模块,用于在所述位置A设置与所述载具M外观模型相同的载具N;A false vehicle setting module, used for setting a vehicle N having the same appearance model as the vehicle M at the position A; 虚假载具控制模块,用于控制所述载具N跟随所述载具M进行运动,并保持所述载具N与所述载具M相对静止,并且不对所述载具N进行物理模拟;A fake vehicle control module, used for controlling the vehicle N to follow the vehicle M in movement, keeping the vehicle N and the vehicle M relatively still, and not performing physical simulation on the vehicle N; 偏移量调整模块,用于在n秒内,将所述载具N平移至所述载具M的坐标位置;An offset adjustment module, used to translate the vehicle N to the coordinate position of the vehicle M within n seconds; 载具显示模块,用于在所述载具M与所述载具N之间的相对偏移向量C线性减少至0的情况下,隐藏所述载具N并显示所述载具M。The vehicle display module is used to hide the vehicle N and display the vehicle M when the relative offset vector C between the vehicle M and the vehicle N is linearly reduced to 0. 10.一种第二电子设备,其特征在于,所述电子设备中安装有第二客户端,所述电子设备包括:10. A second electronic device, characterized in that a second client is installed in the electronic device, and the electronic device comprises: 处理器;以及Processor; and 存储器,用于存储所述处理器的可执行指令;A memory, configured to store executable instructions of the processor; 其中,所述处理器配置为经由执行所述可执行指令来执行权利要求1-7任一项所述的载具位置修正方法。Wherein, the processor is configured to execute the vehicle position correction method described in any one of claims 1-7 by executing the executable instructions.
CN202111084892.4A 2018-02-11 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 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
CN201810141927.5A CN108429793B (en) 2018-02-11 2018-02-11 Vehicle physics simulation method, system, client, electronic device and server
CN202111084892.4A CN113786610B (en) 2018-02-11 2018-02-11 Carrier position correction method and device, second client and second electronic equipment

Related Parent Applications (1)

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

Publications (2)

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

Family

ID=63156901

Family Applications (2)

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

Family Applications After (1)

Application Number Title Priority Date Filing Date
CN201810141927.5A Active CN108429793B (en) 2018-02-11 2018-02-11 Vehicle physics simulation method, system, client, electronic device and server

Country Status (1)

Country Link
CN (2) CN113786610B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110694266B (en) * 2019-10-23 2023-07-18 网易(杭州)网络有限公司 Game state synchronization method, game state display method and game state synchronization device
CN111084989A (en) * 2019-12-25 2020-05-01 网易(杭州)网络有限公司 Game information updating method and device
CN112642147B (en) * 2020-12-24 2024-08-13 网易(杭州)网络有限公司 Game control method, device, equipment and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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

Family Cites Families (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3694267B2 (en) * 2002-01-11 2005-09-14 コナミスポーツライフ株式会社 Exercise support device
US6733383B2 (en) * 2002-05-17 2004-05-11 Electronic Arts Inc. Systems and methods for simulating game state changes responsive to an interrupt condition
JP4164097B2 (en) * 2006-02-14 2008-10-08 株式会社コナミデジタルエンタテインメント Game terminal device
CN101841538A (en) * 2010-04-16 2010-09-22 上海亚图软件有限公司 Network synchronization method of physical computing based on CS architecture
CN102915397A (en) * 2011-08-02 2013-02-06 鸿富锦精密工业(深圳)有限公司 Flight simulation system and flight simulation method for unmanned aerial vehicles
KR20140068410A (en) * 2012-11-28 2014-06-09 삼성전자주식회사 Method for providing user interface based on physical engine and an electronic device thereof
CN104243505A (en) * 2013-06-06 2014-12-24 苏州蜗牛数字科技股份有限公司 Multi-layer operation interaction method for large carrier
US20150104757A1 (en) * 2013-10-15 2015-04-16 Mbfarr, Llc Driving assessment and training method and apparatus
CN105376244A (en) * 2015-11-27 2016-03-02 深圳市望尘科技有限公司 Network game implementation method with artificial intelligence and physical simulation computations being performed on basis of cloud server
CN105617655B (en) * 2016-01-14 2019-05-17 网易(杭州)网络有限公司 Physical effect methods of exhibiting, device and game system
CN107019915B (en) * 2016-02-01 2018-09-07 腾讯科技(深圳)有限公司 A kind of method, user equipment and the system of determining motion track
CN107301801B (en) * 2017-07-14 2020-06-09 深圳国泰安教育技术有限公司 An operation method, device, VR helmet and storage medium for VR simulation driving
CN107222510B (en) * 2017-07-21 2018-10-09 腾讯科技(深圳)有限公司 A kind of game synchronization method, system and relevant device
CN107469343B (en) * 2017-07-28 2021-01-26 深圳市瑞立视多媒体科技有限公司 Virtual reality interaction method, device and system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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
CN113786610A (en) 2021-12-14
CN108429793A (en) 2018-08-21
CN108429793B (en) 2021-10-08

Similar Documents

Publication Publication Date Title
CN113795814B (en) Virtual character real world boundaries
US9818228B2 (en) Mixed reality social interaction
JP6196668B2 (en) Dynamic allocation of drawing resources in cloud game systems
WO2019153840A1 (en) Sound reproduction method and device, storage medium and electronic device
KR102441514B1 (en) Hybrid streaming
CN106780674B (en) Lens moving method and device
CN113786610B (en) Carrier position correction method and device, second client and second electronic equipment
EP2673061A2 (en) Method and system for providing video game content
US10304234B2 (en) Virtual environment rendering
JP7589348B2 (en) Method, device, equipment, and program for displaying a screen in a virtual scene
CN114201095A (en) Control method, device, storage medium and electronic device for live broadcast interface
JP6306089B2 (en) System and method for transmitting media over a network
Kanev et al. Design and simulation of interactive 3D computer games
JP7317857B2 (en) Virtual camera positioning system
KR102169024B1 (en) System and providing method for joint training of command and control using 3D augmented reality
US9393490B2 (en) Simulation based on audio signals
WO2024119725A1 (en) Virtual gain item sending method and device, mobile terminal, and storage medium
KR20240149954A (en) Message display method, device, apparatus, medium and program product
JP2025515024A (en) Method and device for presenting information in a virtual scene, electronic device, and computer program
CN1570946B (en) Interactive Network Sports Simulation System
US20240037885A1 (en) Method and apparatus for controlling virtual object, electronic device, storage medium, and program product
US20250078371A1 (en) Atomic streaming of virtual objects
CN118831319A (en) Picture display method, device, equipment and storage medium
CN120154901A (en) Virtual lens control method and device, electronic equipment and storage medium
CN115525185A (en) Scene switching method and device, computer equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant