Game Display Control Method, Device, Storage Medium, and Electronic Device
By adjusting the display size of virtual objects in shooting games to determine the distance from the observation points, the problem of poor performance of virtual bullet games is solved, achieving better game visual experience and processing efficiency.
Patent Information
- Application Number
- CN202210354149.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-02
- Publication Date
- 2025-07-04
- Estimated Expiration
- 2042-04-02
AI Technical Summary
In shooting games, the game performance is poor during the shooting process of virtual bullets, and it is impossible to effectively simulate the flight process of the bullets, which makes it difficult for players to observe.
By obtaining the position information of the target virtual object shot by the virtual shooting prop, determining the distance between it and the observation point corresponding to the current field of view, and adjusting the display size of the target virtual object according to the distance, including the magnification ratio and the display size, ensuring that the player can clearly observe the movement process of the virtual object.
It improves the game performance of virtual objects, enables players to observe the movement of virtual objects more clearly, and improves the visual experience and processing efficiency of the game.
Smart Images

Figure CN114642881B_ABST
Abstract
Description
Background Art
[0002] In shooting games, combat is usually carried out by controlling a virtual firearm prop to shoot virtual bullets. Therefore, simulating the shooting of virtual bullets in the game scene has become an important part of this type of game.
[0003] In related technologies, the shooting process of virtual bullets is usually simulated by using ray detection, that is, a ray is fired from the muzzle of the virtual firearm prop in the target direction. Regardless of the distance, as long as this ray intersects with virtual objects in the game scene, the virtual object is hit. Players cannot observe the flying process of the bullet, and the simulation effect of the virtual bullet during the shooting process is poor, unable to show the charm of firearm shooting.
[0004] In addition, in order to improve the simulation effect of virtual bullets, entity collision is also used in related technologies to simulate the shooting process of virtual bullets. Although this method simulates the flight of real bullets, due to the relatively fast flying speed of the bullets and the fact that the bullets cannot be observed after flying a certain distance, the game performance effect of virtual bullets is poor.
[0005] It should be noted that the information disclosed in the above background art section is only used to enhance the understanding of the background of the present disclosure, and thus may include information that does not constitute the prior art known to those of ordinary skill in the art. Summary of the Invention
[0006] The present disclosure provides a game display control method, a game display control device, a computer-readable storage medium, and an electronic device, thereby at least to some extent solving the problem of poor game performance of virtual bullets during the shooting process in related technologies.
[0007] Other features and advantages of the present disclosure will become apparent through the following detailed description, or be learned in part through the practice of the present disclosure.
[0008] According to a first aspect of the present disclosure, there is provided a game display control method. A graphical user interface is provided through a terminal device, and a game screen determined according to the current field of view range corresponding to a controlled virtual character is displayed on the graphical user interface. The controlled virtual character is controlled by the terminal device. The method includes: obtaining position information of a target virtual object shot by a virtual shooting prop located within the current field of view range, where the target virtual object is in a moving state; determining a distance between the target virtual object and an observation point corresponding to the current field of view range according to the position information of the target virtual object; and adjusting a display size of the target virtual object in the game screen according to the distance between the target virtual object and the observation point corresponding to the current field of view range.
[0009] In an exemplary embodiment of the present disclosure, adjusting the display size of the target virtual object in the game screen according to the distance between the target virtual object and the observation point corresponding to the current field of view includes: determining the magnification ratio of the target virtual object according to the distance between the target virtual object and the observation point corresponding to the current field of view; and adjusting the display size of the target virtual object in the game screen based on the magnification ratio of the target virtual object and the original display size of the target virtual object.
[0010] In an exemplary embodiment of the present disclosure, determining the magnification ratio of the target virtual object according to the distance between the target virtual object and the observation point corresponding to the current field of view includes: if the distance between the target virtual object and the observation point corresponding to the current field of view is less than a first threshold, configuring the magnification ratio of the target virtual object to 1; if the distance between the target virtual object and the observation point corresponding to the current field of view is greater than a second threshold, taking the preset maximum magnification ratio as the magnification ratio of the target virtual object, where the second threshold is greater than the first threshold; if the distance between the target virtual object and the observation point corresponding to the current field of view is greater than the first threshold and less than the second threshold, determining the magnification ratio of the target virtual object according to the preset maximum magnification ratio, the first threshold, the second threshold, and the distance between the target virtual object and the observation point corresponding to the current field of view.
[0011] In an exemplary embodiment of the present disclosure, determining the magnification ratio of the target virtual object according to the preset maximum magnification ratio, the first threshold, the second threshold, and the distance between the target virtual object and the observation point corresponding to the current field of view includes: taking the difference between the distance between the target virtual object and the observation point corresponding to the current field of view and the first threshold as a first difference, and taking the difference between the second threshold and the first threshold as a second difference; and determining the magnification ratio of the target virtual object according to the ratio of the first difference to the second difference and the preset maximum magnification ratio.
[0012] In an exemplary embodiment of the present disclosure, the method further includes: determining a hit detection method of the target virtual object based on the current movement distance of the target virtual object; detecting whether the target virtual object hits based on the hit detection method of the target virtual object; and if the target virtual object hits, adjusting the target virtual object from a moving state to a non-moving state in the game screen.
[0013] In an exemplary embodiment of the present disclosure, if the target virtual object is shot by a virtual shooting prop controlled by another virtual character in the game scene, the method further includes: judging whether the target virtual object passes by the controlled virtual character corresponding to the current field of view according to the distance between the target virtual object and the observation point corresponding to the current field of view; if the target virtual object passes by the controlled virtual character corresponding to the current field of view, displaying shooting prompt information corresponding to the target virtual object in the game screen.
[0014] In an exemplary embodiment of the present disclosure, the target virtual object is extracted from the virtual object entity cache after being shot, and the target virtual object is stored in the virtual object entity cache after the shooting is completed.
[0015] According to a second aspect of the present disclosure, there is provided a game display control device which provides a graphical user interface through a terminal device. The graphical user interface displays a game screen determined according to the current field of view corresponding to a controlled virtual character, and the controlled virtual character is controlled by the terminal device. The device includes: a position acquisition module for acquiring position information of a target virtual object shot by a virtual shooting prop within the current field of view, the target virtual object being in a moving state; a distance determination module for determining the distance between the target virtual object and the observation point corresponding to the current field of view according to the position information of the target virtual object; and a display control module for adjusting the display size of the target virtual object in the game screen according to the distance between the target virtual object and the observation point corresponding to the current field of view.
[0016] According to a third aspect of the present disclosure, there is provided a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the above-mentioned game display control method is implemented.
[0017] According to a fourth aspect of the present disclosure, there is provided an electronic device including: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to execute the above-mentioned game display control method by executing the executable instructions.
[0018] The technical solution of the present disclosure has the following beneficial effects:
[0019] Obtain the position information of the target virtual object shot by the virtual shooting prop within the current field of view, where the target virtual object is in a moving state; determine the distance between the target virtual object and the observation point corresponding to the current field of view according to the position information of the target virtual object; adjust the display size of the target virtual object according to the distance between the target virtual object and the observation point corresponding to the current field of view. On the one hand, by establishing a connection between the virtual object in a moving state and the observation point, the present disclosure adjusts the display size of the virtual object, which can avoid the influence on the player's observation due to the virtual object moving too fast in the game scene, enabling the player to more clearly observe the movement process of the virtual object, thereby improving the game performance effect of the virtual object in a moving state. On the other hand, taking the current field of view as a unit, the present disclosure can simultaneously process the rendering effects of multiple virtual objects in a moving state to ensure the processing efficiency.
[0020] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and cannot limit the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] The accompanying drawings herein are incorporated into the specification and constitute a part of this specification, showing embodiments consistent with the present disclosure and used together with the specification to explain the principles of the present disclosure. Obviously, the accompanying drawings in the following description are only some embodiments of the present disclosure, and those of ordinary skill in the art can obtain other drawings based on these drawings without creative efforts.
[0022] Figure 1 Show a flowchart of a game display control method in this exemplary embodiment;
[0023] Figure 2 Show an example diagram of a distance model in this exemplary embodiment;
[0024] Figure 3 Show a flowchart of adjusting the display size of the target virtual object in this exemplary embodiment;
[0025] Figure 4 Show a structural block diagram of a game display control device in this exemplary embodiment;
[0026] Figure 5 Show an electronic device for implementing the above game display control method in this exemplary embodiment. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0027] Example embodiments will now be described more fully with reference to the accompanying drawings. However, the example embodiments can be implemented in various forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of the example embodiments to those skilled in the art. The features, structures, or characteristics described may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of the embodiments of the present disclosure. However, those skilled in the art will recognize that the technical solutions of the present disclosure may be practiced without one or more of the specific details, or may be implemented using other methods, components, devices, steps, etc. In other instances, well-known technical solutions are not shown or described in detail to avoid obscuring aspects of the present disclosure.
[0028] In addition, the accompanying drawings are only schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and thus repeated descriptions thereof will be omitted. Some of the block diagrams shown in the drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities may be implemented in software, or in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.
[0029] In this document, "first", "second", etc. are labels for specific objects and do not limit the quantity or order of the objects.
[0030] In the related art, when simulating the shooting process of a virtual bullet by means of entity collision, the virtual bullet is shot out from the muzzle of a virtual firearm prop in the target direction, and then the virtual bullet flies in the target direction in the game scene until it hits a virtual object in the game scene. From the perspective of the player, the farther the virtual bullet flies, the smaller it becomes. Although this method simulates the flight of a real bullet, due to the relatively fast flight speed of the bullet and the fact that it cannot be observed after flying a certain distance, the game performance effect of the virtual bullet is affected.
[0031] In view of one or more of the above problems, the exemplary embodiments of the present disclosure provide a game display control method that can be applied to first-person shooting games and can improve the game performance effect of virtual bullets in such games. Among them, first-person shooting games belong to a branch of action games and are shooting games from the subjective perspective of the player.
[0032] In one embodiment of the present disclosure, the game display control method can be run on a local terminal device or a server. When the game display control method is run on a server, the game display control method can be implemented and executed based on a cloud interaction system, wherein the cloud interaction system includes a server and a client device.
[0033] In an optional implementation, various cloud applications, such as cloud games, can be run under the cloud interaction system. 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 running body of the game program and the game screen presentation body are separated. The storage and operation of the game display control method are completed on the cloud game server. 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 performs the game display control. 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.
[0034] 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.
[0035] Figure 1 A game display control method in this exemplary embodiment is shown, where a graphical user interface is provided by a terminal device, and a game screen determined according to the current field of view corresponding to a controlled virtual character is displayed on the graphical user interface. The controlled virtual character is controlled by the terminal device, and specifically includes the following steps S110 to S130:
[0036] Step S110, obtaining position information of a target virtual object shot by a virtual shooting prop within the current field of view, wherein the target virtual object is in motion;
[0037] Step S120: Determine the distance between the target virtual object and the observation point corresponding to the current field of view based on the position information of the target virtual object.
[0038] Step S130: Adjust the display size of the target virtual object in the game screen according to the distance between the target virtual object and the observation point corresponding to the current field of view.
[0039] Figure 1 In the steps shown above, on the one hand, the present disclosure establishes a connection between the virtual object in a moving state and the observation point to adjust the display size of the virtual object, which can avoid the situation that the player's observation is affected due to the virtual object moving too fast in the game scene, enabling the player to more clearly observe the movement process of the virtual object, thereby improving the game performance effect of the virtual object in a moving state. On the other hand, taking the current field of view as a unit, the present disclosure can simultaneously process the rendering effects of multiple virtual objects in a moving state to ensure the processing efficiency.
[0040] The following will separately Figure 1 describe each step in detail.
[0041] Step S110: Obtain the position information of the target virtual object shot by the virtual shooting prop within the current field of view, and the target virtual object is in a moving state.
[0042] The current field of view refers to the range of the game scene that can be currently presented in the graphical user interface of the terminal device where the controlled virtual character is located. The target virtual object is shot by a virtual shooting prop in the game scene and is in a moving state. For example, a virtual bullet in a flying state. Here, the virtual bullet refers to a realistic bullet in the game scene, which can be activated by a virtual firearm prop through a shooting operation, and the activated virtual bullet can fly in the game scene. It should be noted that when the target virtual object is a virtual bullet, the virtual bullet can be a self-luminous virtual model without a light source, that is, the virtual bullet will emit light during operation, but this light will not illuminate the game scene around the virtual bullet, so that the light emitted by the real bullet during flight can be simulated, and the system overhead will not be too large due to the need to process complex light reflections in the game scene. The position information of the target virtual object refers to the position where the target virtual object is currently located in the game scene.
[0043] In an optional implementation manner, after the target virtual object is shot, it can be extracted from the virtual object entity cache, and after the shooting of the target virtual object is completed, it can be stored in the virtual object entity cache.
[0044] Specifically, after the target virtual object is shot out from the virtual shooting prop, a virtual object entity can be extracted from the virtual object entity cache as the target virtual object. If there is no cached virtual object entity in the virtual object entity cache, a virtual object entity can be created in the virtual object entity cache for extraction. After the target virtual object is shot, it can be stored in the virtual object entity cache for reuse.
[0045] Taking the virtual bullet as an example, an implementation process for the creation, extraction, and storage of the virtual bullet entity can be described as follows:
[0046] Creation of the virtual bullet entity: Create a class named Bullet and a cache named BulletPoll for each virtual bullet. Each Bullet has a type, which is recorded on the Bullet and represented by Bullet.category. There are many queues in BulletPool, which are managed by a dictionary and can be represented as BulletPool.Dict.
[0047] Extraction of the virtual bullet entity: The virtual bullet entity can be extracted through the pseudocode "b = BulletPool.Borrow(c)".
[0048] Among them, c is the virtual bullet type, b is the extracted virtual bullet, Borrow represents the virtual bullet extraction, and the process of virtual bullet extraction can be specifically represented by the following pseudocode:
[0049] If BulletPool.Dict[c].IsNotEmpty():
[0050] return BulletPool.Dict[c].PopAnyOne
[0051] return CreateNewBullet()
[0052] The specific meaning of this section of pseudocode is: If there is a virtual bullet of type c in the virtual bullet entity cache, then extract a virtual bullet of type c from the virtual bullet entity cache; otherwise, create a new virtual bullet of type c.
[0053] Storage of the virtual bullet entity: The virtual bullet b can be stored in the virtual bullet entity cache through the pseudocode "BulletPool.GiveBack(b)".
[0054] GiveBack represents the virtual bullet storage, and the process of virtual bullet storage can be specifically represented by the following pseudocode:
[0055] BulletPool.Dict[b.category].append(b)
[0056] The specific meaning of this pseudo code is: according to the type of virtual bullet b, the virtual bullet is stored in the virtual bullet queue.
[0057] Step S120, determining the distance between the target virtual object and the observation point corresponding to the current field of view according to the position information of the target virtual object.
[0058] The observation point corresponding to the current field of view refers to the observation point of the current field of view in the game scene, and the game screen observed from the observation point can be displayed in the graphical user interface of the terminal device. Through the position information of the target virtual object and the position of the observation point corresponding to the current field of view in the game scene, the distance between the target virtual object and the observation point corresponding to the current field of view can be measured.
[0059] The target virtual object and the observation point corresponding to the current field of view can form the following Figure 2 The distance model shown in the figure, where the triangle icon 201 represents the observation point corresponding to the current field of view, the solid line 202 represents the boundary range of the current field of view, and the dotted line 203 represents the distance between the target virtual object 204 and the observation point. It should be noted that the current field of view may contain one or more target virtual objects, and the number of target virtual objects is mainly determined by the specific game battle situation. Figure 2 The target virtual objects are only shown for illustrative purposes.
[0060] Step S130, adjusting the display size of the target virtual object in the game screen according to the distance between the target virtual object and the observation point corresponding to the current field of view.
[0061] The display size of the target virtual object refers to the display size of the target virtual object in the graphical user interface.
[0062] Take virtual bullets as an example. After being fired, virtual bullets usually fly in the game scene at a very fast speed. From the player's perspective, the farther the virtual bullet flies, the smaller it becomes. Since the virtual bullet itself is relatively small for the entire game scene, it is difficult to observe when it flies beyond a certain distance. By adjusting the display size of virtual bullets, the game performance of virtual bullets can be improved, so as to better show players the exciting and exciting scenes of gunfire and rain of bullets.
[0063] In an optional implementation, in the above step S130, the display size of the target virtual object is adjusted in the game screen according to the distance between the target virtual object and the observation point corresponding to the current field of view, which can be achieved byFigure 3 It is generated by the steps shown below, specifically including the following steps S310 to S320:
[0064] Step S310: Determine the magnification ratio of the target virtual object according to the distance between the target virtual object and the observation point corresponding to the current field of view.
[0065] Step S320: Adjust the display size of the target virtual object in the game screen based on the magnification ratio of the target virtual object and the original display size of the target virtual object.
[0066] Figure 3 In the steps shown below, by adaptively magnifying the target virtual object on its original display size, players can better observe the target virtual object in motion, which can, to a certain extent, alleviate the problem of poor game performance of the target virtual object in motion.
[0067] It should be noted that the magnification ratio of the target virtual object may be different at different game times, and the specific magnification ratio adopted is related to the distance between the target virtual object and the observation point corresponding to the current field of view.
[0068] Specifically, in step S310, determine the magnification ratio of the target virtual object according to the distance between the target virtual object and the observation point corresponding to the current field of view.
[0069] The magnification ratio of the target virtual object refers to the magnification ratio of the display size of the target virtual object in the game screen. The magnification ratio of the target virtual object is not fixed and can change with the movement of the target virtual object.
[0070] In an optional implementation, in step S310, determine the magnification ratio of the target virtual object according to the distance between the target virtual object and the observation point corresponding to the current field of view, which can be specifically implemented in the following way: If the distance between the target virtual object and the observation point corresponding to the current field of view is less than the first threshold, configure the magnification ratio of the target virtual object as 1; If the distance between the target virtual object and the observation point corresponding to the current field of view is greater than the second threshold, then use the preset maximum magnification ratio as the magnification ratio of the target virtual object, where the second threshold is greater than the first threshold; If the distance between the target virtual object and the observation point corresponding to the current field of view is greater than the first threshold and less than the second threshold, then determine the magnification ratio of the target virtual object according to the preset maximum magnification ratio, the first threshold, the second threshold, and the distance between the target virtual object and the observation point corresponding to the current field of view.
[0071] In the above process, by taking the first threshold as the distance at which the scaling change of the original display size of the target virtual object starts, and the second threshold as the distance at which the scaling change of the original display size of the target virtual object ends, the magnification ratio of the target virtual object is divided into three cases, which are described below respectively.
[0072] If the distance between the target virtual object and the observation point corresponding to the current viewing range is less than the first threshold, the magnification ratio of the target virtual object is configured to 1, that is, the target virtual object is kept at the original display size without magnification. In this case, since the target virtual object is relatively close to the observation point and is easily observable by the player, the target virtual object may not be magnified, so as to reduce the processing overhead to a certain extent.
[0073] If the distance between the target virtual object and the observation point corresponding to the current viewing range is greater than the second threshold, the preset maximum magnification ratio is taken as the magnification ratio of the target virtual object. The preset magnification ratio refers to the maximum magnification ratio allowed for the original display size of the virtual object, which can be determined in advance by developers through testing. In this case, the magnification ratio of the target virtual object is fixed. When the target virtual object moves away from the observation point, from the perspective of the player, the target virtual object will still become smaller and smaller, which conforms to the "reality" recognized by the player.
[0074] If the distance between the target virtual object and the observation point corresponding to the current viewing range is greater than the first threshold and less than the second threshold, in an optional implementation manner, the above determination of the magnification ratio of the target virtual object according to the preset maximum magnification ratio, the first threshold, the second threshold, and the distance between the target virtual object and the observation point corresponding to the current viewing range can be implemented in the following way: taking the difference between the distance between the target virtual object and the observation point corresponding to the current viewing range and the first threshold as the first difference, and taking the difference between the second threshold and the first threshold as the second difference; determining the magnification ratio of the target virtual object according to the ratio of the first difference to the second difference and the preset maximum magnification ratio. Exemplarily, the magnification ratio Scale of the target virtual object can be obtained by calculating Scale=(vd–min) / (max-min)*maxScale, so that there is a smooth transition between the magnification ratio of the target virtual object from 1 to the preset maximum magnification ratio, and the abrupt change of the display size of the target virtual object is avoided. Where (vd–min) is the first difference mentioned above, (max-min) is the second difference mentioned above, vd here represents the distance between the target virtual object and the observation point corresponding to the current viewing range, min represents the first threshold, max represents the second threshold, and maxScale represents the preset maximum magnification ratio.
[0075] It should be noted that when the distance between the target virtual object and the observation point corresponding to the current field of view is the first threshold, the magnification ratio of the target virtual object can be configured to 1, or the magnification ratio of the target virtual object can be determined according to the preset maximum magnification ratio, the first threshold, the second threshold, and the distance between the target virtual object and the observation point corresponding to the current field of view. No specific limitation is made here. When the distance between the target virtual object and the observation point corresponding to the current field of view is the second threshold, the preset maximum magnification ratio can be used as the magnification ratio of the target virtual object, or the magnification ratio of the target virtual object can be determined according to the preset maximum magnification ratio, the first threshold, the second threshold, and the distance between the target virtual object and the observation point corresponding to the current field of view. No specific limitation is made here.
[0076] Specifically, in step S320, based on the magnification ratio of the target virtual object and the original display size of the target virtual object, the display size of the target virtual object is adjusted in the game screen.
[0077] The original display size of the target virtual object refers to the display size corresponding to the target virtual object when simulating the movement of a real object in the game scene.
[0078] Taking a virtual bullet as an example, from the perspective of the player, when the virtual bullet is displayed according to the original display size, as the virtual bullet flies farther and farther, the virtual bullet will look smaller and smaller. When the virtual bullet flies beyond a certain distance, the player will not be able to observe the virtual bullet. Using Figure 3 the segmented display size processing method shown can better ensure the observation experience of the virtual bullet.
[0079] In an optional implementation manner, after obtaining the position information of the target virtual object shot by the virtual shooting prop within the current field of view, the current movement distance of the target virtual object can also be determined according to the position information of the target virtual object. After determining the current movement distance of the target virtual object, the hit detection method of the target virtual object can also be determined based on the current movement distance of the target virtual object; based on the hit detection method of the target virtual object, it is detected whether the target virtual object hits; if the target virtual object hits, the target virtual object is adjusted from the moving state to the non-moving state in the game screen.
[0080] In the above process, determining the hit detection method of the target virtual object based on the movement distance of the target virtual object can achieve flexible switching of the hit detection method, so as to reduce the processing pressure of the processor as much as possible while ensuring the display effect of the target virtual object.
[0081] The hit detection method can be one of the entity collision detection method and the ray collision detection method. Exemplarily, if the current movement distance of the target virtual object is greater than the third threshold, the entity collision detection method is used as the hit detection method of the target virtual object; if the current movement distance of the target virtual object is less than the third threshold, the ray collision detection method is used as the hit detection method of the target virtual object. Among them, the third threshold can be set to the same value as the first threshold.
[0082] In a short distance range, there is little difference in the visual perception for players between determining whether the target virtual object hits by ray collision and by entity collision. Since in the actual application process, compared with entity collision, using ray collision to determine whether the target virtual object hits is more concise. Therefore, within a certain initial distance of shooting the target virtual object, using ray collision to determine whether the target virtual object hits can reduce the development cost to a certain extent.
[0083] When the third threshold is the same as the first threshold, since when the distance between the target virtual object and the observation point corresponding to the current field of view is less than the first threshold, the original display size of the target virtual object is not scaled, and in this case, there is no change in the visual perception of the player. Therefore, by using the first threshold as the demarcation distance for determining whether the target virtual object hits in different ways, the development cost can be reduced to the greatest extent.
[0084] In an alternative implementation, if the target virtual object is shot by a virtual shooting prop controlled by other virtual characters in the game scene, it is also possible to determine whether the target virtual object passes by the controlled virtual character corresponding to the current field of view according to the distance between the target virtual object and the observation point corresponding to the current field of view; if the target virtual object passes by the controlled virtual character corresponding to the current field of view, the shooting prompt information corresponding to the target virtual object is displayed in the game screen.
[0085] The shooting prompt information can be an icon label, which can be used to prompt the player that the controlled virtual character is currently under attack.
[0086] Exemplarily, if the distance between the target virtual object and the observation point corresponding to the current field of view is less than the fourth threshold, the target virtual object passes by the controlled virtual character corresponding to the current field of view. Among them, the fourth threshold can be set according to the actual application situation and is not specifically limited here.
[0087] In the above process, based on the distance between the target virtual object and the observation point corresponding to the current field of view, it is determined whether the target virtual object passes by the player. Compared with the existing method of detecting whether the target virtual object passes by the player through ray detection, the system overhead is smaller.
[0088] It should be noted that the existing method of detecting whether a target virtual object passes by a controlled virtual character through ray detection belongs to a physical detection method, which is generally implemented in the following way: when the target virtual object moves in each frame, a ray needs to be emitted from its current position towards the controlled virtual character corresponding to the current field of view, and it is determined whether the ray hits the controlled virtual character, so as to determine whether the target virtual object passes by the player, resulting in a large communication overhead.
[0089] An exemplary embodiment of the present disclosure further provides a game display control device. A graphical user interface is provided through a terminal device, and a game screen determined according to the current field of view corresponding to the controlled virtual character is displayed on the graphical user interface. The controlled virtual character is controlled by the terminal device, such as Figure 4 shown, the game display control device 400 may include:
[0090] A position acquisition module 410, configured to acquire the position information of a target virtual object shot by a virtual shooting prop within the current field of view, and the target virtual object is in a moving state;
[0091] A distance determination module 420, configured to determine the distance between the target virtual object and the observation point corresponding to the current field of view according to the position information of the target virtual object;
[0092] A display control module 430, configured to adjust the display size of the target virtual object in the game screen according to the distance between the target virtual object and the observation point corresponding to the current field of view.
[0093] In an optional embodiment, the display control module 430 may include: a magnification ratio determination module, configured to determine the magnification ratio of the target virtual object according to the distance between the target virtual object and the observation point corresponding to the current field of view; a display size adjustment module, configured to adjust the display size of the target virtual object in the game screen based on the magnification ratio of the target virtual object and the original display size of the target virtual object.
[0094] In an alternative embodiment, the magnification ratio determination module may include: a first ratio determination module configured to configure the magnification ratio of the target virtual object as 1 if the distance between the target virtual object and the observation point corresponding to the current field of view is less than a first threshold; a second ratio determination module configured to use the preset maximum magnification ratio as the magnification ratio of the target virtual object if the distance between the target virtual object and the observation point corresponding to the current field of view is greater than a second threshold, where the second threshold is greater than the first threshold; and a third ratio determination module configured to determine the magnification ratio of the target virtual object based on the preset maximum magnification ratio, the first threshold, the second threshold, and the distance between the target virtual object and the observation point corresponding to the current field of view if the distance between the target virtual object and the observation point corresponding to the current field of view is greater than the first threshold and less than the second threshold.
[0095] In an alternative embodiment, the third ratio determination module may be configured to: use the difference between the distance between the target virtual object and the observation point corresponding to the current field of view and the first threshold as a first difference value, and use the difference between the second threshold and the first threshold as a second difference value; and determine the magnification ratio of the target virtual object based on the ratio of the first difference value to the second difference value and the preset maximum magnification ratio.
[0096] In an alternative embodiment, the game display control device 400 may further include: a detection method determination module configured to determine the hit detection method of the target virtual object based on the current movement distance of the target virtual object; a hit detection module configured to detect whether the target virtual object is hit based on the hit detection method of the target virtual object; and a motion state adjustment module configured to adjust the target virtual object from a motion state to a non-motion state in the game screen if the target virtual object is hit.
[0097] In an alternative embodiment, if the target virtual object is shot by a virtual shooting prop controlled by another virtual character in the game scene, the game display control device 400 may further include: a judgment module configured to judge whether the target virtual object passes by the controlled virtual character corresponding to the current field of view according to the distance between the target virtual object and the observation point corresponding to the current field of view; and an information prompt module configured to display the shooting prompt information corresponding to the target virtual object in the game screen if the target virtual object passes by the controlled virtual character corresponding to the current field of view.
[0098] In an alternative embodiment, in the game display control device 400, the target virtual object is extracted from the virtual object entity cache after being shot, and is stored in the virtual object entity cache after the shooting of the target virtual object is completed.
[0099] The specific details of each part in the above game display control device 400 have been described in detail in the implementation manners of the method part. For the details not disclosed, please refer to the implementation manners in the method part, and thus will not be elaborated herein.
[0100] The exemplary embodiments of the present disclosure also provide a computer-readable storage medium, on which a program product capable of implementing the above game display control method in this specification is stored. In some possible implementation manners, various aspects of the present disclosure can also be implemented in the form of a program product, which includes program code. When the program product runs on an electronic device, the program code is used to cause the electronic device to execute the steps according to various exemplary embodiments of the present disclosure described in the above "Exemplary Method" part of this specification. The program product can be a portable compact disc read-only memory (CD-ROM) and includes program code, and can run on an electronic device, such as a personal computer. However, the program product of the present disclosure is not limited thereto. In this document, the readable storage medium can be any tangible medium that contains or stores a program, and the program can be used by or in combination with an instruction execution system, apparatus, or device.
[0101] The program product can adopt any combination of one or more readable media. The readable media can be a readable signal medium or a readable storage medium. The readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0102] The computer-readable signal medium can include a data signal propagated in a baseband or as part of a carrier wave, which carries the readable program code. Such a propagated data signal can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The readable signal medium can also be any readable medium other than the readable storage medium, and the readable medium can send, propagate, or transmit a program for use by or in combination with an instruction execution system, apparatus, or device.
[0103] The program code included on the readable medium can be transmitted by any suitable medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the above.
[0104] Program code for performing the operations of the present disclosure can be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, etc., and also including conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computing device, partially on the user's device, executed as a stand-alone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device can be connected to the user's computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (e.g., by connecting through the Internet using an Internet service provider).
[0105] Exemplary embodiments of the present disclosure also provide an electronic device capable of implementing the above game display control method. The following will refer to Figure 5 to describe the electronic device 500 according to such an exemplary embodiment of the present disclosure. Figure 5 The illustrated electronic device 500 is merely an example and should not impose any limitations on the functions and scope of use of the embodiments of the present disclosure.
[0106] As Figure 5 shown, the electronic device 500 can be presented in the form of a general-purpose computing device. The components of the electronic device 500 can include, but are not limited to: at least one processing unit 510, at least one storage unit 520, a bus 530 connecting different system components (including the storage unit 520 and the processing unit 510), and a display unit 540.
[0107] The storage unit 520 stores program code, which can be executed by the processing unit 510, so that the processing unit 510 executes the steps according to various exemplary embodiments of the present disclosure described in the above "Exemplary Method" section of this specification. For example, the processing unit 510 can execute Figure 1 , Figure 3 any one or more of the method steps.
[0108] The storage unit 520 can include a readable medium in the form of a volatile storage unit, such as a random access storage unit (RAM) 521 and / or a cache storage unit 522, and can further include a read-only storage unit (ROM) 523.
[0109] The storage unit 520 may also include a program / utilities 524 having a set (at least one) of program modules 525. Such program modules 525 include, but are not limited to: an operating system, one or more application programs, other program modules, and program data. Each or some combination of these examples may include an implementation of a network environment.
[0110] The bus 530 may represent one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus structures.
[0111] The electronic device 500 may also communicate with one or more external devices 600 (such as a keyboard, a pointing device, a Bluetooth device, etc.), may also communicate with one or more devices that enable a user to interact with the electronic device 500, and / or may communicate with any device that enables the electronic device 500 to communicate with one or more other computing devices (such as a router, a modem, etc.). Such communication may be carried out through an input / output (I / O) interface 550. Also, the electronic device 500 may communicate with one or more networks (such as a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) through a network adapter 560. As shown in the figure, the network adapter 560 communicates with other modules of the electronic device 500 through the bus 530. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 500, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, etc.
[0112] Through the description of the above embodiments, those skilled in the art can easily understand that the exemplary embodiments described herein can be implemented by software, or can be implemented by a combination of software and necessary hardware. Therefore, the technical solutions according to the embodiments of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the exemplary embodiments of the present disclosure.
[0113] In addition, the above drawings are only schematic illustrations of the processes included in the method according to the exemplary embodiments of the present disclosure, rather than for limiting purposes. It is easy to understand that the processes shown in the above drawings do not indicate or limit the time sequence of these processes. Additionally, it is also easy to understand that these processes may be executed synchronously or asynchronously in, for example, multiple modules.
[0114] It should be noted that although several modules or units of the device for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the exemplary embodiments of the present disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.
[0115] Those skilled in the art can understand that various aspects of the present disclosure can be implemented as a system, a method, or a program product. Therefore, various aspects of the present disclosure can be specifically implemented in the following forms, namely: a complete hardware implementation, a complete software implementation (including firmware, microcode, etc.), or an implementation combining hardware and software aspects, which can be collectively referred to as "circuitry", "module", or "system" here. After considering the specification and practicing the invention disclosed herein, those skilled in the art will readily conceive of other embodiments of the present disclosure. This application is intended to cover any variations, uses, or adaptations of the present disclosure, which follow the general principles of the present disclosure and include well-known common general knowledge or conventional technical means in the technical field not disclosed in the present disclosure. The specification and embodiments are only regarded as exemplary, and the true scope and spirit of the present disclosure are pointed out by the claims.
[0116] It should be understood that the present disclosure is not limited to the exact structures already described and shown in the drawings, and various modifications and changes can be made without departing from its scope. The scope of the present disclosure is only defined by the appended claims.
Claims
1. A game display control method, characterized in that Providing a graphical user interface through a terminal device, on which a game screen determined according to the current field of view range corresponding to a controlled virtual character is displayed, and the controlled virtual character is controlled by the terminal device. The method includes: Obtaining the position information of a target virtual object shot by a virtual shooting prop within the current field of view range, and the target virtual object is in a moving state; Determining the distance between the target virtual object and the observation point corresponding to the current field of view range according to the position information of the target virtual object; If the distance between the target virtual object and the observation point corresponding to the current field of view range is less than a first threshold, configuring the magnification ratio of the target virtual object to 1; If the distance between the target virtual object and the observation point corresponding to the current field of view range is greater than a second threshold, then taking the preset maximum magnification ratio as the magnification ratio of the target virtual object, where the second threshold is greater than the first threshold; If the distance between the target virtual object and the observation point corresponding to the current field of view range is greater than the first threshold and less than the second threshold, then taking the difference between the distance between the target virtual object and the observation point corresponding to the current field of view range and the first threshold as a first difference, and taking the difference between the second threshold and the first threshold as a second difference; determining the magnification ratio of the target virtual object according to the ratio of the first difference to the second difference and the preset maximum magnification ratio; Adjusting the display size of the target virtual object in the game screen based on the magnification ratio of the target virtual object and the original display size of the target virtual object.
2. The method according to claim 1, wherein The method further includes: Determining the hit detection method of the target virtual object based on the current movement distance of the target virtual object; Detecting whether the target virtual object hits based on the hit detection method of the target virtual object; If the target virtual object hits, then adjusting the target virtual object from a moving state to a non-moving state in the game screen.
3. The method according to claim 1, wherein If the target virtual object is shot by a virtual shooting prop controlled by another virtual character in the game scene, the method further includes: Judging whether the target virtual object passes by the controlled virtual character corresponding to the current field of view range according to the distance between the target virtual object and the observation point corresponding to the current field of view range; If the target virtual object passes by the controlled virtual character corresponding to the current field of view range, then displaying the shooting prompt information corresponding to the target virtual object in the game screen.
4. The method according to claim 1, wherein The target virtual object is extracted from the virtual object entity cache after being shot, and is stored in the virtual object entity cache after the shooting of the target virtual object is completed.
5. A game display control device, characterized in that, Providing a graphical user interface through a terminal device, on which a game screen determined according to the current field of view range corresponding to a controlled virtual character is displayed, and the controlled virtual character is controlled by the terminal device. The device includes: A position acquisition module, configured to acquire the position information of a target virtual object shot by a virtual shooting prop within the current field of view, where the target virtual object is in a moving state; A distance determination module, configured to determine the distance between the target virtual object and the observation point corresponding to the current field of view according to the position information of the target virtual object; A magnification ratio determination module, configured to, if the distance between the target virtual object and the observation point corresponding to the current field of view is less than a first threshold, configure the magnification ratio of the target virtual object to be 1; if the distance between the target virtual object and the observation point corresponding to the current field of view is greater than a second threshold, use the preset maximum magnification ratio as the magnification ratio of the target virtual object, where the second threshold is greater than the first threshold; if the distance between the target virtual object and the observation point corresponding to the current field of view is greater than the first threshold and less than the second threshold, use the difference between the distance between the target virtual object and the observation point corresponding to the current field of view and the first threshold as a first difference, and use the difference between the second threshold and the first threshold as a second difference; determine the magnification ratio of the target virtual object according to the ratio of the first difference to the second difference and the preset maximum magnification ratio; A display size adjustment module, configured to adjust the display size of the target virtual object in the game screen based on the magnification ratio of the target virtual object and the original display size of the target virtual object.
6. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method according to any one of claims 1 to 4.
7. An electronic device, characterized in that, Comprising: A processor; And A memory, configured to store executable instructions of the processor; Wherein, the processor is configured to execute the method according to any one of claims 1 to 4 by executing the executable instructions.