Information Prompting Method, Device, Electronic Device and Storage Medium in a Game
By judging the distance between the player's character and the scene area in real time in role-playing games and displaying prompt information, the problem of failure caused by players entering a special area is solved, and the game's security and player experience are improved.
Patent Information
- Application Number
- CN202210842237.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-18
- Publication Date
- 2025-07-29
- Estimated Expiration
- 2042-07-18
AI Technical Summary
In role-playing games, player characters may enter special areas due to unfamiliarity with the game terrain, resulting in game failure, reducing the gaming experience.
The terminal device determines the distance between the player character and the edge position of the specified scene area in real time, and displays prompt information on the graphical user interface based on the distance hint threshold of the movement type to guide players to avoid dangerous areas.
It improves the probability and gaming experience of player character games, and enhances the security and interactivity of the game through accurate information prompts.
Smart Images

Figure CN115089969B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of game technologies, and more particularly, to a method, device, electronic device, and storage medium for information prompting in a game. Background Art
[0002] In role-playing games, the character controlled by the player may perform movement operations during the game, such as walking, running, long jumping, etc. And in some game scenarios, there will be some special areas, such as cliffs, rooftops, etc.
[0003] When the player is not familiar with the game terrain, there is a high probability that the character will enter the designated special area, resulting in game failure and thus a poor gaming experience for the player. Summary of the Invention
[0004] This application provides a method, device, electronic device, and storage medium for information prompting in a game, so as to prompt the dangerous terrain around the position of the player character during the game and improve the player's gaming experience.
[0005] The technical solutions adopted in the embodiments of this application are as follows:
[0006] In a first aspect, an embodiment of this application provides a method for information prompting in a game. The game scene and the player character therein are displayed through a graphical user interface provided by a terminal device, including:
[0007] In response to a movement instruction, controlling the player character to move in the game scene according to the movement type corresponding to the movement instruction; the movement type reflects the degree of change in the unit movement distance of the player character in the game scene based on the movement instruction;
[0008] Determining a first distance between the player character and the edge position of a designated scene area;
[0009] Determining a distance prompt threshold corresponding to the movement type; the distance prompt threshold represents the critical distance for prompting the player character's distance from the edge position of the designated scene area;
[0010] Displaying first prompt information on the graphical user interface according to the first distance and the distance prompt threshold corresponding to the movement type; the first prompt information represents that the first distance does not meet the distance prompt threshold in the first prompt direction.
[0011] Optionally, the method further includes:
[0012] Determining the extension direction from the position before the player character moves to the position after the move as the first prompt direction; or
[0013] Determine the first hint direction as the extension direction from the position after the movement of the player character towards the edge position of the specified scene area, where the edge position of the specified scene area is the edge position pointed to when the distance between the player character and the edge position of the specified scene area is the shortest.
[0014] Optionally, determining the distance hint threshold corresponding to the movement type includes:
[0015] Obtain the unit movement distance of the player character under the movement type;
[0016] Determine the distance hint threshold corresponding to the movement type according to at least one of the three parameters: the unit movement distance of the player character under the movement type, the preset lower limit of the number of movement steps under the movement type, and the unit movement distance of the player character under the specified movement type, where the specified movement type indicates the movement type with the largest unit movement distance among multiple movement types.
[0017] Optionally, the movement type includes the first movement type. Determining the distance hint threshold corresponding to the movement type according to at least one of the three parameters: the unit movement distance of the player character under the movement type, the preset lower limit of the number of movement steps under the movement type, and the unit movement distance of the player character under the specified movement type includes:
[0018] Determine the upper limit of the first distance hint threshold corresponding to the first movement type according to the unit movement distance of the player character under the first movement type and the preset lower limit of the number of movement steps under the first movement type;
[0019] Determine the lower limit of the first distance hint threshold corresponding to the first movement type according to the unit movement distance of the player character under the specified movement type.
[0020] Optionally, displaying the first hint information on the graphical user interface according to the first distance and the first distance hint threshold corresponding to the first movement type includes:
[0021] If the distance between the player character and the edge position of the specified scene area is less than the lower limit of the first distance hint threshold, display the first hint information in the first hint direction on the graphical user interface.
[0022] Optionally, displaying the first hint information on the graphical user interface according to the first distance and the first distance hint threshold corresponding to the first movement type includes:
[0023] If the distance between the player character and the edge position of the specified scene area is greater than the lower limit of the first distance prompt threshold and less than the upper limit of the first distance prompt threshold, then the first prompt information is displayed in the first prompt direction on the graphical user interface.
[0024] Optionally, the determining of the upper limit of the first distance prompt threshold corresponding to the first movement type according to the unit movement distance of the player character under the first movement type and the lower limit of the preset movement steps under the first movement type includes:
[0025] Performing a multiplication operation on the unit movement distance of the player character under the first movement type and the lower limit of the preset movement steps under the first movement type to obtain the upper limit of the first distance prompt threshold corresponding to the first movement type.
[0026] Optionally, the first movement type includes one or more of jogging, dodging, and sprinting.
[0027] Optionally, the movement type includes a second movement type. The determining of the distance prompt threshold corresponding to the movement type according to at least one of the three parameters of the unit movement distance of the player character under the movement type, the lower limit of the preset movement steps under the first movement type, and the unit movement distance of the player character under the specified movement type includes:
[0028] Determining the second distance prompt threshold corresponding to the second movement type according to the unit movement distance of the player character under the second movement type and the lower limit of the preset movement steps under the second movement type.
[0029] Optionally, the determining of the second distance prompt threshold corresponding to the second movement type according to the unit movement distance of the player character under the second movement type and the lower limit of the preset movement steps under the second movement type includes:
[0030] Performing a multiplication operation on the unit movement distance of the player character under the second movement type and the lower limit of the preset movement steps under the second movement type to obtain the second distance prompt threshold corresponding to the second movement type.
[0031] Optionally, the unit movement distance of the second movement type is less than the unit movement distance of the first movement type.
[0032] Optionally, the second movement type includes: walking slowly.
[0033] Optionally, the method further includes:
[0034] Display a second prompt message on the graphical user interface, where the second prompt message indicates that the first distance in the second prompt direction meets the distance prompt threshold, and the second prompt direction is other directions in the same plane as the first prompt direction except the first prompt direction.
[0035] Optionally, the second prompt message has a different display state from the first prompt message.
[0036] Optionally, after displaying the first prompt message on the graphical user interface, the method further includes:
[0037] In response to a movement instruction, adjust the movement direction of the player character to the second prompt direction.
[0038] In a second aspect, an information prompting device in a game provided by an embodiment of the present application displays a game scene and a player character therein through a graphical user interface provided by a terminal device, including: a control module, a determination module, and a display module;
[0039] The control module is configured to, in response to a movement instruction, control the player character to move in the game scene according to a movement type corresponding to the movement instruction; the movement type reflects the degree of change in the unit movement distance of the player character in the game scene based on the movement instruction;
[0040] The determination module is configured to determine a first distance between the player character and an edge position of a specified scene area;
[0041] The determination module is configured to determine a distance prompt threshold corresponding to the movement type; the distance prompt threshold indicates a critical distance for prompting the player character of the distance from the edge position of the specified scene area;
[0042] The display module is configured to display a first prompt message on the graphical user interface according to the first distance and the distance prompt threshold corresponding to the movement type; the first prompt message indicates that the first distance in the first prompt direction does not meet the distance prompt threshold.
[0043] Optionally, the determination module is further configured to determine the first prompt direction as the extension direction from the position before the player character moves to the position after the movement; or
[0044] Determine the first prompt direction as the extension direction from the position after the player character moves to the edge position of the specified scene area, where the edge position of the specified scene area is the edge position pointed to when the distance between the player character and the edge position of the specified scene area is the shortest.
[0045] Optionally, the determining module is specifically configured to obtain the unit movement distance of the player character under the movement type;
[0046] Determine the distance prompt threshold corresponding to the movement type according to at least one of three parameters: the unit movement distance of the player character under the movement type, the preset lower limit of the movement steps under the movement type, and the unit movement distance of the player character under the specified movement type, where the specified movement type indicates the movement type with the largest unit movement distance among multiple movement types.
[0047] Optionally, the movement type includes a first movement type, and the determining module is specifically configured to
[0048] Determine the upper limit of the first distance prompt threshold corresponding to the first movement type according to the unit movement distance of the player character under the first movement type and the preset lower limit of the movement steps under the first movement type;
[0049] Determine the lower limit of the first distance prompt threshold corresponding to the first movement type according to the unit movement distance of the player character under the specified movement type.
[0050] Optionally, the display module is specifically configured to, if the distance between the player character and the edge position of the specified scene area is less than the lower limit of the first distance prompt threshold, display the first prompt information in the first prompt direction on the graphical user interface.
[0051] Optionally, the display module is specifically configured to, if the distance between the player character and the edge position of the specified scene area is greater than the lower limit of the first distance prompt threshold and less than the upper limit of the first distance prompt threshold, display the first prompt information in the first prompt direction on the graphical user interface.
[0052] Optionally, the determining module is specifically configured to perform a multiplication operation on the unit movement distance of the player character under the first movement type and the preset lower limit of the movement steps under the first movement type to obtain the upper limit of the first distance prompt threshold corresponding to the first movement type.
[0053] Optionally, the first movement type includes one or more of jogging, dodging, and sprinting.
[0054] Optionally, the determining module is specifically configured to determine the second distance prompt threshold corresponding to the second movement type according to the unit movement distance of the player character under the second movement type and the preset lower limit of the movement steps under the second movement type.
[0055] Optionally, the determining module is specifically configured to perform a multiplication operation on the unit moving distance of the player character in the second movement type and a preset lower limit of the number of movement steps in the second movement type, so as to obtain a second distance prompt threshold corresponding to the second movement type.
[0056] Optionally, the unit moving distance of the second movement type is less than the unit moving distance of the first movement type.
[0057] Optionally, the second movement type includes: walking slowly.
[0058] Optionally, the display module is further configured to display second prompt information on the graphical user interface, where the second prompt information indicates that the first distance in the second prompt direction meets the distance prompt threshold, and the second prompt direction is another direction in the same plane as the first prompt direction except the first prompt direction.
[0059] Optionally, the second prompt information and the first prompt information have different display states.
[0060] Optionally, the control module is further configured to adjust the moving direction of the player character to the second prompt direction in response to a moving instruction.
[0061] In a third aspect, an embodiment of the present application provides an electronic device, including: a processor, a storage medium, and a bus. The storage medium stores machine-readable instructions executable by the processor. When the electronic device runs, the processor communicates with the storage medium through the bus, and the processor executes the machine-readable instructions to perform the steps of the method provided in the first aspect when executed.
[0062] In a fourth aspect, an embodiment of the present application provides a storage medium, on which a computer program is stored. When the computer program is run by a processor, it performs the steps of the method provided in the first aspect.
[0063] The beneficial effects of the present application are:
[0064] Based on the movement type of the player character, during the process of controlling the movement of the player character in the game scene, the first distance between the player character and the edge position of the specified scene area is determined in real time. Thus, according to the first distance and the distance prompt threshold corresponding to the movement type, the information prompt direction corresponding to the player character is judged in real time, and prompt information is displayed in the information prompt direction, so as to conveniently guide the player character to avoid danger in the game, improve the probability of the player character winning the game, and enhance the game experience. For different movement types, the calculation of the distance prompt threshold corresponding to the different movement types is carried out, so that the obtained distance prompt threshold is more unique, the accuracy of the calculated distance prompt threshold can be improved, and thus, based on the distance prompt threshold, the information prompt under each operation type can be carried out, and the accuracy of the information prompt can be improved to make an accurate prompt for the player character. In addition, by displaying the prompt information in the information prompt direction, a more intuitive prompt can be made to the player, improving the player's game experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0065] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required to be used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present application, and thus should not be regarded as limiting the scope. For those of ordinary skill in the art, other related drawings can be obtained based on these drawings without creative efforts.
[0066] Figure 1 It is a schematic flowchart of a method for information prompt in a game provided by an embodiment of the present application;
[0067] Figure 2 It is a schematic flowchart of another method for information prompt in a game provided by an embodiment of the present application;
[0068] Figure 3 It is a schematic flowchart of yet another method for information prompt in a game provided by an embodiment of the present application;
[0069] Figure 4 It is a schematic diagram of an information prompt interface provided by an embodiment of the present application;
[0070] Figure 5 It is a schematic diagram of a device for information prompt in a game provided by an embodiment of the present application;
[0071] Figure 6 It is a schematic diagram of the structure of an electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0072] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the following will clearly and completely describe the technical solutions in the embodiments of this application with reference to the accompanying drawings in the embodiments of this application. It should be understood that the accompanying drawings in this application are only for the purposes of illustration and description, and are not used to limit the protection scope of this application. In addition, it should be understood that the schematic drawings are not drawn to scale. The flowcharts used in this application illustrate the operations implemented according to some embodiments of this application. It should be understood that the operations in the flowchart may not be implemented in sequence, and steps without a logical context relationship may be reversed or implemented simultaneously. In addition, those skilled in the art may add one or more other operations to the flowchart or remove one or more operations from the flowchart under the guidance of the content of this application.
[0073] In addition, the described embodiments are only some embodiments of this application, rather than all embodiments. The components of the embodiments of this application usually described and illustrated in the accompanying drawings here may be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of this application claimed, but merely represents the selected embodiments of this application. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative efforts shall fall within the protection scope of this application.
[0074] In a game information prompt method in one embodiment of the present disclosure, it can run on a local terminal device or a server. When the game information prompt method runs on the server, the method can be implemented and executed based on a cloud interaction system, where the cloud interaction system includes a server and a client device.
[0075] In an optional implementation manner, various cloud applications can run under the cloud interaction system, such as cloud games. Taking cloud games as an example, cloud games refer to a game mode based on cloud computing. In the operation mode of cloud games, the running entity of the game program and the presenting entity of the game screen are separated. The storage and running of the game information prompt method are completed on the cloud game server, and the role of the client device is for data reception, sending, and the presentation of the game screen. For example, the client device can be a display device with data transmission function near the user side, such as a mobile terminal, a television, a computer, a personal digital assistant, etc.; however, the information processing is performed by the cloud game server in the cloud. When playing a 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 data such as the game screen, returns it to the client device through the network, and finally, the client device decodes and outputs the game screen.
[0076] In an alternative embodiment, taking a game as an example, the local terminal device stores a game program and is used to present game scenes. The local terminal device is used to interact with players through a graphical user interface, that is, conventionally, the game program is downloaded and installed on an electronic device and then run. The local terminal device can provide the graphical user interface to players in various ways. For example, it can be rendered and displayed on the display screen of the terminal, or provided to players through holographic projection. For example, the local terminal device can include a display screen and a processor. The display screen is used to present the graphical user interface, which includes game scenes, and the processor is used to run the game, generate the graphical user interface, and control the display of the graphical user interface on the display screen.
[0077] In a possible embodiment, an embodiment of the present invention provides a method for information prompting in a game. The game scene and the player character therein are displayed through the graphical user interface provided by the terminal device. Herein, the terminal device can be the aforementioned local terminal device or the client device in the aforementioned cloud interaction system.
[0078] It should be noted that the term "including" will be used in the embodiments of the present application to indicate the existence of the features stated thereafter, but does not exclude adding other features.
[0079] Figure 1 It is a schematic flowchart of a method for information prompting in a game provided by an embodiment of the present application; the execution subject of this method can be the server corresponding to the terminal device providing the game interaction interface. As Figure 1 shown, this method can include:
[0080] S101. In response to a movement instruction, control the player character to move in the game scene according to the movement type corresponding to the movement instruction.
[0081] Herein, the movement type reflects the degree of change in the unit movement distance of the player character in the game scene based on the movement instruction.
[0082] In some embodiments, this method can be applied to role-playing games. Players can control the player character to move in the game scene. In response to the movement instruction input by the player through the graphical user interface, control the player character to move in the game scene according to the movement type corresponding to the movement instruction.
[0083] The movement type can refer to the way the player character moves, such as running, walking, jumping, etc. The movement instructions corresponding to different movement types are different to more precisely distinguish movement control. For example, the movement instruction: slide the virtual joystick forward, and the corresponding movement type is: running; the movement instruction: click the virtual joystick, and the corresponding movement type is: jumping.
[0084] S102: Determine a first distance between the player character and an edge position of a designated scene area.
[0085] Game scenes can feature different terrains. Player characters can fall from certain terrains, such as cliffs, rooftops, and hillsides, potentially ending the game. For example, in the game Battle Royale, the game scene updates in real time, allowing players to run, walk, and perform other activities. However, if a player character continues to move toward a cliff, they will fall and die, ending the game.
[0086] This method determines the first distance between the player character and the edge of the designated scene area in real time when the player character is at any position, thereby making a danger judgment based on the first distance. The designated scene area here can refer to some of the special terrain scenes listed above, of course, it is not limited to the listed ones.
[0087] The first distance refers to the distance between the player character and the edge position of the designated scene area, and the edge position of the designated scene area may be the edge position pointed to when the distance between the player character and the edge position of the designated scene area is the shortest.
[0088] S103: Determine a distance prompt threshold corresponding to the movement type; the distance prompt threshold represents a critical distance between the player character and the edge position of the specified scene area.
[0089] In some embodiments, a distance prompt threshold corresponding to the running type of the player character may also be determined. The distance prompt threshold may be used to judge the safety of the player character during the movement from the current position to the designated scene area.
[0090] The distance prompt thresholds corresponding to different types of movement of the player character may be different to ensure the accuracy and uniqueness of the distance prompt thresholds under different types of movement.
[0091] S104 : Displaying first prompt information on a graphical user interface according to the first distance and a distance prompt threshold corresponding to the motion type, where the first prompt information indicates that the first distance in a first prompt direction does not meet the distance prompt threshold.
[0092] In this embodiment, the calculation of the player character and a designated scene area in the game scene is taken as an example. In the actual game scene, there may be multiple designated scene areas around the player character. The relevant calculations can be performed on the player character and each designated scene area simultaneously. Then, for different designated scene areas, a first prompt message can be displayed on the graphical user interface, and the first prompt directions corresponding to the first prompt messages are different. That is to say, at the same moment, multiple first prompt messages may be displayed on the graphical user interface at the same time, and the prompt directions of the first prompt messages are different. There may be a first prompt message displayed on the left side of the player character and a first prompt message displayed on the right side of the player character, so as to achieve a more comprehensive information prompt.
[0093] In summary, the information prompt method in the game provided in this embodiment, based on the movement type of the player character, determines the first distance between the player character and the edge position of the designated scene area in real time during the process of controlling the player character to move in the game scene. Then, according to the first distance and the distance prompt threshold corresponding to the movement type, it judges the information prompt direction corresponding to the player character in real time, and displays the prompt message in the information prompt direction, so as to conveniently guide the player character to avoid danger in the game, improve the probability of the player character winning the game, and enhance the game experience. For different movement types, the calculation of the distance prompt threshold corresponding to different movement types is carried out, so that the obtained distance prompt threshold is more unique, the accuracy of the calculated distance prompt threshold can be improved, and then the information prompt under each operation type can be carried out based on the distance prompt threshold, which can improve the accuracy of the information prompt and make an accurate prompt for the player character. In addition, by displaying the prompt message in the information prompt direction, it can make a more intuitive prompt to the player and improve the player's game experience.
[0094] Optionally, the method of the present application further includes: determining the extension direction from the position before the player character moves to the position after the move as the first prompt direction; or determining the extension direction from the position after the player character moves to the edge position of the designated scene area as the first prompt direction.
[0095] This embodiment exemplarily gives two ways to determine the first prompt direction. In one way, the moving direction of the player character can be used as the first prompt direction, and the moving direction is also the extension direction from the position before moving to the position after moving. In another way, the extension direction from the current position of the player character after moving to the edge position of the designated scene area can be determined as the first prompt direction.
[0096] Whether the player character is moving forward or backward in the game scene can be included in the above determination methods. That is to say, accurate information prompts can be made in both the forward and backward movement cases of the player character.
[0097] Figure 2 Schematic flowchart of another information prompting method in a game provided by an embodiment of this application; Optionally, in step S103, determining the distance prompting threshold corresponding to the movement type may include:
[0098] S201. Obtain the unit movement distance of the player character under the movement type.
[0099] Generally, during game design, the unit movement distance of the player character when performing each movement type in the game is preset. That is to say, in a game, the distance of each step or each run of the player character is preset. Based on the determined movement type of the player character, the unit movement distance of the player character under this movement type can be obtained.
[0100] S202. Determine the distance prompting threshold corresponding to the movement type according to at least one of the three parameters: the unit movement distance of the player character under the movement type, the preset lower limit of the number of movement steps under the movement type, and the unit movement distance of the player character under the specified movement type. The specified movement type indicates the movement type with the largest unit movement distance among multiple movement types.
[0101] Optionally, for each movement type, a lower limit of the number of movement steps can be preset. Since the unit movement distances of different movement types are different, compared with the movement type of running, the unit movement distance of the movement type of walking is less than the unit movement distance of the movement type of running, and the unit movement distance of the movement type of running is less than the unit movement distance of the movement type of long jump. Therefore, the preset lower limit of the number of movement steps for each movement type can be set according to the specific situation of each movement type.
[0102] The preset lower limit of the number of movement steps under the movement type is also the minimum number of steps that the player character moves towards the edge position of the specified scene area when the player character is at the current position. Taking the movement type of walking as an example, if the preset lower limit of the number of movement steps in the walking mode is set to 5 steps, it can be understood that when the player character is at the current position, the player character can reach the edge position of the specified scene area by walking at least 5 steps. And when the number of steps that the player character walks to the edge position of the specified scene area is less than 5 steps, it can be considered that the distance between the player character and the edge position of the specified scene area is relatively close, and there will be danger if the player character continues to move towards the edge position of the specified scene area. The preset lower limit of the number of movement steps for each movement type can be reasonably set according to requirements.
[0103] For the determination of the movement type with the maximum unit movement distance of the player character among the movement types, since there are differences in the unit movement distances of the player character under each movement type, and the unit movement distances of the player character under each movement type are preset and can be directly obtained. That is, when the game content is determined, the movement types that the player character may be involved in the game scene are also determined. And when the movement type is determined, the movement type with the maximum unit movement distance of the player character among the movement types is also determined. That is, the specified movement type is determined, so the unit movement distance of the specified movement type can also be directly obtained.
[0104] Optionally, based on at least one of the three parameters: the unit movement distance of the player character under the above movement type, the preset lower limit of the movement steps under the movement type, and the unit movement distance of the player character under the specified movement type, the distance prompt threshold corresponding to the movement type can be determined.
[0105] Figure 3 It is a flowchart of another method for information prompting in a game provided by an embodiment of the present application; optionally, in a realizable manner, the movement type may include a first movement type; in step S202, according to at least one of the three parameters: the unit movement distance of the player character under the movement type, the preset lower limit of the movement steps under the movement type, and the unit movement distance of the player character under the specified movement type, determining the distance prompt threshold corresponding to the movement type includes:
[0106] S301. Determine the upper limit of the first distance prompt threshold corresponding to the first movement type according to the unit movement distance of the player character under the first movement type and the preset lower limit of the movement steps under the first movement type.
[0107] The first movement type may refer to a movement type with an unfixed unit movement distance. That is, when the player character moves in the game scene in the first movement type, its unit movement distance may change. In this case, since the movement type is dynamically changing, the upper limit of the first distance prompt threshold corresponding to the first movement type can be determined according to the unit movement distance of the player character under the first movement type and the preset lower limit of the movement steps under the first movement type.
[0108] Optionally, it may be to perform a multiplication operation on the unit movement distance of the player character under the first movement type and the preset lower limit of the movement steps under the first movement type to obtain the upper limit of the first distance prompt threshold corresponding to the first movement type. For example: Suppose the unit movement distance of the player character under the first movement type is 0.5 meters, and the preset lower limit of the movement steps under the first movement type is 5 meters. Then, multiplying them can obtain the upper limit of the first distance prompt threshold corresponding to the first movement type as 0.5 multiplied by 5, which is 2.5 meters.
[0109] S302. Determine the lower limit of the first distance prompt threshold corresponding to the first movement type according to the unit movement distance of the player character under the specified movement type.
[0110] In the case where the movement type changes dynamically, it is also necessary to determine the lower limit of the distance prompt threshold. Since the movement type changes dynamically, the unit movement distance of the player character at the next moment cannot be estimated. Then, the unit movement distance of the specified movement type determined above can be used as the lower limit of the first distance prompt threshold corresponding to the first movement type. In this way, when the player character can move one step to reach the edge position of the specified scene area in the specified movement type, in other movement types, it can move at least one step before reaching the edge position of the specified scene area.
[0111] Optionally, in step S104, according to the first distance and the first distance prompt threshold corresponding to the first movement type, displaying the first prompt information on the graphical user interface may include: if the distance between the player character and the edge position of the specified scene area is less than the lower limit of the first distance prompt threshold, then display the first prompt information in the first prompt direction on the graphical user interface.
[0112] It should be noted that this judgment method that the distance between the player character and the edge position of the specified scene area is less than the lower limit of the first distance prompt threshold makes it considered safe and the first prompt information is not displayed when the player character can move at least one step towards the edge position of the specified scene area in any first movement type. However, whenever there is a first movement type in which the player character cannot move one step towards the edge position of the specified scene area, it is considered dangerous and the first prompt information is displayed.
[0113] In some embodiments, for the case where the movement type is the first movement type, if the distance between the player character and the edge position of the specified scene area is less than the lower limit of the first distance prompt threshold, then determine the direction of the edge position of the specified scene area relative to the player character as the first prompt direction. In this case where the distance between the player character and the edge position of the specified scene area is less than the lower limit of the first distance prompt threshold, when the movement type of the player character changes to the specified movement type, since the unit movement distance in the specified movement type is equal to the lower limit of the first distance prompt threshold, and at this time, the distance between the player character and the edge position of the specified scene area is less than the lower limit of the first distance prompt threshold, then when the player character moves towards the edge position of the specified scene area in the specified movement type, the player character will reach the edge position of the specified scene area without even being able to complete one step. That is, when the player character moves one step in the specified movement type, it will surely enter the specified scene area, weakening the health value of the player character.
[0114] Therefore, when it is determined that the distance between the player character and the edge position of the specified scene area is less than the lower limit of the first distance prompt threshold, the direction of the edge position of the specified scene area relative to the player character is determined as the first prompt direction. At the same time, the first prompt information can be displayed in the first prompt direction to give a timely danger prompt.
[0115] Optionally, in step S104, displaying the first prompt information on the graphical user interface according to the first distance and the first distance prompt threshold corresponding to the first movement type may include: If the distance between the player character and the edge position of the specified scene area is greater than the lower limit of the first distance prompt threshold and less than the upper limit of the first distance prompt threshold, the first prompt information is displayed in the first prompt direction on the graphical user interface.
[0116] Different from the above judgment method where the distance between the player character and the edge position of the specified scene area is less than the lower limit of the first distance prompt threshold, in this embodiment, under the judgment method where the distance between the player character and the edge position of the specified scene area is greater than the lower limit of the first distance prompt threshold and less than the upper limit of the first distance prompt threshold, it is necessary to ensure that when the player character moves towards the edge position of the specified scene area in any first movement type, it can move at least the preset number of steps corresponding to the first movement type to be considered safe, and the first prompt information is not displayed. If the preset number of steps corresponding to the first movement type cannot be moved, it is considered dangerous, and the first prompt information is displayed.
[0117] In addition, it is worth noting that in the scenario where the distance between the player character and the edge position of the specified scene area is greater than the lower limit of the first distance prompt threshold and less than the upper limit of the first distance prompt threshold, the first prompt information displayed may be the same as the first prompt information in the scenario where the distance between the player character and the edge position of the specified scene area is less than the lower limit of the first distance prompt threshold. Of course, it can also be different. Since the danger level of the scenario where the distance between the player character and the edge position of the specified scene area is less than the lower limit of the first distance prompt threshold is higher than that of the scenario where the distance between the player character and the edge position of the specified scene area is greater than the lower limit of the first distance prompt threshold and less than the upper limit of the first distance prompt threshold, the first prompt information corresponding to the scenario where the distance between the player character and the edge position of the specified scene area is less than the lower limit of the first distance prompt threshold can give a danger coefficient prompt to more conveniently show the danger level to the player and improve the player's attention. Or, the first prompt information displayed in these two scenarios can be displayed in different display methods to accurately provide the player with the current danger state.
[0118] In some other embodiments, for the case where the movement type is the first movement type, if the distance between the player character and the edge position of the specified scene area is greater than the lower limit of the first distance prompt threshold and less than the upper limit of the first distance prompt threshold, then the direction of the edge position of the specified scene area relative to the player character is determined as the first prompt direction.
[0119] In the case where the movement type changes dynamically, it is also possible to make a judgment based on both the lower limit of the distance prompt threshold and the upper limit of the distance prompt threshold. When the distance between the player character and the edge position of the specified scene area is greater than the lower limit of the first distance prompt threshold, it is further possible to determine whether the distance between the player character and the edge position of the specified scene area is less than the upper limit of the first distance prompt threshold. The upper limit of the first distance prompt threshold is equal to the distance prompt threshold in the case where the movement type is fixed. When the distance between the player character and the edge position of the specified scene area is less than the upper limit of the first distance prompt threshold, it can be considered that when the player character moves towards the edge position of the specified scene area with the first movement type, the player character cannot move the minimum number of movement steps set by the first movement type. For example: the first movement type is jogging, the lower limit of the number of movement steps in the preset jogging type is 5 steps, the unit movement distance in jogging is 0.5 meters, and the corresponding upper limit of the first distance prompt threshold for the jogging type is 2.5. When the distance between the player character and the edge position of the specified scene area is less than 2.5 meters, when the player character moves towards the edge position of the specified scene area with the jogging movement type, the player character can move at most 4 steps. When moving the 5th step, the player character will enter the specified scene area, causing a reduction in the player character's health value. Therefore, in this case, the direction of the edge position of the specified scene area relative to the player character can also be determined as the first prompt direction. At the same time, the first prompt information can be displayed in the first prompt direction to give a timely danger prompt.
[0120] It can also be determined that the distance between the current position of the player character and the edge position of the specified scene area is relatively close. The direction of the edge position of the specified scene area relative to the player character can be determined as the first prompt direction, and the first prompt information is displayed in the first prompt direction.
[0121] Optionally, the above-mentioned first movement type may include one or more of jogging, dodging, and sprinting. Among them, the unit movement distances during jogging, dodging, and sprinting do not remain constant, and there may be a certain acceleration.
[0122] The first movement type can be an independent movement type, such as jogging, dodging, sprinting, etc., or it can be a switch between multiple movement types, such as jogging - dodging - sprinting. Whether it is an independent movement type or a switch between multiple movement types, it belongs to the situation where the movement type changes dynamically.
[0123] Optionally, in another implementable manner, the movement type may further include a second movement type. In step S202, according to at least one of the three parameters: the unit movement distance of the player character under the movement type, the preset lower limit of the movement steps under the movement type, and the unit movement distance of the player character under the specified movement type, determining the distance prompt threshold corresponding to the movement type may include: according to the unit movement distance of the player character under the second movement type, the preset lower limit of the movement steps under the second movement type, the second distance prompt threshold corresponding to the second movement type.
[0124] The second movement type may refer to a movement type with a fixed unit movement distance. That is, when the player character moves in the game scene with the second movement type, its unit movement distance remains unchanged, belonging to uniform motion.
[0125] In this case, since the movement type is fixed, the second distance prompt threshold corresponding to the second movement type can be determined according to the unit movement distance of the player character under the second movement type and the preset lower limit of the movement steps under the second movement type. In this case, there is no distinction between the upper and lower limits of the distance prompt threshold, and accurate judgment can be made only through the second distance prompt threshold.
[0126] Similarly, the calculation of the second distance prompt threshold is the same as the calculation of the above-mentioned upper limit of the first distance prompt threshold. Multiply the unit movement distance of the player character under the second movement type by the preset lower limit of the movement steps under the second movement type to obtain the second distance prompt threshold corresponding to the second movement type.
[0127] When the distance between the player character and the edge position of the specified scene area is less than the second distance prompt threshold, the first prompt threshold is displayed in the first prompt direction.
[0128] Optionally, the above-mentioned second movement type may include: walking slowly. Here, walking slowly refers to walking at a uniform speed, and the unit movement distance of the player character remains unchanged in the moving mode of walking slowly.
[0129] It should be noted that the unit movement distance of the second movement type may be less than the unit movement distance of the first movement type, and the unit movement distance of the player character under the second movement type has a large change.
[0130] Optionally, the method of the present application may further include: displaying the first prompt information in the first prompt direction according to a preset display style.
[0131] Since there may be multiple different specified scenario areas around the player character at the same time, in order to more clearly distinguish and display the first prompt information between the player character and each specified scenario area, for each specified scenario area, a display style can be adopted in the first prompt direction determined by the specified scenario area and the player character to display the first prompt information.
[0132] In an implementable manner, the first prompt information can be displayed in the form of an arrow. Among them, the arrow can be the extension line direction from the current position of the player character to the edge position of the specified scenario area, and the direction pointed by the arrow can indicate that there is danger in that direction. Among them, for different specified scenario areas, the arrow colors of the first prompt information displayed in their corresponding directions can be different.
[0133] The first information prompt can also be displayed in the form of text. For example, a text box is displayed in the first prompt direction, and prompt text is displayed in the text box.
[0134] Or, it can also be displayed in the form of a preset mark. For example, a preset mark is displayed in the first prompt direction, such as displaying an asterisk mark, etc. Of course, it is not limited to the several methods listed above.
[0135] Suppose the first prompt direction determined by the player character and the specified scenario area 1 is direction 1, and the first prompt direction determined by the player character and the specified scenario area 2 is direction 2. Then, different display styles can be adopted in direction 1 and direction 2 to display the first prompt information. Figure 4 Taking the example that arrows are used for display in both direction 1 and direction 2, in practical applications, the display methods in direction 1 and direction 2 can be different.
[0136] Optionally, the method of the present application may further include: displaying second prompt information on the graphical user interface, where the second prompt information indicates that the first distance meets the distance prompt threshold in the second prompt direction, and the second prompt direction is other directions in the same plane as the first prompt direction except the first prompt direction.
[0137] In addition, in addition to displaying the first prompt information in the first prompt direction, second prompt information can also be displayed in the second prompt direction. The second prompt direction can refer to other directions in the same plane as the first prompt direction. The second prompt direction can be considered a safe direction. When the player character moves in the second prompt direction, the health value of the player character will not be affected by external terrain factors.
[0138] Optionally, the second prompt information and the first prompt information have different display states.
[0139] In an implementable manner, the second prompt information displayed in the second prompt direction can be displayed in a display manner different from that of the first prompt information, so as to more clearly distinguish the first prompt information from the second prompt information.
[0140] For example: when the first prompt information is displayed as an arrow, the second prompt information can be text, or when the first prompt information is a red arrow, the second prompt information can be a green arrow, etc.
[0141] Figure 4 This is a schematic diagram of an information prompt interface provided by an embodiment of the present application. Figure 4 Taking the example that there are three specified scene areas around the current position of the player character, among them, the first distance between the specified scene area 1 and the player character meets the distance prompt threshold, the first distance between the specified scene area 2 and the player character also meets the distance prompt threshold, and the first distance between the specified scene area 3 and the player character does not meet the distance prompt threshold. Here, the prompt information is displayed in the form of an arrow. Then, the prompt information can be displayed in the extension direction of the edge position of the player character facing the specified scene area 1, and the prompt information can also be displayed in the extension direction of the edge position of the player character facing the specified scene area 2.
[0142] Optionally, in step S104, after the first prompt information is displayed on the graphical user interface, the method may further include: in response to a movement instruction, adjusting the movement direction of the player character to the second prompt direction.
[0143] In an implementable manner, after the first prompt information is displayed in the first prompt direction, the player can continue to control the player character to move in the first prompt direction. That is, when the player knows that there is danger in a certain direction and still continues to control the player character to move in that direction, then the player character may fall from the specified scene area and end the game.
[0144] In another implementable manner, after the first prompt information is displayed in the first prompt direction, if the player continues to control the player character to move in the first prompt direction, then in response to the player's movement instruction for the player character, the movement direction of the player character can be changed to the second prompt direction, that is, restricting the player character from moving in the dangerous direction to avoid the interruption of the game caused by terrain factors for the player character, thereby improving the player's game experience.
[0145] In summary, the information prompting method in the game provided in this embodiment determines, in real time, the first distance between the player character and the edge position of the specified scene area during the process of controlling the player character to move in the game scene based on the movement type of the player character. Then, according to the first distance and the distance prompting threshold corresponding to the movement type, it determines, in real time, the information prompting direction corresponding to the player character currently, and displays a prompt message in the information prompting direction, so as to conveniently guide the player character to avoid danger in the game, improve the probability of the player character winning the game, and enhance the game experience. For different movement types, it calculates the distance prompting thresholds corresponding to different movement types, making the obtained distance prompting thresholds more unique, improving the accuracy of the calculated distance prompting thresholds, and thus performing information prompting under each operation type based on the distance prompting thresholds, which can improve the accuracy of information prompting to make an accurate prompt for the player character. In addition, by displaying the prompt message in the information prompting direction, it can more intuitively prompt the player and improve the player's game experience.
[0146] The following describes the device, equipment, storage medium, etc. used to execute the information prompting method in the game provided in this application. For the specific implementation process and technical effects, please refer to the above, and the following will not be elaborated.
[0147] Figure 5 The following is a schematic diagram of an information prompting device in the game provided in an embodiment of this application. The functions implemented by this device correspond to the steps executed by the above method. This device can be understood as the above-mentioned server, or the processor of the server, or can also be understood as a component that realizes the functions of this application under the control of the server and is independent of the above-mentioned server or processor. Optionally, this device may include: a control module 510, a determination module 520, and a display module 530;
[0148] The control module 510 is configured to control the player character to move in the game scene according to the movement type corresponding to the movement instruction in response to the movement instruction; the movement type reflects the degree of change in the unit movement distance of the player character in the game scene based on the movement instruction.
[0149] The determination module 520 is configured to determine the first distance between the player character and the edge position of the specified scene area;
[0150] The determination module 520 is configured to determine the distance prompting threshold corresponding to the movement type; the distance prompting threshold represents the critical distance for prompting the player character of the distance from the edge position of the specified scene area.
[0151] The display module 530 is configured to display the first prompt message on the graphical user interface according to the first distance and the distance prompting threshold corresponding to the movement type; the first prompt message represents that the first distance does not meet the distance prompting threshold in the first prompt direction.
[0152] Optionally, the determining module 520 is further configured to determine the extending direction from the position before the movement of the player character towards the position after the movement as the first hint direction; or
[0153] Determine the extending direction from the position after the movement of the player character towards the edge position of the specified scene area as the first hint direction, where the edge position of the specified scene area is the edge position pointed to when the distance between the player character and the edge position of the specified scene area is the shortest.
[0154] Optionally, the determining module 520 is specifically configured to obtain the unit movement distance of the player character under the movement type;
[0155] Determine the distance hint threshold corresponding to the movement type according to at least one of the three parameters: the unit movement distance of the player character under the movement type, the preset lower limit of the movement steps under the movement type, and the unit movement distance of the player character under the specified movement type, where the specified movement type indicates the movement type with the largest unit movement distance among multiple movement types.
[0156] Optionally, the movement type includes the first movement type, and the determining module 520 is specifically configured to
[0157] Determine the upper limit of the first distance hint threshold corresponding to the first movement type according to the unit movement distance of the player character under the first movement type and the preset lower limit of the movement steps under the first movement type;
[0158] Determine the lower limit of the first distance hint threshold corresponding to the first movement type according to the unit movement distance of the player character under the specified movement type.
[0159] Optionally, the display module 530 is specifically configured to display the first hint information in the first hint direction on the graphical user interface if the distance between the player character and the edge position of the specified scene area is less than the lower limit of the first distance hint threshold.
[0160] Optionally, the display module 530 is specifically configured to display the first hint information in the first hint direction on the graphical user interface if the distance between the player character and the edge position of the specified scene area is greater than the lower limit of the first distance hint threshold and less than the upper limit of the first distance hint threshold.
[0161] Optionally, the determining module 520 is specifically configured to perform a multiplication operation on the unit movement distance of the player character under the first movement type and the preset lower limit of the movement steps under the first movement type to obtain the upper limit of the first distance hint threshold corresponding to the first movement type.
[0162] Optionally, the first movement type includes one or more of jogging, dodging, and sprinting.
[0163] Optionally, the determining module 520 is specifically configured to determine a second distance prompt threshold corresponding to the second movement type according to the unit movement distance of the player character in the second movement type and the preset lower limit of the movement steps in the second movement type.
[0164] Optionally, the determining module 520 is specifically configured to perform a multiplication operation on the unit movement distance of the player character in the second movement type and the preset lower limit of the movement steps in the second movement type to obtain a second distance prompt threshold corresponding to the second movement type.
[0165] Optionally, the unit movement distance of the second movement type is less than the unit movement distance of the first movement type.
[0166] Optionally, the second movement type includes: walking slowly.
[0167] Optionally, the display module 530 is further configured to display second prompt information on the graphical user interface, where the second prompt information represents that the first distance in the second prompt direction satisfies the distance prompt threshold, and the second prompt direction is other directions in the same plane as the first prompt direction except the first prompt direction.
[0168] Optionally, the second prompt information and the first prompt information have different display states.
[0169] Optionally, the control module 510 is further configured to adjust the movement direction of the player character to the second prompt direction in response to a movement instruction.
[0170] Through the above method, the electronic device controls the player character to move in the game scene according to the movement type corresponding to the movement instruction in response to the movement instruction; determines the first distance between the player character and the edge position of the specified scene area; determines the distance prompt threshold corresponding to the movement type; the distance prompt threshold represents the critical distance for prompting the player character of the distance from the edge position of the specified scene area; and displays the first prompt information on the graphical user interface according to the first distance and the distance prompt threshold corresponding to the movement type. Based on the movement type of the player character, the first distance between the player character and the edge position of the specified scene area is determined in real time during the process of controlling the player character to move in the game scene. Therefore, according to the first distance and the distance prompt threshold corresponding to the movement type, the information prompt direction currently corresponding to the player character is judged in real time, and the prompt information is displayed in the information prompt direction, so as to conveniently guide the player character to avoid danger in the game, improve the probability of the player character winning the game, and enhance the game experience. For different movement types, the calculation of the distance prompt threshold corresponding to different movement types is carried out, so that the obtained distance prompt threshold is more unique, the accuracy of the calculated distance prompt threshold can be improved, and thus the information prompt under each operation type can be carried out based on the distance prompt threshold, and the accuracy of the information prompt can be improved to make an accurate prompt for the player character. In addition, by displaying the prompt information in the information prompt direction, a more intuitive prompt can be made to the player, improving the player's game experience.
[0171] The above modules can be one or more integrated circuits configured to implement the above method. For example: one or more application specific integrated circuits (ASICs), or, one or more digital signal processors (DSPs), or, one or more field programmable gate arrays (FPGAs), etc. Again, when a certain module above is implemented in the form of a processing element scheduling program code, the processing element can be a general-purpose processor, such as a central processing unit (CPU) or other processors that can call program code. Again, these modules can be integrated together and implemented in the form of a system-on-a-chip (SOC).
[0172] The above-mentioned modules can be connected or communicate with each other via a wired connection or a wireless connection. The wired connection may include a metal cable, an optical fiber cable, a hybrid cable, etc., or any combination thereof. The wireless connection may include a connection in the form of a LAN, a WAN, Bluetooth, ZigBee, or NFC, etc., or any combination thereof. Two or more modules can be combined into a single module, and any one module can be divided into two or more units. Those skilled in the art can clearly understand that for the convenience and conciseness of description, the specific working processes of the systems and devices described above can refer to the corresponding processes in the method embodiments, and will not be elaborated herein.
[0173] Figure 6 The following is a schematic structural diagram of an electronic device provided by an embodiment of the present application, including: a processor 801, a storage medium 802, and a bus 803. The storage medium 802 stores machine-readable instructions executable by the processor 801. When the electronic device runs a method for prompting information in a game as in the embodiment, the processor 801 communicates with the storage medium 802 through the bus 803, and the processor 801 executes the machine-readable instructions to perform the following steps:
[0174] In response to a movement instruction, control the player character to move in the game scene according to the movement type corresponding to the movement instruction; the movement type reflects the degree of change in the unit movement distance of the player character in the game scene based on the movement instruction;
[0175] Determine a first distance between the player character and the edge position of the specified scene area;
[0176] Determine a distance prompt threshold corresponding to the movement type; the distance prompt threshold represents the critical distance for prompting the player character's distance from the edge position of the specified scene area;
[0177] According to the first distance and the distance prompt threshold corresponding to the movement type, display a first prompt message on the graphical user interface; the first prompt message represents that the first distance does not meet the distance prompt threshold in the first prompt direction.
[0178] In a feasible implementation, the processor 801 is further configured to determine the extension direction from the position before the player character moves to the position after the movement as the first prompt direction; or
[0179] Determine the extension direction from the position after the player character moves to the edge position of the specified scene area as the first prompt direction, where the edge position of the specified scene area is the edge position pointed to when the distance between the player character and the edge position of the specified scene area is the shortest.
[0180] In a feasible implementation, when the processor 801 executes to determine the distance prompt threshold corresponding to the movement type, it is specifically configured to:
[0181] Obtain the unit moving distance of the player character under the movement type;
[0182] Determine the distance prompt threshold corresponding to the movement type according to at least one of the three parameters: the unit moving distance of the player character under the movement type, the preset lower limit of the number of moving steps under the movement type, and the unit moving distance of the player character under the specified movement type. The specified movement type indicates the movement type with the largest unit moving distance among multiple movement types.
[0183] In a feasible implementation, the movement type includes the first movement type; when the processor 801 executes to determine the distance prompt threshold corresponding to the movement type according to at least one of the three parameters: the unit moving distance of the player character under the movement type, the preset lower limit of the number of moving steps under the movement type, and the unit moving distance of the player character under the specified movement type, it is specifically used for:
[0184] Determine the upper limit of the first distance prompt threshold corresponding to the first movement type according to the unit moving distance of the player character under the first movement type and the preset lower limit of the number of moving steps under the first movement type;
[0185] Determine the lower limit of the first distance prompt threshold corresponding to the first movement type according to the unit moving distance of the player character under the specified movement type.
[0186] In a feasible implementation, when the processor 801 executes to display the first prompt information on the graphical user interface according to the first distance and the first distance prompt threshold corresponding to the first movement type, it is specifically used for: if the distance between the player character and the edge position of the specified scene area is less than the lower limit of the first distance prompt threshold, then display the first prompt information in the first prompt direction on the graphical user interface.
[0187] In a feasible implementation, when the processor 801 executes to display the first prompt information on the graphical user interface according to the first distance and the first distance prompt threshold corresponding to the first movement type, it is specifically used for: if the distance between the player character and the edge position of the specified scene area is greater than the lower limit of the first distance prompt threshold and less than the upper limit of the first distance prompt threshold, then display the first prompt information in the first prompt direction on the graphical user interface.
[0188] In a feasible implementation, when the processor 801 executes to determine the upper limit of the first distance prompt threshold corresponding to the first movement type according to the unit moving distance of the player character under the first movement type and the preset lower limit of the number of moving steps under the first movement type, it is specifically used for performing a multiplication operation on the unit moving distance of the player character under the first movement type and the preset lower limit of the number of moving steps under the first movement type to obtain the upper limit of the first distance prompt threshold corresponding to the first movement type.
[0189] In a feasible implementation, the movement type includes a second movement type; when the processor 801 determines the distance prompt threshold corresponding to the movement type by executing at least one of the three parameters: the unit movement distance of the player character under the movement type, the lower limit of the preset movement steps under the first movement type, and the unit movement distance of the player character under the specified movement type, it is specifically used to determine the second distance prompt threshold corresponding to the second movement type according to the unit movement distance of the player character under the second movement type and the lower limit of the preset movement steps under the second movement type.
[0190] In a feasible implementation, when the processor 801 determines the second distance prompt threshold corresponding to the second movement type according to the unit movement distance of the player character under the second movement type and the lower limit of the preset movement steps under the second movement type, it is specifically used to perform a multiplication operation on the unit movement distance of the player character under the second movement type and the lower limit of the preset movement steps under the second movement type to obtain the second distance prompt threshold corresponding to the second movement type.
[0191] In a feasible implementation, after the processor 801 displays the prompt information in each information prompt direction, it is further used to respond to the operation of moving the player character in the information prompt direction and adjust the moving direction of the player character to a non-information prompt direction.
[0192] In a feasible implementation, the processor 801 is further used to execute the display of a second prompt information on the graphical user interface, where the second prompt information represents that the first distance satisfies the distance prompt threshold in the second prompt direction, and the second prompt direction is another direction in the same plane as the first prompt direction except the first prompt direction.
[0193] In a feasible implementation, the processor 801 is further used to execute the response to the movement instruction and adjust the moving direction of the player character to the second prompt direction.
[0194] Through the above method, the electronic device controls the player character to move in the game scene according to the movement type corresponding to the movement instruction in response to the movement instruction; determines the first distance between the player character and the edge position of the specified scene area; determines the distance prompt threshold corresponding to the movement type; the distance prompt threshold represents the critical distance for prompting the player character of the distance from the edge position of the specified scene area; and displays the first prompt information on the graphical user interface according to the first distance and the distance prompt threshold corresponding to the movement type. Based on the movement type of the player character, the first distance between the player character and the edge position of the specified scene area is determined in real time during the process of controlling the player character to move in the game scene, so as to judge the current information prompt direction corresponding to the player character in real time according to the first distance and the distance prompt threshold corresponding to the movement type, and display the prompt information in the information prompt direction, so as to conveniently guide the player character to avoid danger in the game, improve the probability of the player character winning the game, and enhance the game experience. For different movement types, the calculation of the distance prompt threshold corresponding to different movement types is carried out, so that the obtained distance prompt threshold is more unique, the accuracy of the calculated distance prompt threshold can be improved, and thus the information prompt under each operation type can be carried out based on the distance prompt threshold, so as to improve the accuracy of the information prompt and make an accurate prompt for the player character. In addition, by displaying the prompt information in the information prompt direction, a more intuitive prompt can be made to the player, improving the player's game experience.
[0195] Among them, the storage medium 802 stores program codes, and when the program codes are executed by the processor 801, the processor 801 is caused to execute various steps in the methods according to various exemplary embodiments of the present application described in the above "exemplary method" part of this specification.
[0196] The processor 801 may be a general-purpose processor, such as a central processing unit (CPU), a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, and can implement or execute the various methods, steps, and logic block diagrams disclosed in the embodiments of the present application. The general-purpose processor may be a microprocessor or any conventional processor, etc. The steps of the method disclosed in combination with the embodiments of the present application may be directly embodied as being executed by the hardware processor, or executed by a combination of hardware and software modules in the processor.
[0197] The storage medium 802, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules. The memory can include at least one type of storage medium, for example, it can include flash memory, hard disk, multimedia card, card-type memory, random access memory (RAM), static random access memory (SRAM), programmable read-only memory (PROM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), magnetic memory, magnetic disk, optical disc, and so on. The memory is any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited to this. The storage medium 802 in the embodiments of the present application can also be a circuit or any other device capable of implementing a storage function, for storing program instructions and / or data.
[0198] Optionally, the embodiments of the present application also provide a computer-readable storage medium, on which a computer program is stored, and when the computer program is run by a processor, the processor executes the following steps:
[0199] In response to a movement instruction, control the player character to move in the game scene according to the movement type corresponding to the movement instruction; the movement type reflects the degree of change in the unit movement distance of the player character in the game scene based on the movement instruction;
[0200] Determine the first distance between the player character and the edge position of the specified scene area;
[0201] Determine the distance prompt threshold corresponding to the movement type; the distance prompt threshold represents the critical distance for prompting the player character's distance from the edge position of the specified scene area;
[0202] According to the first distance and the distance prompt threshold corresponding to the movement type, display the first prompt information on the graphical user interface; the first prompt information represents that the first distance does not meet the distance prompt threshold in the first prompt direction.
[0203] In a feasible implementation, the processor 801 is further configured to determine the extension direction from the position before the player character moves to the position after the move as the first prompt direction; or
[0204] Determine the first hint direction as the extension direction from the position after the player character moves towards the edge position of the specified scene area, where the edge position of the specified scene area is the edge position pointed to when the distance between the player character and the edge position of the specified scene area is the shortest.
[0205] In a feasible implementation, when the processor 801 executes to determine the distance hint threshold corresponding to the movement type, it is specifically used for:
[0206] Obtain the unit movement distance of the player character under the movement type;
[0207] Determine the distance hint threshold corresponding to the movement type according to at least one of the three parameters: the unit movement distance of the player character under the movement type, the preset minimum number of movement steps under the movement type, and the unit movement distance of the player character under the specified movement type. The specified movement type indicates the movement type with the largest unit movement distance among multiple movement types.
[0208] In a feasible implementation, the movement type includes the first movement type; when the processor 801 executes to determine the distance hint threshold corresponding to the movement type according to at least one of the three parameters: the unit movement distance of the player character under the movement type, the preset minimum number of movement steps under the movement type, and the unit movement distance of the player character under the specified movement type, it is specifically used for:
[0209] Determine the upper limit of the first distance hint threshold corresponding to the first movement type according to the unit movement distance of the player character under the first movement type and the preset minimum number of movement steps under the first movement type;
[0210] Determine the lower limit of the first distance hint threshold corresponding to the first movement type according to the unit movement distance of the player character under the specified movement type.
[0211] In a feasible implementation, when the processor 801 executes to display the first hint information on the graphical user interface according to the first distance and the first distance hint threshold corresponding to the first movement type, it is specifically used for: if the distance between the player character and the edge position of the specified scene area is less than the lower limit of the first distance hint threshold, then display the first hint information in the first hint direction on the graphical user interface.
[0212] In a feasible implementation, when the processor 801 executes to display the first hint information on the graphical user interface according to the first distance and the first distance hint threshold corresponding to the first movement type, it is specifically used for: if the distance between the player character and the edge position of the specified scene area is greater than the lower limit of the first distance hint threshold and less than the upper limit of the first distance hint threshold, then display the first hint information in the first hint direction on the graphical user interface.
[0213] In a feasible implementation, when the processor 801 determines the upper limit of the first distance prompt threshold corresponding to the first movement type according to the unit movement distance of the player character under the first movement type and the lower limit of the preset movement steps under the first movement type, it is specifically used to perform a multiplication operation on the unit movement distance of the player character under the first movement type and the lower limit of the preset movement steps under the first movement type to obtain the upper limit of the first distance prompt threshold corresponding to the first movement type.
[0214] In a feasible implementation, the movement type includes a second movement type; when the processor 801 determines the distance prompt threshold corresponding to the movement type according to at least one of the three parameters of the unit movement distance of the player character under the movement type, the lower limit of the preset movement steps under the first movement type, and the unit movement distance of the player character under the specified movement type, it is specifically used to determine the second distance prompt threshold corresponding to the second movement type according to the unit movement distance of the player character under the second movement type and the lower limit of the preset movement steps under the second movement type.
[0215] In a feasible implementation, when the processor 801 determines the second distance prompt threshold corresponding to the second movement type according to the unit movement distance of the player character under the second movement type and the lower limit of the preset movement steps under the second movement type, it is specifically used to perform a multiplication operation on the unit movement distance of the player character under the second movement type and the lower limit of the preset movement steps under the second movement type to obtain the second distance prompt threshold corresponding to the second movement type.
[0216] In a feasible implementation, after the processor 801 displays the prompt information in each information prompt direction, it is further used to respond to the operation of moving the player character in the information prompt direction and adjust the moving direction of the player character to a non-information prompt direction.
[0217] In a feasible implementation, the processor 801 is further used to execute the display of the second prompt information on the graphical user interface, and the second prompt information represents that the first distance satisfies the distance prompt threshold in the second prompt direction, and the second prompt direction is another direction in the same plane as the first prompt direction except the first prompt direction.
[0218] In a feasible implementation, the processor 801 is further used to execute and adjust the moving direction of the player character to the second prompt direction in response to the movement instruction.
[0219] Through the above method, the electronic device controls the player character to move in the game scene according to the movement type corresponding to the movement instruction in response to the movement instruction; determines the first distance between the player character and the edge position of the specified scene area; determines the distance prompt threshold corresponding to the movement type; the distance prompt threshold represents the critical distance for prompting the player character's distance from the edge position of the specified scene area; and displays the first prompt information on the graphical user interface according to the first distance and the distance prompt threshold corresponding to the movement type. Based on the movement type of the player character, the first distance between the player character and the edge position of the specified scene area is determined in real time during the process of controlling the player character to move in the game scene. Thus, according to the first distance and the distance prompt threshold corresponding to the movement type, the information prompt direction corresponding to the player character is judged in real time, and the prompt information is displayed in the information prompt direction, so as to conveniently guide the player character to avoid danger in the game, improve the probability of the player character winning the game, and enhance the game experience. For different movement types, the calculation of the distance prompt threshold corresponding to different movement types is carried out, so that the obtained distance prompt threshold is more unique, the accuracy of the calculated distance prompt threshold can be improved, and thus the information prompt under each operation type can be carried out based on the distance prompt threshold, and the accuracy of the information prompt can be improved to make an accurate prompt for the player character. In addition, by displaying the prompt information in the information prompt direction, a more intuitive prompt can be made to the player, improving the player's game experience.
[0220] In the embodiment of the present application, when the computer program is run by the processor, it can also execute other machine-readable instructions to execute the methods described in other parts of the embodiment. For the specific method steps and principles of execution, refer to the description of the embodiment, and details will not be elaborated here.
[0221] In several embodiments provided by the present application, it should be understood that the disclosed device and method can be implemented in other ways. For example, the device embodiments described above are only illustrative. For example, the division of the units is only a logical function division, and there may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed mutual coupling or direct coupling or communication connection can be through some interfaces, and the indirect coupling or communication connection of the device or unit can be in an electrical, mechanical or other form.
[0222] The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place or distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0223] In addition, the functional units in the various embodiments of the present application may be integrated into one processing unit, may exist separately as individual physical units, or two or more units may be integrated into one unit. The above-mentioned integrated units may be implemented in the form of hardware, or in the form of a combination of hardware and software functional units.
[0224] The above-mentioned integrated units implemented in the form of software functional units may be stored in a computer-readable storage medium. The above-mentioned software functional units stored in a storage medium include several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor (English: processor) to execute some steps of the methods described in the various embodiments of the present application. The aforementioned storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memories (English: Read-Only Memory, abbreviated as: ROM), random access memories (English: Random Access Memory, abbreviated as: RAM), magnetic disks, or optical discs that can store program codes.
Claims
1. A method for information prompting in a game, characterized in that, Display a game scene and the player character therein through a graphical user interface provided by a terminal device, including: In response to a movement instruction, control the player character to move in the game scene according to the movement type corresponding to the movement instruction; the movement type reflects the degree of change in the unit movement distance executed by the player character in the game scene based on the movement instruction; Determine a first distance between the player character and the edge position of a specified scene area; Determine a distance prompt threshold corresponding to the movement type; the distance prompt threshold represents a critical distance for prompting the player character of the distance from the edge position of the specified scene area; According to the first distance and the distance prompt threshold corresponding to the movement type, display a first prompt message on the graphical user interface; the first prompt message represents that the first distance does not meet the distance prompt threshold in the first prompt direction; The determining the distance prompt threshold corresponding to the movement type includes: Obtain the unit movement distance of the player character under the movement type; Determine the distance prompt threshold corresponding to the movement type according to at least one of three parameters: the unit movement distance of the player character under the movement type, the preset lower limit of the number of movement steps under the movement type, and the unit movement distance of the player character under the specified movement type, where the specified movement type indicates the movement type with the largest unit movement distance among multiple movement types.
2. The method according to claim 1, characterized in that The method further includes: Determine the first prompt direction as the extension direction from the position before the player character moves to the position after the move; or Determine the first prompt direction as the extension direction from the position after the player character moves to the edge position of the specified scene area, where the edge position of the specified scene area is the edge position pointed to when the distance between the player character and the edge position of the specified scene area is the shortest.
3. The method according to claim 1, wherein The movement type includes a first movement type, and the determining the distance prompt threshold corresponding to the movement type according to at least one of three parameters: the unit movement distance of the player character under the movement type, the preset lower limit of the number of movement steps under the movement type, and the unit movement distance of the player character under the specified movement type includes: Determine an upper limit of the first distance prompt threshold corresponding to the first movement type according to the unit movement distance of the player character under the first movement type and the preset lower limit of the number of movement steps under the first movement type; Determine a lower limit of the first distance prompt threshold corresponding to the first movement type according to the unit movement distance of the player character under the specified movement type.
4. The method according to claim 3, characterized in that, The displaying the first prompt message on the graphical user interface according to the first distance and the first distance prompt threshold corresponding to the first movement type includes: If the distance between the player character and the edge position of the specified scene area is less than the lower limit of the first distance prompt threshold, display the first prompt message in the first prompt direction on the graphical user interface.
5. The method according to claim 3, wherein The displaying the first prompt message on the graphical user interface according to the first distance and the first distance prompt threshold corresponding to the first movement type includes: If the distance between the player character and the edge position of the specified scene area is greater than the lower limit of the first distance prompt threshold and less than the upper limit of the first distance prompt threshold, the first prompt information is displayed in the first prompt direction on the graphical user interface.
6. The method according to claim 3, wherein The determining of the upper limit of the first distance prompt threshold corresponding to the first movement type according to the unit movement distance of the player character under the first movement type and the preset lower limit of the movement steps under the first movement type includes: Performing a multiplication operation on the unit movement distance of the player character under the first movement type and the preset lower limit of the movement steps under the first movement type to obtain the upper limit of the first distance prompt threshold corresponding to the first movement type.
7. The method according to claim 3, wherein The first movement type includes one or more of jogging, dodging, and sprinting.
8. The method according to claim 3, wherein The movement type includes a second movement type. The determining of the distance prompt threshold corresponding to the movement type according to at least one of the three parameters of the unit movement distance of the player character under the movement type, the preset lower limit of the movement steps under the first movement type, and the unit movement distance of the player character under the specified movement type includes: Determining the second distance prompt threshold corresponding to the second movement type according to the unit movement distance of the player character under the second movement type and the preset lower limit of the movement steps under the second movement type.
9. The method according to claim 8, wherein The determining of the second distance prompt threshold corresponding to the second movement type according to the unit movement distance of the player character under the second movement type and the preset lower limit of the movement steps under the second movement type includes: Performing a multiplication operation on the unit movement distance of the player character under the second movement type and the preset lower limit of the movement steps under the second movement type to obtain the second distance prompt threshold corresponding to the second movement type.
10. The method according to claim 8, characterized in that The unit movement distance of the second movement type is less than the unit movement distance of the first movement type.
11. The method according to claim 8, wherein The second movement type includes: walking slowly.
12. The method according to claim 1, wherein The method further includes: Displaying second prompt information on the graphical user interface, where the second prompt information represents that the first distance in the second prompt direction satisfies the distance prompt threshold, and the second prompt direction is other directions in the same plane as the first prompt direction except the first prompt direction.
13. The method according to claim 12, wherein The second prompt information has a different display state from the first prompt information.
14. The method according to claim 12, wherein After displaying the first prompt information on the graphical user interface, the method further includes: In response to a movement instruction, adjusting the movement direction of the player character to the second prompt direction.
15. An information prompting device in a game, characterized in that, Displaying the game scene and the player character therein through the graphical user interface provided by the terminal device; including: a control module, a determination module, and a display module; The control module is configured to control the player character to move in the game scene according to the movement type corresponding to the movement instruction in response to the movement instruction; the movement type reflects the degree of change in the unit movement distance of the player character in the game scene based on the movement instruction. The determination module is configured to determine the first distance between the player character and the edge position of the specified scene area. The determining module is configured to determine a distance prompt threshold corresponding to the movement type; the distance prompt threshold represents a critical distance for prompting the player character of the distance from the edge position of the specified scene area; The display module is configured to display first prompt information on the graphical user interface according to the first distance and the distance prompt threshold corresponding to the movement type; the first prompt information represents that the first distance does not meet the distance prompt threshold in the first prompt direction; The determining module is specifically configured to obtain the unit movement distance of the player character under the movement type; Determine the distance prompt threshold corresponding to the movement type according to at least one of the three parameters of the unit movement distance of the player character under the movement type, the preset lower limit of the movement steps under the movement type, and the unit movement distance of the player character under the specified movement type, where the specified movement type indicates the movement type with the largest unit movement distance among multiple movement types.
16. An electronic device, characterized in that, Comprising: A processor, a storage medium and a bus, the storage medium stores program instructions executable by the processor, when the electronic device runs, the processor communicates with the storage medium through the bus, and the processor executes the program instructions to perform the steps of the method according to any one of claims 1 to 14 when executed.
17. A computer-readable storage medium, characterized in that, A computer program is stored on the storage medium, and when the computer program is run by the processor, it performs the steps of the method according to any one of claims 1 to 14.
Citation Information
Patent Citations
Security protection method and system based on AR game, and readable storage medium
CN110833691A
Information prompting method and device in game, electronic equipment and storage medium
CN113457147A