CN113082713B - Game control method and device and electronic equipment - Google Patents

Game control method and device and electronic equipment Download PDF

Info

Publication number
CN113082713B
CN113082713B CN202110226475.2A CN202110226475A CN113082713B CN 113082713 B CN113082713 B CN 113082713B CN 202110226475 A CN202110226475 A CN 202110226475A CN 113082713 B CN113082713 B CN 113082713B
Authority
CN
China
Prior art keywords
control object
game
control
current position
target
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110226475.2A
Other languages
Chinese (zh)
Other versions
CN113082713A (en
Inventor
徐治钦
彭美
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Yiyu Network Technology Co Ltd
Original Assignee
Shanghai Hard Link Network Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Hard Link Network Technology Co ltd filed Critical Shanghai Hard Link Network Technology Co ltd
Priority to CN202110226475.2A priority Critical patent/CN113082713B/en
Publication of CN113082713A publication Critical patent/CN113082713A/en
Application granted granted Critical
Publication of CN113082713B publication Critical patent/CN113082713B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/55Controlling game characters or game objects based on the game progress
    • A63F13/56Computing the motion of game characters with respect to other game characters, game objects or elements of the game scene, e.g. for simulating the behaviour of a group of virtual soldiers or for path finding
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/80Special adaptations for executing a specific game genre or game mode
    • A63F13/822Strategy games; Role-playing games
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/80Special adaptations for executing a specific game genre or game mode
    • A63F13/837Shooting of targets
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F2300/00Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game
    • A63F2300/60Methods for processing data by generating or executing the game program
    • A63F2300/65Methods for processing data by generating or executing the game program for computing the condition of a game character
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F2300/00Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game
    • A63F2300/80Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game specially adapted for executing a specific type of game
    • A63F2300/807Role playing or strategy games
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F2300/00Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game
    • A63F2300/80Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game specially adapted for executing a specific type of game
    • A63F2300/8076Shooting

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The application discloses a game control method, a game control device and electronic equipment, wherein the method comprises the following steps: detecting a non-control object; when detecting that a non-control object is in a preset area of a control object, adjusting the target direction of the control object, wherein the control object is a game object which moves when receiving a movement instruction; and pointing the target to the non-control object with the distance between the non-control object and the control object in the preset area and the preset distance.

Description

Game control method and device and electronic equipment
Technical Field
The present application relates to the field of computer technologies, and in particular, to a game control method and apparatus, and an electronic device.
Background
With the development of technology, games running on user terminals are generally operated by touching a display screen of the user terminal. Existing game operations are performed by using a dual roulette operation, i.e., there is a roulette wheel that controls the movement of a game character and another roulette wheel that controls the turning of the game character. However, the operation mode of the double-wheel disc is suitable for horizontal screen operation, in a game requiring a user terminal to perform vertical screen operation, the use of the operation mode of the double-wheel disc enables a slidable area of a user to be smaller when the user controls a game role to move, operation is inconvenient, user experience is low, the operation mode of the double-wheel disc enables the user terminal to simultaneously synchronize the operation of the double-wheel disc, and background calculation amount is large.
Disclosure of Invention
An object of the present invention is to solve at least one of the technical problems in the prior art, and to provide a game control method, an apparatus, and an electronic device, which can increase a slidable area when a user controls a movement of a game character without setting a wheel for controlling the turning of the game character, and reduce the amount of data calculation of a terminal.
The embodiment of the application provides a game control method, which comprises the following steps:
detecting a non-control object;
when detecting that a non-control object is in a preset area of a control object, adjusting the target direction of the control object, wherein the control object is a game object which moves when receiving a movement instruction;
and pointing the target to the non-control object with the distance between the non-control object and the control object in the preset area and the preset distance.
Further, before detecting the non-control object, the method further includes:
detecting a current position of the control object;
and controlling the non-control object to move towards the control object according to the current position.
Further, controlling the non-control object to move to the control object according to the current position includes:
generating a moving path according to the current position of the control object and the initial position of the non-control object;
controlling the non-control object to move to the control object according to the moving path.
Further, generating a moving path according to the current position of the control object and the starting position of the non-control object includes:
calling a backbone road network of the game scene where the control object and the non-control object are located, wherein the backbone road network is formed by coordinates of a plurality of points forming the game scene;
acquiring a first coordinate of the current position, a second coordinate of the initial position and third coordinates of non-passing areas in the trunk road network;
and generating the moving path according to the first coordinate, the second coordinate and each third coordinate.
Further, the game control method further includes:
and when the target game mode is a preset game mode, updating the game role data according to the game progress of the target game mode.
Further, the game character data includes at least one of image data of a game character, life value data of the game character, and output value data of the game character.
Further, each game mode comprises a strategy game mode or a third person named shooting game mode.
In an embodiment of the present application, there is also provided a game control apparatus including:
the instruction receiving module is used for receiving a game switching instruction in the current game mode;
the mode selection module is used for selecting a target game mode according to the game switching instruction;
the data acquisition module is used for acquiring first game process data of the target game mode and game role data of the current game mode;
and the game switching module is used for operating the game process of the target game mode according to the first game process data and the game role data.
Further, an embodiment of the present application provides an electronic device, including: a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the game control method as described in the above embodiments when executing the program.
Further, the present application provides a computer-readable storage medium, which stores computer-executable instructions for causing a computer to execute the game control method according to the above embodiment.
Compared with the prior art, the embodiment detects the non-control object, and adjusts the target pointing direction of the control object to face the non-control object in the preset area when the non-control object is detected to be in the preset area of the control object, so that in a game operated in a vertical screen, the single wheel disc can be used for realizing the steering of the role, the user experience is improved, and the background calculation amount is reduced.
In the embodiment, before the non-control object is detected to steer the control object, the current position of the control object is detected, and the non-control object is controlled to move to the control object according to the current position, so that the non-control object can move towards the control object, the situation that the non-control object needs to be searched by a user when the non-control object is not moved or moves randomly is avoided, and the user experience is further improved.
In the above embodiment, the moving path is generated according to the current position of the controlled object and the starting position of the non-controlled object, and the non-controlled object is controlled to move to the controlled object according to the moving path, so that the non-controlled object can move to the controlled object according to a certain moving path, the non-controlled object is prevented from changing the moving path according to the position change condition of the non-controlled object, the moving path can be fixed, the moving path of the non-controlled object can be expected, and the background computation amount is further reduced.
In the embodiment, the main road network of the game scene is called to obtain the current position coordinates of the controlled object, the initial position coordinates of the non-controlled object and the coordinates of each non-passing area, and the moving path of the non-controlled object is generated according to the three coordinates, so that the non-controlled object can avoid each non-passing area, the non-controlled object is prevented from unreasonable movement, and the game experience of a user is improved.
Drawings
The present application is further described with reference to the following figures and examples;
FIG. 1 is a diagram of an application environment of a game control method according to an embodiment;
FIG. 2 is a diagram showing another exemplary application environment of the game control method according to the embodiment;
FIG. 3 is a flow diagram illustrating a method of game control in one embodiment;
FIG. 4 is a schematic diagram of a movement path of a non-control object;
FIG. 5 is a schematic view of another movement path of a non-control object;
FIG. 6 is a schematic diagram of the structure of a game control apparatus according to an embodiment;
FIG. 7 is a block diagram of a computer device in one embodiment.
Detailed Description
Reference will now be made in detail to the present embodiments of the present application, preferred embodiments of which are illustrated in the accompanying drawings, which are for the purpose of visually supplementing the description with figures and detailed description, so as to enable a person skilled in the art to visually and visually understand each and every feature and technical solution of the present application, but not to limit the scope of the present application.
To improve the playability of electronic games, current electronic games typically have multiple game modes for players. Among them, the Game modes include a Role-Playing Game mode (RPG), an Action Role-Playing Game mode (a-RPG), a strategic Role-Playing Game mode (S-RPG), a Multiplayer Online tactical sports Game Mode (MOBA), an Action Shooter Game mode (STG), a First-person perspective Shooting Game mode (First-person Shooting, FPS), an Action Game mode (Action Game, ACT), a Third-person perspective Shooting Game (TPS), and a Strategy Game mode (SLG). With the development of technology, games played on user terminals generally perform game operations by touching the display screen of the user terminal. Existing game operations are performed by using a dual roulette operation, i.e., there is a roulette wheel that controls the movement of a game character and another roulette wheel that controls the turning of the game character. However, the operation mode of the double-wheel disc is suitable for horizontal screen operation, in a game requiring a user terminal to perform vertical screen operation, the use of the operation mode of the double-wheel disc enables a slidable area of a user to be smaller when the user controls a game role to move, operation is inconvenient, user experience is low, the operation mode of the double-wheel disc enables the user terminal to simultaneously synchronize the operation of the double-wheel disc, and background calculation amount is large. For example, in landscape operation, a wheel may be used to control the movement of the game character and the area of the screen outside the wheel may be used to control the direction of the game character. Or a certain area on the screen is adopted to control the movement of the game character, and the screen area outside the area is adopted to control the steering of the game character. When the game is operated in the vertical screen mode, the wheel disc for controlling the movement of the game role or the area outside the area is small, and the operation is inconvenient; and if the wheel for controlling the movement of the game role or the screen area above the area is adopted to control the steering of the game role, the operation is inconvenient, and the appearance of the game displayed on the screen can be influenced.
To solve the above technical problem, as shown in fig. 1, it is an application environment diagram of a game control method in an embodiment. Referring to fig. 1, the game control method is applied to a user terminal 110. The user terminal 110 may be a stand-alone user terminal, such as a mobile phone, a tablet computer, a notebook computer, a wearable device, or a desktop computer. In the user terminal 110, when the vertical screen operation mode is adopted, the user terminal 110 detects a non-control object, and when it is detected that the non-control object is located in a preset area of the control object, adjusts a target direction of the control object to face the non-control object in the preset area. The non-control object refers to a game object which is not required to be controlled by a user through a single roulette wheel or a certain screen area in the game process, and the control object refers to a game object which moves when a movement instruction is received. Among them, a Non-control object, i.e., a Non-Player Character (NPC). The control object, i.e., the Player Character, may also be called a Player-Controlled Character (PCC).
In one embodiment, as shown in FIG. 2, it is another application environment diagram of the game control method in one embodiment. In the application environment, the user terminal 110 is connected to the server 120 through a network, the terminal 110 may be a desktop terminal 110 or a mobile terminal 110, and the mobile terminal may be one of a mobile phone, a tablet computer, a notebook computer, a wearable device, and the like. The server 120 may be implemented by an independent server 120 or a server cluster composed of a plurality of servers 120, and may also be a cloud server providing basic cloud computing services such as a cloud service, a cloud database, cloud computing, a cloud function, cloud storage, a web service, cloud communication, middleware service, a domain name service, a security service, a CDN, and a big data and artificial intelligence platform. In this embodiment, the user terminal 110 may be used as a front end of a game client running a game, and the server 120 may be used as a background of the game client, so that after the server 120 obtains a call request of a backbone road network of a game scene sent by a game user in the user terminal 110 through the game client, a long connection may be quickly established with the user terminal 110. When the server 120 establishes a long connection with the user terminal 110, the user terminal 110 can schedule the backbone network of the game scene stored in the server from the server 120. In this embodiment, the server 120 may also quickly establish a long connection with the user terminal 110 after acquiring the non-control object detection request sent by the game user in the user terminal 110 through the game client. After the server 120 establishes the long connection with the user terminal 110, the server 120 can detect the non-control object and also can detect whether the non-control object is in a preset area of the control object.
Hereinafter, the game control method provided in the embodiments of the present application will be described and explained in detail through several specific embodiments.
In one embodiment, as shown in FIG. 3, a game control method is provided. The embodiment is mainly illustrated by applying the method to computer equipment. The computer device may specifically be the user terminal 110 in fig. 1 described above.
Referring to fig. 3, the game control method specifically includes the following steps:
and S11, detecting a non-control object.
In the present embodiment, in the application environment as shown in fig. 1, the user terminal 110 detects a non-control object; in the application environment as shown in fig. 2, the user terminal 110 or the server 120 detects the detection of the non-control object. The user terminal adopts a vertical screen operation game mode, and controls a game object by adopting a single roulette wheel or a certain screen area, wherein the non-control object refers to the game object which does not need to be controlled by a user in the game process.
In this embodiment, the manner of detecting the non-control object may specifically be that a user terminal sets a specific name or identifier for each non-control object in a game scene, the set user terminal or server performs traversal detection on all objects in the game scene, and when the user terminal or server detects a specific name or identifier, the non-control object may be identified according to the specific name or identifier. For example, the user terminal sets identifiers NPC [1] -NPC [ n ] for n NPCs (Non-Player Characters) in the game respectively, the user terminal or the server traverses the identifiers for detecting all objects in the game scene, and when one or more of the n identifiers NPC [1] -NPC [ n ] are detected, one or more Non-control objects are detected. The game scene is composed of control objects, non-control objects and other game contents, such as barracks and factories, and the control objects, the non-control objects and the other game contents can be one or more points in the game scene. Objects in the game scene include control objects and non-control objects. The set identifier may be a parameter or a symbol or a color.
And S12, when the non-control object is detected to be in the preset area of the control object, adjusting the target direction of the control object, wherein the control object is a game object which moves when receiving the movement instruction.
In this embodiment, in the application environment shown in fig. 1, the user terminal 110 detects whether a non-control object is in a preset area of a control object; in the application environment as shown in fig. 2, the user terminal 110 or the server 120 detects whether a non-control object is in a preset area of a control object. And when the non-control object is detected to be in the preset area of the control object, adjusting the target direction of the control object. The preset region of the control object may be a region of a certain range centered on the control object, for example, the preset region of the control object is a circular range with a radius of 10m (where m is a length unit in the set game scene, and the same applies below) centered on the control object, or a rectangular region with a length of 5m and a width of 4m centered on the control object. The preset region of the control object may also be one or more regions other than the position of the control object, for example, the preset region of the control object is a rectangular region 5m in front of the control object and 10m in length and 8m in width, or a rectangular region 5m in front of the control object and 10m in width and 8m in width and a square region 1m in length and 1m behind the control object. The control object refers to a game object that moves when a movement instruction is received. The moving instruction can be obtained through direct input of a user or automatically generated by the user terminal according to the content input by the user. The instruction form and the generation manner are the prior art, and are not described herein again.
Specifically, whether the coordinates of the non-control object in the trunk road network are coincident with the coordinates of the preset area of the control object in the trunk road network or not is detected by calling the trunk road network of the game scene where the control object and the non-control object are located. The trunk road network is composed of coordinates of a plurality of points forming a game scene, the non-control object may be one point or a plurality of points in the game scene, and the preset area may be one point or a plurality of points in the game scene. In the application environment shown in fig. 1, the main road network is stored in the user terminal 110, and at this time, the user terminal 110 calls the main road network from itself when detecting whether a non-control object is in a preset area of the control object. In the application environment shown in fig. 2, the main road network may be stored in the user terminal 110 or the server 120, and when the main road network is stored in the user terminal 110 and the server 120 detects whether the non-control object is in the preset area of the control object, the server 120 calls the main road network from the user terminal 110; when the backbone network is stored in the server 120 and the server 120 detects whether the non-control object is in the preset area of the control object, the server 120 calls the backbone network from itself.
When the coordinate of the non-control object in the main road network is detected to coincide with the coordinate of the preset area of the control object in the main road network, the non-control object is in the preset area of the control object. For example, the coordinates of the non-control object are (50,50), and the preset region of the control object is a rectangular region whose four end point coordinates are (0,0), (0, 100), (100,0), and (100 ).
And when detecting that the non-control object is in the preset area of the control object, the user terminal adjusts the target direction of the control object. Among them, the Game modes include a Role-Playing Game mode (RPG), an Action Role-Playing Game mode (a-RPG), a strategic Role-Playing Game mode (S-RPG), a Multiplayer Online tactical sports Game Mode (MOBA), an Action Shooter Game mode (STG), a First person perspective Shooting Game mode (First-person Shooting, FPS), an Action Game mode (Action Game, ACT), a Third person perspective Shooting Game (TPS), and a Strategy Game mode (SLG). Therefore, the control object in the game is generally in a human shape, an animal shape or a device shape (such as a tank or an automobile), and in this case, the target of the control object is directed to the head of the control object or the front of the control object. For example, if the control object is a human character, the target orientation is the character face orientation; if the control object is an animal-shaped character, the target orientation is the head orientation of the character; if the control object is a device-shaped character, the target point is the character front-end orientation (e.g., tank head or car head).
And S13, pointing the target to a non-control object with a preset distance away from the control object in the preset area.
In this embodiment, the user terminal adjusts the target pointing direction of the control object to a non-control object whose distance from the control object in the preset area is at a preset distance. Wherein, since there may be one or more non-control objects in the preset area, the preset distance refers to the distance condition that the target of the selected control object is pointed to the non-control object to be pointed to, for example, there are 3 non-control objects in the preset area, which are npc [1] and npc [2] and npc [3], and the distance to the control object is 1m,2m and 3m, respectively, and the preset distance may be 1m at this time, then the target of the control object is pointed to the non-control object npc [3]. In addition, the preset distance may be set to a condition value instead of a fixed value, for example, if the preset distance is <2m, the target of the control object is still directed to the non-control object npc [3]. When there is more than one non-control object with a preset distance from the control object, for example, 3 non-control objects, at this time, the user terminal may point the target of the control object toward any one of the 3 non-control objects; the user terminal may also point the target of the control object towards the closest one of the 3 non-control objects to the control object.
In one embodiment, before detecting the non-control object, the method further includes:
detecting a current position of a control object;
and controlling the non-control object to move to the control object according to the current position.
In the present embodiment, in the application environment as shown in fig. 1, the user terminal 110 detects the current position of the control object; in the application environment as shown in fig. 2, the user terminal 110 or the server 120 detects the current position of the control object. The current position refers to the position of the control object in the game scene when the user terminal or the server detects the current position.
The method comprises the steps of detecting the current position of a control object, specifically setting a specific name or identification for the control object in a game scene through a user terminal, performing traversal detection on all objects in the game scene through the set user terminal, identifying the control object according to the specific name or identification after the user terminal detects the specific name or identification, and determining the position of the control object in the game scene as the current position of the control object when the control object is detected. For example, the user terminal sets the identifiers js to the characters in the game respectively, the user terminal traverses the identifiers of all objects in the detection game scene, when the identifier js is detected, the control object is detected, and at this time, the current position of the control object can be obtained according to the position of the control object in the game scene. The game scene is composed of control objects, non-control objects and other game contents, such as barracks and factories, and the control objects, the non-control objects and the other game contents can be one or more points in the game scene. Objects in the game scene include control objects and non-control objects. The set identifier may be a parameter or a symbol or a color.
In this embodiment, the user terminal controls the non-controlled objects to move to the controlled object according to the current position, and specifically, each non-controlled object may be moved to the target point by setting the current position of the controlled object as the target point. The method for controlling the object in the game scene to move is the prior art, and is not described herein again.
In this embodiment, before the non-control object is detected to steer the control object, the current position of the control object is detected and the non-control object is controlled to move to the control object according to the current position, so that the non-control object can move towards the control object, and the user is required to search when the non-control object is prevented from moving or moving randomly, thereby further improving the user experience.
In one embodiment, controlling the non-control object to move towards the control object according to the current position comprises:
generating a moving path according to the current position of the control object and the initial position of the non-control object;
and controlling the non-control object to move to the control object according to the moving path.
In this embodiment, the user terminal generates a movement path according to the current position of the control object and the starting position of the non-control object, where the starting position of the non-control object is a position in the game scene when the non-control object does not move, and the movement path refers to a route along which the non-control object travels. The generated movement path takes the current position of the control object as an end point and takes the initial position of the non-control object as a starting point. In addition, since the control object is not moving continuously, the current positions of the control objects may be different when the user terminal or the server detects the control object, and thus the generated moving path may also be changed continuously.
After the movement path is generated, the user terminal controls the non-control object to move to the control object according to the generated movement path, wherein the control of the specific object in the game to move along the generated path is the prior art and is not described herein again.
In this embodiment, a movement path is generated according to the current position of the controlled object and the starting position of the non-controlled object, and the non-controlled object is controlled to move to the controlled object according to the movement path, so that the non-controlled object can move to the controlled object according to a certain movement path, the non-controlled object is prevented from changing the movement path according to the position change condition of the non-controlled object, the movement path can be fixed, the movement path of the non-controlled object can be expected, and the background computation amount is further reduced.
In one embodiment, generating a movement path according to a current position of a control object and a start position of a non-control object includes:
calling a backbone road network of a game scene where a control object and a non-control object are located, wherein the backbone road network is formed by coordinates of a plurality of points forming the game scene;
acquiring a first coordinate of a current position, a second coordinate of an initial position and third coordinates of non-passing areas in a trunk road network;
and generating a moving path according to the first coordinate, the second coordinate and each third coordinate.
In this embodiment, the user terminal calls a backbone road network of a game scene in which the control object and the non-control object are located. In the application environment shown in fig. 1, the main road network is stored in the user terminal 110, and at this time, after the user terminal 110 calls the main road network from itself, the user terminal acquires the first coordinate of the current position, the second coordinate of the start position, and the third coordinates of the non-traffic areas in the main road network. In the application environment shown in fig. 2, the main road network may be stored in the user terminal 110 or the server 120, and the user terminal 110 may call the main road network from itself or the server 120, and obtain the first coordinate of the current position, the second coordinate of the start position, and the third coordinates of the non-traffic areas in the main road network after the call. Wherein, each third coordinate of each non-passing area can be one or more coordinates, such as four rectangular areas with end point coordinates of (0,0), (0, 100), (100,0) and (100 ).
And the user terminal acquires a first coordinate of the current position, a second coordinate of the initial position and third coordinates of non-passing areas in the trunk road network, and then generates a moving path according to the first coordinate, the second coordinate and the third coordinates. The generated moving path takes the first coordinate of the current position as an end point, takes the second coordinate of the starting position as a starting point, and does not pass through the third coordinates of the non-passing areas. At this time, there may be multiple generated moving paths, and the user terminal may randomly select one moving path or select one moving path according to a preset policy, where the preset policy may be to select the shortest moving path among the multiple generated moving paths, and so on.
In this embodiment, a backbone road network of a game scene is called to obtain a current position coordinate of a controlled object, a starting position coordinate of a non-controlled object, and coordinates of each non-passing area, and a moving path of the non-controlled object is generated according to the three coordinates, so that the non-controlled object can avoid each non-passing area, the non-controlled object is prevented from unreasonably moving, and user game experience is increased.
In one embodiment, controlling the non-control object to move to the control object according to the movement path includes:
and controlling the non-control object displayed on the current screen to move towards the control object. Wherein, the non-control objects displayed on the current screen, that is, all the non-player characters displayed on the user terminal. As shown in fig. 4, after all the non-control objects, that is, all the non-player characters are searched for on the current game interface on which the control objects controlled by the player, that is, the player characters are displayed, all the searched non-player characters are controlled to move toward the player characters according to the movement paths between the non-player characters and the player characters. It is understood that when the current position of the player character changes, the movement paths of all the non-player characters also change, so that the movement paths thereof are always kept toward the player character. The moving speed of the player character is generally higher than that of the non-player character, so that when the non-player character is no longer in the same game interface with the player character, the control of the non-player character can be stopped, and the data calculation amount of the user terminal is saved.
However, when the map background of the game is too large, it may be difficult for the player to find a non-control object, i.e., a non-player character, and it takes a long operation time. To this end, in an embodiment, controlling the non-control object to move to the control object according to the movement path includes:
and controlling the non-control object in the current game progress to move to the control object. The current game progress refers to the level and task of the current running game. When the current game process is operated, all non-control objects, namely all non-player characters, in the current game process are searched, and then all the searched non-player characters in the game process are controlled to move to the player characters according to the moving paths between the non-player characters and the player characters. As shown in fig. 5, even if the non-player character is no longer in the same game interface with the player character, the non-player character is controlled to move to the player character, so that the non-player character can automatically be in the same game interface with the player character, and the player does not need to search in the map background of the game, thereby saving the operation time of the player. It will be appreciated that in this case, the non-player character in the game play will move towards the player character until the game play is complete.
In an embodiment, when the target points at a non-control object in the preset area, the non-control object being at a preset distance from the control object, a dynamic image is generated in the direction of the target point. The dynamic image is dynamically moved toward the non-control object with the target orientation, i.e., the weapon of the player character, such as the muzzle, as the origin of the image, to simulate the trajectory of the weapon on the game interface. When the user terminal detects that the dynamic image is overlapped with the non-control object, time length detection is carried out, the non-control object is deleted on the game interface after the preset time length is detected, and a picture that the non-control object is destroyed by a weapon is generated, so that game experience of a user is improved. It can be understood that the preset duration can be set to any duration, which is not described herein.
In an embodiment, when it is detected that the non-control object is in the preset area of the control object, the method further includes:
and generating and displaying prompt information, wherein the prompt information is used for indicating the non-control object to enter a preset area. The prompt information may be a popup generated on a screen of the user terminal when it is detected that the non-control object is in a preset area of the control object. However, the pop-up window can block the operation interface of the user and influence the fluency of the game process, so that in order to improve the fluency of the game process, when the non-control object is detected to be in the preset area of the control object, the color in the preset area or the color of the boundary of the preset area can be changed on the game interface, so as to achieve the purpose of prompting the non-control object to enter the preset area.
In one embodiment, as shown in fig. 6, there is provided a game control apparatus including:
and the information detection module 101 is used for detecting a non-control object.
And the target adjusting module 102 is configured to adjust a target direction of the control object when it is detected that the non-control object is in a preset area of the control object, where the control object is a game object that moves when receiving the movement instruction.
And the target pointing module 103 is configured to point the target towards a non-control object in the preset area, where a distance between the non-control object and the control object is a preset distance.
In one embodiment, the information detection module 101 is further configured to: detecting a current position of a control object; and controlling the non-control object to move to the control object according to the current position.
In an embodiment, the target adjusting module 102 is specifically configured to: generating a moving path according to the current position of the control object and the initial position of the non-control object; and controlling the non-control object to move to the control object according to the moving path.
In one embodiment, the target adjustment module 102 is further configured to: calling a backbone road network of a game scene where a control object and a non-control object are located, wherein the backbone road network is formed by coordinates of a plurality of points forming the game scene; acquiring a first coordinate of a current position, a second coordinate of an initial position and third coordinates of non-passing areas in a trunk road network; and generating a moving path according to the first coordinate, the second coordinate and each third coordinate.
In one embodiment, the target adjustment module 102 is further configured to: and when the non-control object is detected to be in the preset area of the control object, generating and displaying prompt information, wherein the prompt information is used for indicating the non-control object to enter the preset area.
In an embodiment, the target pointing module 103 is specifically configured to: and controlling the non-control object displayed on the current screen to move towards the control object.
In an embodiment, the target pointing module 103 is specifically configured to: and controlling the non-control object in the current game progress to move to the control object.
In an embodiment, the target pointing module 103 is further configured to: a dynamic image is generated in the orientation in which the target is pointed.
In one embodiment, a computer apparatus is provided, as shown in fig. 7, which includes a processor, a memory, a network interface, an input device, and a display screen connected by a system bus. Wherein the memory includes a non-volatile storage medium and an internal memory. The non-volatile storage medium of the computer device stores an operating system and may also store a computer program that, when executed by the processor, causes the processor to implement the game control method. The internal memory may also have stored therein a computer program that, when executed by the processor, causes the processor to execute a game control method. Those skilled in the art will appreciate that the architecture shown in fig. 7 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, the game control apparatus provided herein may be implemented in the form of a computer program that is executable on a computer device such as that shown in fig. 7. The memory of the computer device may store various program modules that make up the game control apparatus. The respective program modules constitute computer programs that cause processors to execute the steps in the game control methods of the respective embodiments of the present application described in this specification.
In one embodiment, a computer-readable storage medium is provided, which stores computer-executable instructions for causing a computer to perform the steps of the above-described game control method. The steps of the game control method here may be the steps in the game control methods of the respective embodiments described above.
The foregoing is a preferred embodiment of the present application, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present application, and these modifications and decorations are also regarded as the protection scope of the present application.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like.

Claims (8)

1. A game control method, comprising:
detecting a current position of the control object;
controlling a non-control object to move towards the control object according to the current position;
the controlling the non-control object to move to the control object according to the current position comprises:
generating a moving path according to the current position of the control object and the initial position of the non-control object, and controlling the non-control object to move to the control object according to the moving path;
detecting a non-control object;
when detecting that a non-control object is in a preset area of a control object, adjusting the target direction of the control object, wherein the control object is a game object which moves when receiving a movement instruction;
and pointing the target to the non-control object in the preset area, wherein the distance between the non-control object and the control object is a preset distance.
2. The game control method according to claim 1, wherein generating a movement path based on the current position of the control object and the start position of the non-control object includes:
calling a backbone road network of the game scene where the control object and the non-control object are located, wherein the backbone road network is formed by coordinates of a plurality of points forming the game scene;
acquiring a first coordinate of the current position, a second coordinate of the starting position and third coordinates of non-passing areas in the trunk road network;
and generating the moving path according to the first coordinate, the second coordinate and each third coordinate.
3. The game control method according to claim 1, further comprising:
and when the target game mode is a preset game mode, updating the game role data according to the game progress of the target game mode.
4. The game control method according to any one of claims 1 to 3, wherein the game character data includes at least one of image data of a game character, life value data of the game character, and output value data of the game character.
5. The game control method according to any one of claims 1 to 3, wherein each of the game modes includes a strategy-type game mode or a third person-named shooting-type game mode.
6. A game control apparatus, comprising:
the information detection module is used for detecting a non-control object; the controller is also used for detecting the current position of the control object;
the target adjusting module is used for adjusting the target direction of the control object when the non-control object is detected to be in the preset area of the control object, and the control object is a game object which moves when a moving instruction is received; the non-control object is also used for controlling the non-control object to move towards the control object according to the current position; the controlling the non-control object to move to the control object according to the current position comprises: generating a moving path according to the current position of the control object and the initial position of the non-control object, and controlling the non-control object to move to the control object according to the moving path;
and the target pointing module is used for pointing the target to a non-control object which is in a preset distance with the control object in the preset area.
7. An electronic device, comprising: memory, processor and computer program stored on the memory and executable on the processor, characterized in that the processor implements the game control method according to any one of claims 1 to 5 when executing the program.
8. A computer-readable storage medium, in which a computer program is stored which is adapted to be loaded and executed by a processor to cause a computer device having said processor to carry out the method of any one of claims 1 to 5.
CN202110226475.2A 2021-03-01 2021-03-01 Game control method and device and electronic equipment Active CN113082713B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110226475.2A CN113082713B (en) 2021-03-01 2021-03-01 Game control method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110226475.2A CN113082713B (en) 2021-03-01 2021-03-01 Game control method and device and electronic equipment

Publications (2)

Publication Number Publication Date
CN113082713A CN113082713A (en) 2021-07-09
CN113082713B true CN113082713B (en) 2022-12-09

Family

ID=76667670

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110226475.2A Active CN113082713B (en) 2021-03-01 2021-03-01 Game control method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN113082713B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105056528A (en) * 2015-07-23 2015-11-18 珠海金山网络游戏科技有限公司 Virtual character moving method and apparatus
CN108629847A (en) * 2018-05-07 2018-10-09 网易(杭州)网络有限公司 Virtual objects mobile route generation method, device, storage medium and electronic equipment
CN109260709A (en) * 2018-09-11 2019-01-25 深圳市创梦天地科技有限公司 A kind of generation method and device of dynamic route
CN109350968A (en) * 2018-10-26 2019-02-19 杭州电魂网络科技股份有限公司 A kind of method for searching and device
CN109731332A (en) * 2018-12-21 2019-05-10 网易(杭州)网络有限公司 Control method, device, equipment and the storage medium of non-player role
CN112044074A (en) * 2020-09-04 2020-12-08 网易(杭州)网络有限公司 Method, device, storage medium and computer equipment for seeking path to non-player character
CN112221143A (en) * 2020-10-09 2021-01-15 腾讯科技(深圳)有限公司 Method, device and storage medium for controlling movement of virtual object

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107789830A (en) * 2017-09-15 2018-03-13 网易(杭州)网络有限公司 Information processing method, device, electronic equipment and storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105056528A (en) * 2015-07-23 2015-11-18 珠海金山网络游戏科技有限公司 Virtual character moving method and apparatus
CN108629847A (en) * 2018-05-07 2018-10-09 网易(杭州)网络有限公司 Virtual objects mobile route generation method, device, storage medium and electronic equipment
CN109260709A (en) * 2018-09-11 2019-01-25 深圳市创梦天地科技有限公司 A kind of generation method and device of dynamic route
CN109350968A (en) * 2018-10-26 2019-02-19 杭州电魂网络科技股份有限公司 A kind of method for searching and device
CN109731332A (en) * 2018-12-21 2019-05-10 网易(杭州)网络有限公司 Control method, device, equipment and the storage medium of non-player role
CN112044074A (en) * 2020-09-04 2020-12-08 网易(杭州)网络有限公司 Method, device, storage medium and computer equipment for seeking path to non-player character
CN112221143A (en) * 2020-10-09 2021-01-15 腾讯科技(深圳)有限公司 Method, device and storage medium for controlling movement of virtual object

Also Published As

Publication number Publication date
CN113082713A (en) 2021-07-09

Similar Documents

Publication Publication Date Title
CN108463273B (en) Game system for performing path finding of non-player character based on movement history of player
CN111905370B (en) Method and device for controlling virtual character in game, electronic equipment and storage medium
US7843455B2 (en) Interactive animation
CN105378785A (en) Method and apparatus for automatically targeting target objects in a computer game
US20240100416A1 (en) Method for processing information and terminal device and non-transitory computer-readable storage medium
TWI804032B (en) Method for data processing in virtual scene, device, apparatus, storage medium and program product
CN113082694B (en) Game mode switching method and device and electronic equipment
CN113101667B (en) Virtual object control method, device, equipment and computer readable storage medium
CN112057860B (en) Method, device, equipment and storage medium for activating operation control in virtual scene
TWI793838B (en) Method, device, apparatus, medium and product for selecting interactive mode for virtual object
CN113546417A (en) Information processing method and device, electronic equipment and storage medium
CN113398601A (en) Information transmission method, information transmission device, computer-readable medium, and apparatus
US20230019216A1 (en) Method and apparatus for controlling virtual object, and storage medium
CN114307147A (en) Interactive method and device in game, electronic equipment and storage medium
US11511191B2 (en) Interactive control system and method for game objects, server and computer-readable storage medium
CN113082713B (en) Game control method and device and electronic equipment
CN115185412B (en) Information processing method and device, electronic equipment and readable storage medium
CN115708956A (en) Game picture updating method and device, computer equipment and medium
CN114307150B (en) Method, device, equipment, medium and program product for interaction between virtual objects
CN113350795B (en) Role control method, terminal, equipment and storage medium
JP2023528135A (en) VIRTUAL OBJECT CONTROL METHOD AND DEVICE, COMPUTER DEVICE AND PROGRAM
KR102598659B1 (en) Selective indication of off-screen object presence
US20240017170A1 (en) Method and apparatus for prompting task, storage medium, and electronic device
CN116785691A (en) Game information processing method and device, electronic equipment and storage medium
CN117839203A (en) Virtual character display method and device, storage medium and electronic equipment

Legal Events

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

Effective date of registration: 20230111

Address after: 201800 Room 204, No. 655, Yinxiang Road, Nanxiang Town, Jiading District, Shanghai

Patentee after: Shanghai Yiyu Network Technology Co.,Ltd.

Address before: 201800 room jt10639, building 2, 4268 Zhennan Road, Jiading District, Shanghai

Patentee before: Shanghai hard link network technology Co.,Ltd.

TR01 Transfer of patent right