Game scene display control method and device, electronic device, and storage medium
By responding to perspective switching in the game scene display control method, optimizing the display of map elements and special effects solves the problem of high performance requirements for multiplayer online RPG game scene details and special effects restoration on mobile terminals, and achieves improvements in fluency and clarity. .
Patent Information
- Application Number
- CN202110581769.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-05-26
- Publication Date
- 2024-08-23
- Estimated Expiration
- 2041-05-26
AI Technical Summary
When fully restoring the scene details and special effects of a multiplayer online RPG game on a mobile terminal, the performance requirements are too high and it is difficult to achieve a smooth display effect.
In the game scene display control method, the target perspective is determined in response to the perspective switching instruction triggered by the user interface, and the corresponding map elements and special effects are displayed or hidden according to the target perspective, divided into the first perspective and the second perspective, and the display content is optimized to Improve performance smoothness.
It retains the richness of details in the first perspective and hides details in the second perspective, improving performance fluency and clarity of information recognition, and solving the problem of tight mobile terminal performance.
Smart Images

Figure CN113318441B
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing technology, and in particular to a display control method and device for a game scene, an electronic device, and a computer-readable storage medium. Background Art
[0002] At present, with the popularization of various large-screen intelligent mobile communication terminals and the development of wireless network technology, the development of mobile terminal online games has been driven. The current mainstream mobile terminal game development platforms are: Android and IOS. The above platforms contain a complete set of API functions for developing applications such as audio playback and video animation on mobile phones. Among various online games, multiplayer online role-playing games (MMORPG) have a strong stickiness due to their rich gameplay, attracting more and more players and having the broadest development prospects.
[0003] Multiplayer online RPG games on mobile terminals such as mobile phones and tablets are basically evolved from multiplayer online RPG games on personal computers (PCs). On the PC side, the referee's perspective is almost exactly the same as the real perspective. It can be understood that only the camera position is changed and some building structures that will cause occlusion are hidden, and all scene details and special effects are completely restored.
[0004] This implementation method is fine for PC, as PC performance fully supports it. However, if you want to port it to a mobile device to achieve a similar effect (all scene details and special effects are fully restored), the performance will be very tight. Summary of the invention
[0005] The embodiment of the present application provides a display control method for a game scene to ensure performance fluency.
[0006] The embodiment of the present application provides a display control method for a game scene, the method comprising:
[0007] In response to a perspective switching instruction triggered by the user interface, determining a target perspective to switch to;
[0008] According to the target perspective switched to, display the map element content corresponding to the target perspective, and close the display of the map element content that does not belong to the target perspective;
[0009] Among them, the elements in the game scene are located in corresponding map elements, and the categories of the map elements include first-perspective map elements and second-perspective map elements; the first-perspective map elements are not displayed in the second perspective, and the second-perspective map elements are not displayed in the first perspective.
[0010] In one embodiment, the first perspective is a real perspective, and the second perspective is an aerial perspective; the real perspective refers to the personal perspective of the virtual character in the game scene, and the aerial perspective refers to the global perspective of viewing the entire game scene.
[0011] In one embodiment, determining the target perspective to be switched to in response to the perspective switching instruction triggered by the user interface includes:
[0012] Responding to a perspective switching instruction triggered by the user interface, obtaining a current perspective state;
[0013] If the current viewing angle state is the first viewing angle, determining that the target viewing angle to be switched to is the second viewing angle;
[0014] If the current viewing angle state is the second viewing angle, it is determined that the target viewing angle to be switched to is the first viewing angle.
[0015] In one embodiment, the category of the map element further includes a general map element, and the method further includes:
[0016] In the initialization phase, all map elements are divided into first-perspective map elements, second-perspective map elements and general map elements according to the identification information of each map element.
[0017] In one embodiment, displaying the map element content corresponding to the target perspective according to the switched target perspective, and closing the display of the map element content not belonging to the target perspective, includes:
[0018] If the target perspective switched to is the first perspective, the map elements and general map elements of the first perspective are displayed, and the display of the map elements of the second perspective is closed;
[0019] If the target perspective switched to is the second perspective, the map elements of the second perspective and the general map elements are displayed, and the display of the map elements of the first perspective is closed.
[0020] In one embodiment, the method further comprises:
[0021] In the second viewing angle, in response to a floor switching instruction triggered by the user interface, determining a target floor to switch to;
[0022] The second perspective map elements and the general map elements corresponding to the target floor are displayed.
[0023] In one embodiment, while displaying the second perspective map element and the general map element corresponding to the target floor, the method further includes:
[0024] According to the elements included in the second perspective map element and the general map element corresponding to the target floor, the collision effects corresponding to the elements are turned on.
[0025] In one embodiment, the method further comprises:
[0026] In the initialization phase, the floor corresponding to each map element is determined according to the identification information of each map element.
[0027] In one embodiment, the method further comprises:
[0028] The special effects of the map element content corresponding to the target perspective are displayed, and the special effects display of the map element content that does not belong to the target perspective is turned off.
[0029] The present application provides a display control device for a game scene, the device comprising:
[0030] A perspective determination module, used to determine a target perspective to switch to in response to a perspective switching instruction triggered by a user interface;
[0031] A map closing module, used to display the map element content corresponding to the target perspective according to the target perspective switched to, and close the display of the map element content that does not belong to the target perspective;
[0032] Among them, the elements in the game scene are located in corresponding map elements, and the categories of the map elements include first-perspective map elements and second-perspective map elements; the first-perspective map elements are not displayed in the second perspective, and the second-perspective map elements are not displayed in the first perspective.
[0033] An embodiment of the present application provides an electronic device, the electronic device comprising:
[0034] processor;
[0035] a memory for storing processor-executable instructions;
[0036] Wherein, the processor is configured to execute the display control method of the above-mentioned game scene.
[0037] An embodiment of the present application provides a computer-readable storage medium, which stores a computer program. The computer program can be executed by a processor to complete the display control method of the above-mentioned game scene.
[0038] The technical solution provided by the above embodiment of the present application, when receiving a perspective switching instruction, only displays the map element content corresponding to the target perspective, closes the display of the map element content that does not belong to the target perspective, and does not display the second perspective map element in the first perspective, thereby ensuring the richness of details in the first perspective. By not displaying the first perspective map element in the second perspective, the details can be hidden, ensuring the performance fluency and clarity of information recognition. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to more clearly illustrate the technical solution of the embodiments of the present application, the drawings required for use in the embodiments of the present application are briefly introduced below.
[0040] Figure 1 It is a schematic diagram of an application scenario of a display control method for a game scene provided in an embodiment of the present application;
[0041] Figure 2 is a block diagram of an electronic device provided in an embodiment of the present application;
[0042] Figure 3 It is a flowchart of a display control method of a game scene provided in an embodiment of the present application;
[0043] Figure 4 is a schematic diagram of a viewing angle switching button provided in an embodiment of the present application;
[0044] Figure 5 is a schematic diagram of a viewing angle switching button provided in another embodiment of the present application;
[0045] Figure 6 is a schematic diagram of a viewing angle switching button provided in yet another embodiment of the present application;
[0046] Figure 7 is a schematic diagram of a floor switching button provided in an embodiment of the present application;
[0047] Figure 8 It is a block diagram of a display control device for a game scene provided in an embodiment of the present application. DETAILED DESCRIPTION
[0048] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application.
[0049] Similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings. At the same time, in the description of this application, the terms "first", "second", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.
[0050] Figure 1 Schematic diagram of an application scenario of a display control method for a game scene provided in an embodiment of the present application. Figure 1 As shown, the application scenario includes multiple clients 110 and servers 120, and the clients 110 and the servers 120 are connected via a wireless network. The client 110 can be a mobile terminal such as a mobile phone or a tablet computer with software applications such as games installed, or a desktop computer with software applications such as games installed. The server 120 can be a server or a server cluster.
[0051] Figure 2 1 is a block diagram of an electronic device provided in an embodiment of the present application. The electronic device can be used as the client 110. Figure 2 As shown, the electronic device 200 can be used to execute the display control method of the game scene provided in the embodiment of the present application. Figure 2 As shown, the electronic device 200 includes: one or more processors 202, and one or more memories 204 storing processor executable instructions. The processor 202 is configured to execute the display control method of the game scene provided in the following embodiment of the present application.
[0052] The processor 202 may be a device including a central processing unit (CPU), a graphics processing unit (GPU), or other forms of processing units having data processing capabilities and / or instruction execution capabilities, and may process data of other components in the electronic device 200, and may also control other components in the electronic device 200 to perform desired functions.
[0053] The memory 204 may include one or more computer program products, and the computer program product may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may include, for example, random access memory (RAM) and / or cache memory (cache), etc. The non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, etc. One or more computer program instructions may be stored on the computer-readable storage medium, and the processor 202 may run the program instructions to implement the display control method of the game scene described below. Various applications and various data may also be stored in the computer-readable storage medium, such as various data used and / or generated by the application, etc.
[0054] In one embodiment, Figure 2 The electronic device 200 shown may also include an input device 206, an output device 208, and a data acquisition device 210, and these components are interconnected via a bus system 212 and / or other forms of connection mechanisms (not shown). It should be noted that Figure 2 The components and structures of the electronic device 200 shown are merely exemplary and non-limiting. The electronic device 200 may also have other components and structures as required.
[0055] The input device 206 may be a device used by a user to input instructions, and may include one or more of a keyboard, a mouse, a microphone, a touch screen, etc. The output device 208 may output various information (e.g., images or sounds) to the outside (e.g., a user), and may include one or more of a display, a speaker, etc. The data acquisition device 210 may acquire an image of an object, and store the acquired image in the memory 204 for use by other components. Exemplarily, the data acquisition device 210 may be a camera.
[0056] In one embodiment, the various components in the example electronic device 100 for implementing the display control method of the game scene of the embodiment of the present application can be integrated or dispersed, such as integrating the processor 202, memory 204, input device 206 and output device 208 into one, and separating the data acquisition device 210.
[0057] In one embodiment, the example electronic device 200 for implementing the display control method of the game scene of the embodiment of the present application can be implemented as an intelligent terminal such as a smart phone, a tablet computer, a car-mounted device, etc.
[0058] Figure 3 1 is a flow chart of a method for controlling the display of a game scene provided in an embodiment of the present application. The method comprises the following steps S310 to S320.
[0059] Step S310: In response to a perspective switching instruction triggered by the user interface, determine a target perspective to switch to.
[0060] Among them, the user interface refers to the interface through which software applications such as games interact with users. The player clicks the perspective switching button of the user interface, and the client receives the perspective switching instruction. The target perspective refers to the perspective after switching. The target perspective can be the first perspective or the second perspective. In one embodiment, the first perspective can be a real perspective, and the second perspective can be a high-altitude perspective; the real perspective refers to the personal perspective of the virtual character in the game scene, and the high-altitude perspective refers to the global perspective of viewing the entire game scene. Simply put, the real perspective simulates what the virtual character sees in front of him, with more details. The high-altitude perspective can also be called the God's perspective or the referee's perspective, which can observe the overall situation, so the details can be omitted.
[0061] In one embodiment, the client can obtain the current perspective state in response to a perspective switching instruction triggered by the user interface; if the current perspective state is the first perspective, the target perspective to be switched to is determined to be the second perspective; if the current perspective state is the second perspective, the target perspective to be switched to is determined to be the first perspective.
[0062] For example, if Figure 4As shown, if the current perspective is a high-altitude perspective, when the client receives the perspective switching instruction from the player clicking the perspective switching button 41, it determines that the target perspective is the real perspective. Figure 5 As shown, if the current perspective is the real perspective, when the client receives the perspective switching instruction from the player clicking the perspective switching button 41, it determines that the target perspective is the high-altitude perspective.
[0063] In one embodiment, in response to a perspective switching instruction triggered by a user interface, the client may determine the perspective type carried in the perspective switching instruction as the target perspective to be switched to.
[0064] For example, the user interface can set up separate buttons for real view angle and high altitude view angle, such as Figure 6 As shown, when the player clicks the real perspective button, the client receives a perspective switching instruction, the perspective type carried by the perspective switching instruction is the real perspective, and it is determined that the target perspective to be switched to is the real perspective.
[0065] When the player clicks the high-altitude perspective button, the client receives a perspective switching instruction. The perspective type carried by the perspective switching instruction is the high-altitude perspective, and it is determined that the target perspective to be switched to is the high-altitude perspective.
[0066] Step S320: According to the target perspective switched to, the map element content corresponding to the target perspective is displayed, and the display of the map element content not belonging to the target perspective is closed.
[0067] Among them, the elements in the game scene are located in the corresponding map elements, and the categories of map elements include first-perspective map elements and second-perspective map elements. Among them, the first-perspective map elements are not displayed in the second perspective, that is, the first-perspective map elements do not belong to the second perspective. The second-perspective map elements are not displayed in the first perspective, that is, the second-perspective map elements do not belong to the first perspective. If the target perspective switched to is the first perspective, the first-perspective map elements and general map elements are displayed, and the display of the second-perspective map elements is turned off, that is, the second-perspective map elements are hidden; if the target perspective switched to is the second perspective, the second-perspective map elements and general map elements are displayed, and the display of the first-perspective map elements is turned off, that is, the first-perspective map elements are hidden.
[0068] The first-person perspective map elements have all the scene details. For a small screen like a mobile phone, too many display details will interfere with the player's acquisition of information. Therefore, this application turns off the display of the first-person perspective map elements when switching to the second perspective, which can not only improve the performance fluency, but also improve the clarity of information recognition.
[0069] In one embodiment, while displaying the map element content corresponding to the target perspective and turning off the display of the map element content that does not belong to the target perspective, the special effects of the map element content corresponding to the target perspective can also be displayed and the special effects display of the map element content that does not belong to the target perspective can be turned off.
[0070] For example, if an object is smoking, after the view is switched, if the object is not in the map element of the target view, it is necessary to hide the object and its corresponding special effects at the same time to avoid causing unreasonable visual anomalies. Similarly, when displaying the object in the map element, the corresponding special effects of the object can also be displayed to improve the display effect.
[0071] The game scene can be a three-dimensional virtual picture containing virtual characters, virtual objects (such as walls, tables and chairs, and ornaments), etc. For example, it can be a game scene in a role-playing game (such as a three-story building). Virtual characters or virtual objects in the game scene can be called elements. Each element can be placed in the corresponding map element (also called a sub-level) in advance. The categories of map elements include first-perspective map elements, second-perspective map elements, and general map elements. In the initialization stage, according to the identification information of each map element, all map elements can be divided into first-perspective map elements, second-perspective map elements, and general map elements, and saved separately. Therefore, when switching perspectives, it is possible to quickly determine which are first-perspective map elements, which are second-perspective map elements, and which are general map elements, thereby improving the display efficiency when switching perspectives.
[0072] The identification information may be the name of a map element. The category of a map element is determined by identifying whether the identification information contains a keyword corresponding to a category. For example, if the identification information of a map element contains A, it means that it belongs to a first-view map element. If the identification information of a map element contains B, it means that it belongs to a second-view map element. If the identification information of a map element contains C, it means that it belongs to a general map element.
[0073] In one embodiment, during the initialization phase, the floor corresponding to each map element may also be determined based on the identification information of each map element. The identification information may be the name of the map element. For example, if the name of a map element contains "first floor", it means that the floor of the map element is the first floor. If the name of a map element contains "second floor", it means that the floor of the map element is the second floor, and so on.
[0074] In one embodiment, the method provided by the embodiment of the present application also includes: in the second perspective, the client determines the target floor to switch to in response to the floor switching instruction triggered by the user interface; and displays the second perspective map elements and general map elements corresponding to the target floor.
[0075] If the current viewing angle is high altitude, such as Figure 7 As shown, the user interface may display floor switching buttons 42, such as a first floor button, a second floor button, and a third floor button. When the player clicks the second floor button, the client receives a floor switching instruction. The floor switching instruction may carry a second floor identifier, so that the client can determine that the target floor to be switched to is the second floor. The target floor refers to the result after the floor switching, for example, when switching from the first floor to the second floor, the target floor is the second floor.
[0076] Since all map elements are divided into several floors according to identification information of the map elements in advance, after the target floor is determined, only the second perspective map elements and the general map elements corresponding to the target floor may be displayed.
[0077] In one embodiment, according to the second perspective map element corresponding to the target floor and the elements included in the general map element, the collision effect corresponding to the element may also be enabled.
[0078] Among them, the elements contained in the second-perspective map elements and the general map elements refer to the virtual characters or objects contained in the second-perspective map elements and the general map elements. When the objects in the second-perspective map elements and the general map elements are displayed, the corresponding collision effects are turned on. When an object is not displayed due to perspective switching or floor switching, the corresponding collision effect of the object is turned off. In games, it is often necessary to implement collision detection. For example, to determine whether there is an obstacle in front and to determine whether a bullet hits an airplane, both are to detect whether two objects collide, and then make different treatments based on the detection results. Turning off the element collision effect makes it so that the collision of the element will not be detected in the collision detection, and other elements will not collide with the element; turning on the element collision effect makes it so that the collision of the element will be detected in the collision detection, and other elements will collide with the element.
[0079] The following is an embodiment of the device of the present application, which can be used to execute the display control method embodiment of the above-mentioned game scene of the present application. For details not disclosed in the embodiment of the device of the present application, please refer to the display control method embodiment of the game scene of the present application.
[0080] Figure 8 FIG. 1 is a block diagram of a display control device for a game scene according to an embodiment of the present application. Figure 8 As shown, the device includes: a viewing angle determination module 810 and a map closing module 820.
[0081] A perspective determination module 810, configured to determine a target perspective to switch to in response to a perspective switching instruction triggered by a user interface;
[0082] The map closing module 820 is used to display the map element content corresponding to the target perspective according to the target perspective switched to, and close the display of the map element content that does not belong to the target perspective.
[0083] Among them, the elements in the game scene are located in corresponding map elements, and the categories of map elements include first-perspective map elements and second-perspective map elements; the first-perspective map elements are not displayed in the second perspective, and the second-perspective map elements are not displayed in the first perspective.
[0084] The implementation process of the functions and effects of each module in the above-mentioned device is specifically described in the implementation process of the corresponding steps in the display control method of the above-mentioned game scene, and will not be repeated here.
[0085] In several embodiments provided in the present application, the disclosed devices and methods may also be implemented in other ways. The device embodiments described above are merely schematic, for example, the flowcharts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the devices, methods and computer program products according to the multiple embodiments of the present application. In this regard, each box in the flowchart or block diagram may represent a module, a program segment or a part of a code, and a module, a program segment or a part of a code contains one or more executable instructions for implementing a specified logical function. In some alternative implementations, the functions marked in the box may also occur in an order different from that marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they may sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or the flowchart, and the combination of boxes in the block diagram and / or the flowchart, can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.
[0086] In addition, the functional modules in the various embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
[0087] If the function is implemented in the form of a software function module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.
Claims
1. A display control method for a game scene, characterized in that: The method comprises: In the initialization phase, all map elements are divided into first-perspective map elements, second-perspective map elements and general map elements according to the identification information of each map element; In response to a perspective switching instruction triggered by the user interface, determining a target perspective to switch to; If the target perspective switched to is the first perspective, the map elements and general map elements of the first perspective are displayed, and the display of the map elements of the second perspective is closed; If the target perspective switched to is the second perspective, the map elements of the second perspective and the general map elements are displayed, and the display of the map elements of the first perspective is closed; Among them, the elements in the game scene are located in the corresponding map elements, the first perspective map elements are not displayed in the second perspective, and the second perspective map elements are not displayed in the first perspective.
2. The method according to claim 1, characterized in that The first perspective is a real perspective, and the second perspective is an aerial perspective; the real perspective refers to the personal perspective of the virtual character in the game scene, and the aerial perspective refers to the global perspective of viewing the entire game scene.
3. The method according to claim 1, characterized in that The step of determining the target perspective to be switched to in response to the perspective switching instruction triggered by the user interface includes: Responding to a perspective switching instruction triggered by the user interface, obtaining a current perspective state; If the current viewing angle state is the first viewing angle, determining that the target viewing angle to be switched to is the second viewing angle; If the current viewing angle state is the second viewing angle, it is determined that the target viewing angle to be switched to is the first viewing angle.
4. The method according to claim 1, characterized in that The step of determining the target perspective to be switched to in response to the perspective switching instruction triggered by the user interface includes: In response to a perspective switching instruction triggered by a user interface, the perspective type carried in the perspective switching instruction is determined as a target perspective to be switched to.
5. The method according to claim 1, characterized in that The method further comprises: In the second viewing angle, in response to a floor switching instruction triggered by the user interface, determining a target floor to switch to; The second perspective map elements and the general map elements corresponding to the target floor are displayed.
6. The method according to claim 5, characterized in that While displaying the second perspective map element and the general map element corresponding to the target floor, the method further includes: According to the elements included in the second perspective map element and the general map element corresponding to the target floor, the collision effects corresponding to the elements are turned on.
7. The method according to claim 5, characterized in that The method further comprises: In the initialization phase, the floor corresponding to each map element is determined according to the identification information of each map element.
8. The method according to claim 1, characterized in that The method further comprises: The special effects of the map element content corresponding to the target perspective are displayed, and the special effects display of the map element content that does not belong to the target perspective is turned off.
9. A display control device for a game scene, characterized in that: The device comprises: A perspective determination module is used to divide all map elements into first-perspective map elements, second-perspective map elements and general map elements according to the identification information of each map element during the initialization phase; and determine the target perspective to be switched to in response to a perspective switching instruction triggered by the user interface; A map closing module is used to display the map elements and general map elements of the first perspective, and close the display of the map elements of the second perspective, if the target perspective switched to is the first perspective; if the target perspective switched to is the second perspective, display the map elements and general map elements of the second perspective, and close the display of the map elements of the first perspective; wherein the elements in the game scene are located in the corresponding map elements, the map elements of the first perspective are not displayed in the second perspective, and the map elements of the second perspective are not displayed in the first perspective.
10. An electronic device, characterized in that: The electronic device comprises: processor; a memory for storing processor-executable instructions; Wherein, the processor is configured to execute the display control method of the game scene described in any one of claims 1-8.
11. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and the computer program can be executed by a processor to complete the display control method of the game scene described in any one of claims 1-8.
