Game model trailing track display method, device and storage medium

By obtaining the current frame and historical frame position information of the game model, determining the target position and generating a triangle mesh, the problems of faults and performance consumption of tailing special effects model in traditional technology are solved, and a smooth tailing trajectory display is achieved.

CN114419225BActive Publication Date: 2025-04-25NETEASE (HANGZHOU) NETWORK CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111660739.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-30
Publication Date
2025-04-25
Estimated Expiration
2041-12-30

AI Technical Summary

Technical Problem

When the prior art produces flight tail ballistic special effects, traditional launch particles and streamers are difficult to adapt to shells with variable speed and trajectory, and often have problems such as model faults and splinters, and performance consumption is serious when the tail is long.

Method used

When the game screen is refreshed, it obtains the position information of the game model in the current frame and historical frame, determines the target position, generates a triangle mesh, and renders the trailing track of the game model based on this mesh and preset special effects resources.

Benefits of technology

A smooth tail track display is achieved, avoiding model faults and misunderstandings, and reducing the impact on game performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114419225B_ABST
    Figure CN114419225B_ABST
Patent Text Reader

Abstract

The present disclosure relates to a method, device and storage medium for displaying the trailing trajectory of a game model. The method provides a graphical user interface through a terminal device, and the graphical user interface displays a game screen. The method includes: when the game screen is refreshed, obtaining the first position of the game model in the current frame game screen and the second position in the historical frame game screen; determining at least one target position based on the first position and the second position, the target position including the target position coordinates and the target time information; generating a corresponding triangular mesh according to the target position; rendering and displaying the trailing trajectory of the game model in the current frame game screen based on the generated triangular mesh and the preset special effect resources. The present disclosure solves the technical problem in the prior art that the game trailing special effects have model goofs and faults, which affect the effect perception and even the game performance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of game technology, and in particular to a method, device and storage medium for displaying a trail of a game model. Background Art

[0002] At present, when making the flight trail ballistic special effects, most of them use the launcher in the engine to continuously launch objects in the game scene to simulate the flight trajectory effect. However, the traditional emission particles and streamers are not well adapted to the projectiles with variable speed and trajectory, and often cause model faults and mistakes; if the tail is relatively long, the performance consumption problem is also more serious. Summary of the invention

[0003] The disclosed embodiments provide a method, device and storage medium for displaying the trailing trajectory of a game model, so as to at least solve the technical problem in the prior art that the trailing special effects of games have model blemishes and discontinuities, which affect the visual effect and even the game performance.

[0004] According to one aspect of an embodiment of the present disclosure, a method for displaying a trailing trajectory of a game model is provided, wherein a graphical user interface is provided through a terminal device, and the graphical user interface displays a game screen. The method comprises: when the game screen is refreshed, obtaining a first position of the game model in a current frame game screen and a second position in a historical frame game screen, wherein the first position comprises first position coordinates and first time information, and the second position comprises second position coordinates and second time information; determining at least one target position based on the first position and the second position, wherein the target position comprises target position coordinates and target time information; generating a corresponding triangular mesh based on the target position; and rendering and displaying the trailing trajectory of the game model in the current frame game screen based on the generated triangular mesh and preset special effect resources.

[0005] According to one aspect of an embodiment of the present disclosure, there is provided a device for displaying a trailing trajectory of a game model, wherein a graphical user interface is provided through a terminal device, and the graphical user interface displays a game screen. The device comprises: an acquisition module, for acquiring a first position of a game model in a current frame game screen and a second position of a game model in a historical frame game screen when the game screen is refreshed, wherein the first position comprises first position coordinates and first time information, and the second position comprises second position coordinates and second time information; a determination module, for determining at least one target position based on the first position and the second position, wherein the target position comprises target position coordinates and target time information; a generation module, for generating a corresponding triangular mesh according to the target position; and a rendering module, for rendering and displaying the trailing trajectory of the game model in the current frame game screen based on the generated triangular mesh and preset special effect resources.

[0006] According to another aspect of an embodiment of the present disclosure, a computer-readable storage medium is further provided, wherein the computer-readable storage medium includes a stored program, wherein when the program is running, the device where the computer-readable storage medium is located is controlled to execute any one of the above-mentioned methods for displaying a trailing trajectory of a game model.

[0007] According to another aspect of an embodiment of the present disclosure, an electronic device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute any one of the above-mentioned methods for displaying a trailing trajectory of a game model.

[0008] In the disclosed embodiment, when the game screen is refreshed, the first position of the game model in the current frame game screen and the second position in the historical frame game screen are obtained, wherein the first position includes the first position coordinates and the first time information, and the second position includes the second position coordinates and the second time information; at least one target position is determined based on the first position and the second position, and the target position includes the target position coordinates and the target time information; according to the target position, a corresponding triangular mesh is generated; based on the generated triangular mesh and the preset special effects resources, the trailing trajectory of the game model in the current frame game screen is rendered and displayed, so as to achieve the purpose of generating the trailing trajectory by using the historical trajectory points of the artillery flight process when the game screen is refreshed, thereby realizing the technical effect of using the trajectory points in the previous and next frame images to generate a smooth trailing trajectory without affecting the game frame rate, thereby solving the technical problem in the prior art that the game trailing special effects have model goofs and faults, which affect the effect perception and even affect the game performance. BRIEF DESCRIPTION OF THE DRAWINGS

[0009] The drawings described herein are used to provide a further understanding of the present disclosure and constitute a part of the present disclosure. The illustrative embodiments of the present disclosure and their descriptions are used to explain the present disclosure and do not constitute an improper limitation on the present disclosure. In the drawings:

[0010] Figure 1 is a flow chart of a method for displaying a trailing track of a game model according to an embodiment of the present disclosure;

[0011] Figure 2 is a flight trajectory intention of an optional projectile model according to an embodiment of the present disclosure;

[0012] Figure 3 is a schematic diagram of determining a target position in a flight trajectory of an optional artillery shell model according to an embodiment of the present disclosure;

[0013] Figure 4It is a structural schematic diagram of a trailing trajectory display device for a game model according to an embodiment of the present disclosure. DETAILED DESCRIPTION

[0014] In order to enable those skilled in the art to better understand the scheme of the present disclosure, the technical scheme in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in the field without creative work should fall within the scope of protection of the present disclosure.

[0015] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product, or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products, or devices.

[0016] According to an embodiment of the present disclosure, a method embodiment of displaying a trail of a game model is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0017] The technical solution of the embodiment of the method can be executed in a mobile terminal, a computer terminal or a similar computing device. Taking running on a mobile terminal as an example, the mobile terminal can be a smart phone (such as an Android phone, an iOS phone, etc.), a tablet computer, a PDA, and a mobile Internet device (Mobile Internet Devices, referred to as MID), a PAD and other terminal devices. The mobile terminal may include one or more processors (the processor may include but is not limited to a central processing unit (CPU), a graphics processing unit (GPU), a digital signal processing (DSP) chip, a microprocessor (MCU), a programmable logic device (FPGA), a neural network processor (NPU), a tensor processor (TPU), an artificial intelligence (AI) type processor, etc.) and a memory for storing data. Optionally, the mobile terminal may also include a transmission device, an input and output device, and a display device for communication functions. It can be understood by those of ordinary skill in the art that the above structural description is only illustrative and does not limit the structure of the above mobile terminal. For example, the mobile terminal may also include more or fewer components than the above structural description, or have a configuration different from the above structural description.

[0018] The memory can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the trailing track display method of the game model in the embodiment of the present disclosure, and the processor executes various functional applications and data processing by running the computer program stored in the memory, that is, realizing the trailing track display method of the above-mentioned game model. The memory may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory may further include a memory remotely arranged relative to the processor, and these remote memories may be connected to the mobile terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0019] The transmission device is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the mobile terminal. In one example, the transmission device includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device can be a radio frequency (Radio Frequency, referred to as RF) module, which is used to communicate with the Internet wirelessly. The technical solution of the embodiment of the method can be applied to various communication systems, such as: Global System of Mobile communication (GSM) system, Code Division Multiple Access (CDMA) system, Wideband Code Division Multiple Access (WCDMA) system, General Packet Radio Service (GPRS), Long Term Evolution (LTE) system, LTE Frequency Division Duplex (FDD) system, LTE Time Division Duplex (TDD), Universal Mobile Telecommunication System (UMTS), Worldwide Interoperability for Microwave Access (WiMAX) communication system or 5G system. Optionally, multiple mobile terminals can perform device-to-device (D2D) communication. Optionally, the 5G system or 5G network is also called the New Radio (NR) system or NR network.

[0020] The display device may be, for example, a touch screen type liquid crystal display (LCD) and a touch display (also referred to as a "touch screen" or "touch display screen"). The liquid crystal display may enable a user to interact with a user interface of the mobile terminal. In some embodiments, the mobile terminal has a graphical user interface (GUI), and a user may interact with the GUI by finger contacts and / or gestures on a touch-sensitive surface, wherein the human-computer interaction functions here may optionally include the following interactions: creating web pages, drawing, word processing, making electronic documents, games, video conferencing, instant messaging, sending and receiving emails, call interfaces, playing digital videos, playing digital music and / or web browsing, etc. The executable instructions for executing the above human-computer interaction functions are configured / stored in a computer program product executable by one or more processors or a readable computer-readable storage medium.

[0021] In one embodiment of the present disclosure, the method for displaying the trailing track of a game model can be run on a local terminal device or a server. When the method for displaying the trailing track of a game model is run on a server, the method can be implemented and executed based on a cloud interaction system, wherein the cloud interaction system includes a server and a client device.

[0022] In an optional implementation, various cloud applications can be run under the cloud interaction system, such as cloud games. Taking cloud games as an example, cloud games refer to a game mode based on cloud computing. In the operation mode of cloud games, the operating body of the game program and the main body of the game screen presentation are separated. The storage and operation of the trailing trajectory display method of the game model are completed on the cloud game server. The role of the client device is used for receiving and sending data and presenting the game screen. For example, the client device can be a display device with data transmission function close to the user side, such as a mobile terminal, a TV, a computer, a handheld computer, etc.; but the cloud game server in the cloud is used for information processing. When playing the game, the player operates the client device to send an operation instruction to the cloud game server. The cloud game server runs the game according to the operation instruction, encodes and compresses the game screen and other data, and returns it to the client device through the network. Finally, the client device decodes and outputs the game screen.

[0023] In an optional embodiment, taking a game as an example, a local terminal device stores a game program and is used to present a game screen. The local terminal device is used to interact with the player through a graphical user interface, that is, the game program is downloaded and installed by an electronic device and run conventionally. The local terminal device may provide the graphical user interface to the player in a variety of ways, for example, it may be rendered and displayed on a display screen of the terminal, or provided to the player through a holographic projection. For example, the local terminal device may include a display screen and a processor, the display screen is used to present a graphical user interface, the graphical user interface includes a game screen, and the processor is used to run the game, generate a graphical user interface, and control the display of the graphical user interface on the display screen.

[0024] In one possible implementation, an embodiment of the present disclosure provides a method for displaying a trail of a game model, providing a graphical user interface through a terminal device, and the graphical user interface displays a game screen, wherein the terminal device can be the local terminal device mentioned above, or it can be the client device in the cloud interaction system mentioned above.

[0025] Figure 1 is a flowchart of a method for displaying a trailing track of a game model according to an embodiment of the present disclosure, such as Figure 1 As shown, the method comprises the following steps:

[0026] Step S102, when the game screen is refreshed, obtain the first position of the game model in the current frame game screen and the second position in the historical frame game screen, wherein the first position includes first position coordinates and first time information, and the second position includes second position coordinates and second time information.

[0027] It is understandable that in the game, when the player triggers the launch of a game model, such as a cannonball, an aircraft, etc., the flying distance of the game model in the refreshed game screen will become farther and farther, that is, the flying position of the game model in the game scene will change with the refresh of the game screen. Therefore, in order to accurately generate the trailing effect of the above-mentioned game model when flying, it is necessary not only to obtain the first position of the above-mentioned game model in the current frame game screen, but also to obtain the second position of the game model in the historical frame game screen before the current frame.

[0028] It should be noted that the first position includes the first position coordinates and first time information of the game model in the current frame game screen, and the second position includes the second position coordinates and second time information of the game model in the historical frame game screen. The first time information includes at least the corresponding tail duration, frame interval time with the previous frame, flight speed, special effect life cycle and other information of the game model in the current frame game screen; the second time information includes at least the corresponding tail duration, frame interval time with the previous frame, flight speed, special effect life cycle and other information of the game model in the historical frame game screen.

[0029] In an optional embodiment, when the game model is flying, a trailing special effect object can be created in the memory of the terminal device, and the trailing special effect object is used to store flight parameters related to each flight position of the game model during the flight process. Specifically, the trailing special effect object can include a Route table corresponding to the flight position, and the Route table is used to store the flight parameters corresponding to the flight position of the game model in each frame of the game screen during the flight process. The flight parameters include, but are not limited to, the position coordinates of the game model in the game screen, the flight speed, the flight direction, the duration of the trail, the life cycle of the trail, the size of the trail radius, the refresh frame rate of the game screen, the interval time between adjacent frames, etc. In this way, each Route table corresponds to a flight position. When the game screen is refreshed, the Route table corresponding to the flight position can be queried and obtained according to the flight position determined by the refreshed current frame game screen, that is, the first position of the game model in the frame game screen; and the Route table corresponding to the flight position can be obtained according to the flight position determined by the historical frame game screen before the current frame, that is, the second position of the game model in the previous historical frame game screen.

[0030] For example, Figure 2 A schematic diagram of the flight trajectory of a cannonball model is shown. Each solid circle corresponds to a flight position of the cannonball model on the flight trajectory, and each flight position corresponds to a Route table. Figure 2 As shown, the flight parameters of the cannonball model stored in each Route table include at least: position coordinates (Position), frame interval time (DeltaTime), flight speed (Velocity) and tail life time (LifeTime). When the game screen needs to be refreshed and the flight tail special effect of the above cannonball model needs to be updated, the corresponding position coordinates (Position), frame interval time (DeltaTime), flight speed (Velocity) and tail life time (LifeTime) and other information can be obtained from the corresponding Route table.

[0031] Step S104: determining at least one target position based on the first position and the second position, wherein the target position includes target position coordinates and target time information.

[0032] It can be understood that the generation of special effects in the game scene generally brings about very large performance overhead. The more complex and sophisticated the special effects are, the greater the performance overhead. Therefore, if the information in the original Route table corresponding to the flight position stored in the above-mentioned trailing special effect object is directly used to produce the trailing special effect of the above-mentioned game model, it will bring very large hardware performance pressure to the terminal device, and may make the above-mentioned terminal device unable to display the game screen of the game. Therefore, in some possible embodiments, after obtaining the above-mentioned first position corresponding to the current frame game screen and the above-mentioned second position corresponding to the historical frame game screen, in order to enable the technical solution provided by the present invention to be applied to more terminal devices and reduce the performance overhead brought by the solution, it can be based on the first position and the second position obtained, that is, on the basis of the original Route table. Streamlining processing is performed to reduce the number of Route tables used for special effect generation to reduce the performance overhead of the terminal device.

[0033] Specifically, at least one target position can be determined based on the acquired first position and the second position, and then the game model trailing special effect is generated according to the determined target position. In an optional implementation, the target position can be one or more target positions determined according to the first position and the second position; it can also be one or more target positions determined by the target position coordinates calculated according to the first position coordinates corresponding to the first position and the second position coordinates corresponding to the second position, for example, the center position coordinates between the first position coordinates and the second position coordinates, and then the target position of the game model is determined according to the target position coordinates. In an optional implementation, the one or more determined target positions can also correspond to one or more Route tables, and the Route table can be the original Route table stored in the trailing special effect object, or it can be a newly generated Route table based on the original Route table.

[0034] For example, in the embodiment of the present disclosure, after determining at least one target position, for example, taking the game model as a cannonball model, Figure 2 FIG. 1 shows a schematic diagram of determining the flight trajectory of a projectile model. Figure 2As shown, the above-mentioned cannonball model takes a parabolic flight trajectory during the flight process, wherein each point on the above-mentioned flight trajectory is the flight position of the above-mentioned cannonball model in each refreshed frame of the game screen during the flight. It can be seen that in each frame of the game screen, each flight position of the above-mentioned running single model corresponds to a Route table including position coordinates, frame interval duration, life time, flight speed, flight direction and other information.

[0035] When generating the tailing special effect of the cannonball model, the Route table of the corresponding flight position of the cannonball model in the current frame game screen and the Route table of the corresponding flight position in the historical frame game screen before the current frame can be obtained from the flight position. For example, assuming that the flight trajectory includes 100 flight points (i.e., flight target positions, 100 Route tables), and the current frame is the 50th frame (i.e., the 50th Route table), then the first position corresponding to the 50th flight point and the second position corresponding to the first 49 flight points (i.e., the first 50 Route tables) can be obtained first; then, 25 flight points (25 Route tables) are determined based on the 50 flight points (the first 50 Route tables) obtained as the target flight points for finally generating the flight tailing special effect of the cannonball model. Among them, the determined target flight points (25 Route tables) can be 25 flight points among the above 100 flight points, or they can be 25 flight points regenerated based on 50 flight points.

[0036] Step S106: Generate a corresponding triangular mesh according to the target position.

[0037] Step S108, based on the generated triangular mesh and preset special effect resources, rendering and displaying the trailing track of the above-mentioned game model in the current frame game screen.

[0038] It can be understood that after determining the target position for generating the tail special effect, a triangular mesh can be generated between each adjacent target position among the determined target positions, that is, between two adjacent Route tables, and then, based on the above triangular mesh and preset special effects resources, the tail trajectory of the cannon model in the current frame game screen is rendered and displayed.

[0039] Specifically, a cylindrical triangle strip (Triangle Strip) corresponding to a preset trailing radius size can be first generated between two adjacent target positions, that is, between two adjacent Route tables; secondly, the tangent, sub-tangent and normal of each vertex of the triangle strip are calculated according to the flight speed of the game model between the two target positions; then, the translucency information of each vertex of the triangle strip is calculated according to the preset trailing life parameters and trailing life duration parameters; then, according to the overall flight trajectory of the game model between the two target positions, the position ratio in the radial radius, etc., the sampling coordinates of special effect resources such as textures are calculated; finally, the triangle strips generated between every two target positions are merged to generate corresponding Mesh mesh data, thereby obtaining the trailing special effects of the game model.

[0040] It should be noted that the disclosed embodiment uses the trailing effect of a cannonball model in a game as an example for illustration, however, the trailing effect display method is not only applicable to the trailing effect of the cannonball model, but can also be applied to other game scenes, such as: car light trailing effects, game character skill trailing effects, etc.

[0041] Through the above steps, the method for displaying the trailing trajectory of the game model of the present invention obtains the first position of the game model in the current frame game screen and the second position of the game model in the historical frame game screen when the game screen is refreshed, determines at least one target position based on the first position and the second position, and renders and displays the trailing trajectory of the game model in the current frame game screen based on the target position, so that the trailing trajectory in the generated game screen is a whole, avoiding the problems of discontinuity and bloopers in the trailing special effects.

[0042] In an optional embodiment, the step of determining at least one target position based on the first position and the second position includes:

[0043] Step S202, determining an initial position of the game model from the first position and the second position.

[0044] Step S204, determining the target position based on the initial position, the first position, and the second position.

[0045] It can be understood that when displaying the flight process of the game model, the game model must have a take-off position, that is, the position of the game model in the initial frame game screen. For example, when the player triggers the launch button corresponding to the cannon model in the game, the first flight position of the single model when it flies out of the launch pad. In order to fully present the trailing effect of the game model, when generating the trailing effect of the above-mentioned game model in the current frame game screen, the corresponding target position can be determined from the initial position of the game model. For example, starting from the above-mentioned initial position, one or more target positions are selected from the above-mentioned first position and second position, and then the corresponding trailing effect is generated. Among them, the method of determining the above-mentioned target position may vary according to the type of game model and the flight trajectory of the game model, which is not limited here.

[0046] In an optional implementation, the above step S204 includes:

[0047] Step S302 , taking the initial position as a starting point and determining a target position based on the first position and the second position at intervals of a first preset distance.

[0048] As can be seen from the foregoing, in order to reduce the performance overhead caused by special effect generation, the present invention determines the target position based on the first position of the game model in the current frame game screen and the second position in the historical frame game screen. It can be understood that in some embodiments, the determination of the target position can be based on the flight trajectory characteristics of the game model, pre-set an interval distance, and complete the determination of the target position by starting from the initial position of the game model and determining a target position every interval of the interval distance.

[0049] For example, in the embodiment of the present disclosure, taking the game model as a cannonball model, when the flight trajectory of the cannonball model is as follows: Figure 2 As shown, when the flight process of the entire game model is regarded as a free fall motion trajectory, a first preset distance can be preset, for example, 1 meter, that is, a target position is determined for each 1 meter flight distance, and dense trajectory points are obtained. Since each trajectory point has position coordinates, flight speed and time information in Figure 2 All target positions are determined on the flight trajectory shown, and subsequent tailing special effects are rendered based on the determined target positions.

[0050] Please refer to Figure 3 , showing that in Figure 2 Schematic diagram of determining the target position in the flight trajectory. Figure 3As shown in the figure, the solid circle in the figure is the first position of the cannonball model in the current frame game screen and the second position in the historical frame game screen, and the flight point on the flight trajectory. The hollow circle is the target position determined based on the first position of the cannonball model in the current frame game screen and the second position in the historical frame game screen. It can be seen that starting from the above initial position and obtaining a target position at each interval of the above first preset distance, the obtained target position has at least the following two results: first, the obtained target position just coincides with the flight point on the flight trajectory, that is, the hollow circle and the solid circle in the figure coincide with each other; second, the obtained target position does not coincide with the flight point on the flight trajectory, that is, the hollow circle and the solid circle in the figure do not coincide with each other.

[0051] For the first case mentioned above, when the determined target position just coincides with the flight point on the flight trajectory, it means that the determined target position is exactly the position of the cannonball model in a certain frame of the game screen, and the target position is consistent with the flight trajectory of the cannonball model. Therefore, the first position or the second position corresponding to the flight point of the overlapping position can be directly determined as the above-mentioned target position, and the position coordinates corresponding to the target position are the position coordinates corresponding to the above-mentioned first position or the above-mentioned second position.

[0052] For the second case mentioned above, when the determined target position does not coincide with the flight point on the flight trajectory, it means that the determined target position is not the position of the cannonball model in a certain frame of the game screen, and the target position does not match the flight trajectory of the cannonball model and needs to be corrected. Then, it is necessary to redetermine the above target position based on the actual flight point near the target position, wherein the position coordinates corresponding to the re-determined target position can be calculated based on the position coordinates corresponding to the flight point near the target position. For example, the movement of the game model between the two flight points before and after the above target position can be regarded as uniformly accelerated motion, and the target position coordinates, target position speed, and flight direction of the target position corresponding to the corrected target position can be calculated through the position coordinates, flight speed, and flight direction of the two flight points before and after.

[0053] In an optional embodiment, the above step S204 may further include:

[0054] Step S402 , within a second preset distance from the virtual camera, taking the initial position as a starting point, and determining a target position based on the first position and the second position at intervals of the first preset distance.

[0055] Step S404, outside the second preset distance from the virtual camera, taking the second preset distance as a starting point and determining a target position based on the first position and the second position at intervals of a third preset distance.

[0056] It is understandable that when the game model is flying, it generally flies from a distance close to the player character to a distance far away. For the player's eyes, when the game model flies a certain distance, such as 100 meters, the trailing special effects of the game model in the game screen are not very clear, and whether the special effects are displayed finely does not make much difference to the player. Therefore, in the case where the flight position on the flight trajectory of the game model is deleted by the first preset distance to obtain the above-mentioned target position, the target position of the game model during flight can be further processed to reduce the performance overhead when the trailing special effects are generated.

[0057] Specifically, a second preset distance can be preset according to the flight characteristics of the game model. The second preset distance can be the distance between the flight position of the game model and the virtual camera in the game. The distance can be used to distinguish whether the flight distance of the game model has exceeded the visual range that the player can perceive. When the distance between the flight position of the game model and the virtual camera is within the second preset distance range, a target position is determined based on the first position and the second position at intervals of the first preset distance as described above. When the distance between the flight position of the game model and the virtual camera exceeds the second preset distance range, a target position is no longer determined based on the first position and the second position at intervals of the first preset distance as described above, but the target position is determined at an interval greater than the first preset distance. In this way, when the game model flies far, the number of target positions can be reduced, and the performance overhead when generating special effects can be reduced.

[0058] For example, in Figure 2 In the flight trajectory of the cannonball model shown, assuming that the player can no longer see the cannonball model clearly when the cannonball model flies out of 50 meters, the second preset distance can be set to 50 meters. Wherein, within the range of 50 meters, the target position is determined by determining a target position at each interval of the first preset distance, such as 1 meter; and outside the range of 50 meters, the target position is determined by determining a target position at each interval of the third preset distance, such as 1.5 meters. Wherein, it should be noted that the value of the third preset distance can also be a dynamically changing value. For example, the value of the third preset distance can be positively correlated with the number of the target positions. The more the number of the target positions, the farther the game model flies, and the greater the value of the third preset distance when determining the target position. For example, within 50 meters, a target position is determined at every interval of 1 meter, within 50 meters and within 100 meters, a target position is determined at every interval of 1.5 meters, and outside 100 meters, a target position is determined at every interval of 2 meters, and so on.

[0059] It is understood that after determining the target position, the target position coordinates and target object time information corresponding to the target position, the trailing special effect of the game model can be generated according to the target position. For example, according to the target position coordinates and target object time information corresponding to the target position, pre-set special effect parameters (such as the display radius, life cycle, duration of the special effect, etc. of the trailing), and special effect resources (such as special effect maps, materials, etc.), the trailing special effect of the final game model is generated.

[0060] Through the above steps, the method for displaying the trailing trajectory of the game model of the present invention, starting from the initial position of the game model and based on the distance between the flight position and the virtual camera, presets the first preset distance, the second preset distance, and the third preset distance to further delete the flight points on the flight trajectory of the game model, further optimizes the performance overhead when generating the trailing special effects of the game model, and reduces the hardware requirements for the terminal device.

[0061] According to an embodiment of the present disclosure, there is also provided an apparatus embodiment for implementing the method for displaying the trailing track of the game model. The apparatus provides a graphical user interface through a terminal device. The graphical user interface displays a game screen. Figure 4 is a structural diagram of a trailing track display device for a game model according to an embodiment of the present disclosure, such as Figure 4 As shown, the trailing track display device of the game model includes: an acquisition module 60, a determination module 62, a generation module 64 and a rendering module 66, wherein:

[0062] The acquisition module 60 is used to acquire the first position of the game model in the current frame game screen and the second position of the game model in the historical frame game screen when the game screen is refreshed, wherein the first position includes the first position coordinates and the first time information, and the second position includes the second position coordinates and the second time information;

[0063] A determination module 62, configured to determine at least one target position based on the first position and the second position, wherein the target position includes target position coordinates and target time information;

[0064] A generating module 64 is used to generate a corresponding triangular mesh according to the target position;

[0065] The rendering module 66 is used to render and display the trailing track of the game model in the current frame game screen based on the generated triangular mesh and preset special effect resources.

[0066] It should be noted that the above modules can be implemented by software or hardware. For example, for the latter, it can be implemented in the following ways: the above modules can be located in the same processor; or the above modules can be located in different processors in any combination.

[0067] It should be noted that the acquisition module 60, the determination module 62, the generation module 64 and the rendering module 66 correspond to steps S102 to S108 in the method embodiment, and the examples and application scenarios implemented by the modules and the corresponding steps are the same, but are not limited to the contents disclosed in the method embodiment. It should be noted that the modules as part of the device can be run in a computer terminal.

[0068] It should be noted that the optional or preferred implementation modes of this embodiment can refer to the relevant description in the method embodiment, which will not be repeated here.

[0069] The above-mentioned trailing trajectory display device of the game model may also include a processor and a memory. The above-mentioned acquisition module 60, determination module 62, generation module 64 and rendering module 66 are all stored in the memory as program units, and the processor executes the above-mentioned program units stored in the memory to realize the corresponding functions.

[0070] The processor includes a kernel, which retrieves the corresponding program unit from the memory. The kernel may be one or more. The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. The memory includes at least one memory chip.

[0071] According to an embodiment of the present disclosure, a computer-readable storage medium embodiment is also provided. Optionally, in this embodiment, the computer-readable storage medium includes a stored program, wherein when the program is executed, the device where the computer-readable storage medium is located is controlled to execute any of the above-mentioned methods for displaying the trailing track of a game model.

[0072] Optionally, in this embodiment, the computer-readable storage medium may be located in any one of the computer terminals in a computer terminal group in a computer network, or in any one of the mobile terminals in a mobile terminal group, and the computer-readable storage medium includes a stored program.

[0073] Optionally, when the program is running, the device where the computer-readable storage medium is located is controlled to perform the following functions: when the game screen is refreshed, obtain the first position of the game model in the current frame game screen and the second position in the historical frame game screen, wherein the first position includes first position coordinates and first time information, and the second position includes second position coordinates and second time information; determine at least one target position based on the first position and the second position, and the target position includes target position coordinates and target time information; generate a corresponding triangular mesh according to the target position; based on the generated triangular mesh and preset special effects resources, render and display the trailing trajectory of the game model in the current frame game screen.

[0074] According to an embodiment of the present disclosure, a processor embodiment is also provided. Optionally, in this embodiment, the processor is used to run a program, wherein when the program is run, any of the above-mentioned methods for displaying a trailing track of a game model is executed.

[0075] An embodiment of the present disclosure provides a terminal device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute any one of the above-mentioned methods for displaying a trailing trajectory of a game model.

[0076] The present disclosure also provides a computer program product, which, when executed on a data processing device, is suitable for executing a program that is initialized with the following method steps: when the game screen is refreshed, obtaining a first position of a game model in a current frame game screen and a second position in a historical frame game screen, wherein the first position includes a first position coordinate and a first time information, and the second position includes a second position coordinate and a second time information; determining at least one target position based on the first position and the second position, wherein the target position includes a target position coordinate and a target time information; generating a corresponding triangular mesh according to the target position; and rendering and displaying the trailing trajectory of the game model in the current frame game screen based on the generated triangular mesh and preset special effect resources.

[0077] The serial numbers of the above-mentioned embodiments of the present disclosure are only for description and do not represent the advantages or disadvantages of the embodiments.

[0078] In the above embodiments of the present disclosure, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0079] In the several embodiments provided in the present disclosure, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the above-mentioned units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.

[0080] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0081] In addition, each functional unit in each embodiment of the present disclosure may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0082] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable computer-readable storage medium. Based on this understanding, the technical solution of the present disclosure is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a computer-readable storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present disclosure. The aforementioned computer-readable storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or optical disk and other media that can store program codes.

[0083] The above is only a preferred embodiment of the present disclosure. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present disclosure. These improvements and modifications should also be regarded as the scope of protection of the present disclosure.

Claims

1. A method for displaying a trailing track of a game model, characterized in that: Providing a graphical user interface through a terminal device, wherein the graphical user interface displays a game screen, the method comprising: When the game screen is refreshed, a first position of the game model in the current frame game screen and a second position in the historical frame game screen are obtained, wherein the first position includes first position coordinates and first time information, and the second position includes second position coordinates and second time information; Determine at least one target position based on the first position and the second position, wherein the target position includes target position coordinates and target time information; According to the target position, a corresponding triangular mesh is generated; Based on the generated triangular mesh and the preset special effect resources, rendering and displaying the trailing track of the game model in the current frame game screen; Wherein, determining at least one of the target positions based on the first position and the second position includes: simplifying the first position and the second position to obtain at least one of the target positions.

2. The method according to claim 1, characterized in that The step of determining at least one target position based on the first position and the second position comprises: determining an initial position of the game model from the first position and the second position; The target position is determined based on the initial position, the first position, and the second position.

3. The method according to claim 2, characterized in that The step of determining the target position based on the initial position, the first position, and the second position includes: Taking the initial position as a starting point, a target position is determined based on the first position and the second position at intervals of a first preset distance.

4. The method according to claim 2, characterized in that: The step of determining the target position based on the initial position, the first position, and the second position includes: Within a second preset distance from the virtual camera, taking the initial position as a starting point, and determining a target position based on the first position and the second position at intervals of the first preset distance; Outside a second preset distance from the virtual camera, taking the second preset distance as a starting point and determining a target position based on the first position and the second position at intervals of a third preset distance; Wherein, the third preset distance is greater than the first preset distance.

5. The method according to claim 4, characterized in that The value of the third preset distance is positively correlated with the number of the target positions.

6. The method according to any one of claims 1 to 5, characterized in that: The step of determining at least one target position based on the first position and the second position comprises: If the target position coincides with the first position or the second position, determining the first position or the second position as the target position; If the target position does not coincide with the first position or the second position, the target position is determined according to the adjacent first position or the second position.

7. The method according to claim 6, characterized in that The triangular mesh is a cylindrical triangle strip.

8. The method according to claim 6, characterized in that Before the step of obtaining the first position of the game model in the current frame game screen and the second position of the game model in the historical frame game screen, the method further includes: During the flight of the game model, position information of the game model in each frame of the game screen is acquired and stored, wherein the position information includes a first position and a second position.

9. A device for displaying the trailing track of a game model, characterized in that: A graphical user interface is provided through a terminal device, wherein the graphical user interface displays a game screen, and the apparatus comprises: An acquisition module, used to acquire a first position of the game model in the current frame game screen and a second position of the game model in the historical frame game screen when the game screen is refreshed, wherein the first position includes a first position coordinate and a first time information, and the second position includes a second position coordinate and a second time information; a determination module, configured to determine at least one target position based on the first position and the second position, wherein the target position includes target position coordinates and target time information; A generation module, used for generating a corresponding triangular mesh according to the target position; A rendering module, used for rendering and displaying the trailing track of the game model in the current frame game screen based on the generated triangular mesh and preset special effect resources; The determination module is used to determine at least one of the target positions based on the first position and the second position by the following steps: simplifying the first position and the second position to obtain at least one of the target positions.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein when the program is executed, the device where the computer-readable storage medium is located is controlled to execute the method for displaying the trailing trajectory of a game model according to any one of claims 1 to 8.

11. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to run the computer program to execute the method for displaying a trailing trajectory of a game model as described in any one of claims 1 to 8.

Citation Information

Patent Citations

  • Trailing effect implementing method and device

    CN109646957A