CN110141862B - Method and device for mobile control in game, electronic equipment and storage medium - Google Patents

Method and device for mobile control in game, electronic equipment and storage medium Download PDF

Info

Publication number
CN110141862B
CN110141862B CN201910544543.2A CN201910544543A CN110141862B CN 110141862 B CN110141862 B CN 110141862B CN 201910544543 A CN201910544543 A CN 201910544543A CN 110141862 B CN110141862 B CN 110141862B
Authority
CN
China
Prior art keywords
game object
game
path
determining
target point
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
CN201910544543.2A
Other languages
Chinese (zh)
Other versions
CN110141862A (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.)
Netease Hangzhou Network Co Ltd
Original Assignee
Netease Hangzhou Network 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 Netease Hangzhou Network Co Ltd filed Critical Netease Hangzhou Network Co Ltd
Priority to CN201910544543.2A priority Critical patent/CN110141862B/en
Publication of CN110141862A publication Critical patent/CN110141862A/en
Application granted granted Critical
Publication of CN110141862B publication Critical patent/CN110141862B/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/55Controlling game characters or game objects based on the game progress
    • A63F13/57Simulating properties, behaviour or motion of objects in the game world, e.g. computing tyre load in a car race game
    • A63F13/577Simulating properties, behaviour or motion of objects in the game world, e.g. computing tyre load in a car race game using determination of contact between game characters or objects, e.g. to avoid collision between virtual racing cars
    • 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/64Methods for processing data by generating or executing the game program for computing dynamical parameters of game objects, e.g. motion determination or computation of frictional forces for a virtual car

Abstract

The embodiment of the application provides a method and a device for mobile control in a game, electronic equipment and a storage medium, wherein the method comprises the following steps: determining a moving target point corresponding to the first game object; determining a first path corresponding to the moving target point, and controlling the first game object to move towards the moving target point according to the first path; in the moving process, responding to collision of the first game object and the second game object, and determining the offset position of the first game object after collision; and controlling the first game object to move from the offset position to the movement target point. According to the embodiment of the application, the movement control of the game object is realized, and the reality of the game effect is improved.

Description

Method and device for mobile control in game, electronic equipment and storage medium
Technical Field
The present invention relates to the field of games, and in particular, to a method and apparatus for controlling movement in a game, an electronic device, and a storage medium.
Background
In the network game, when the game object moves, a blocking, such as a blocking between the game objects, is inevitably present.
In the prior art, mutual blocking can be directly avoided, or a dynamic avoidance mode can be adopted, namely other game objects are used as barriers to avoid when the game objects seek paths, but the game effects brought by the two modes are not true enough.
Disclosure of Invention
In view of the foregoing, a method and apparatus, an electronic device, a storage medium, and a computer program product are provided for providing in-game movement control that overcomes or at least partially solves the foregoing, including:
a method of in-game motion control by rendering a graphical user interface by executing a software application on a processor of a terminal, the graphical user interface displaying content that at least partially includes a portion or all of the game scene including at least a first game object and a second game object, the method comprising:
determining a moving target point corresponding to the first game object;
determining a first path corresponding to the moving target point, and controlling the first game object to move towards the moving target point according to the first path;
in the moving process, responding to collision of the first game object and the second game object, and determining the offset position of the first game object after collision;
and controlling the first game object to move from the offset position to the movement target point.
Optionally, the first path includes at least two waypoints, where the waypoints are used to determine a moving direction of the first game role; the step of controlling the first game object to move from the offset position to the moving target point comprises the following steps:
and controlling the first game object to move from the offset position to one of the waypoints in the first path and move along the first path to the moving target point.
Optionally, the first path includes a passing waypoint and an non-passing waypoint; one of the waypoints in the first path is the next one of the non-traversed waypoints determined with the closest traversed waypoint.
Optionally, the step of controlling the first game object to move from the offset position to the movement target point includes:
and re-determining a second path corresponding to the moving target point according to the offset position, and controlling the first game object to move to the moving target point according to the second path.
Optionally, the determining the movement target point corresponding to the first game object includes:
determining the received marker position;
judging whether the mark position corresponds to an obstacle object or not;
and if the marked position corresponds to an obstacle object, determining a first position closest to the marked position as a moving target point.
Optionally, the first game object has a movement starting point, and the step of determining the first path corresponding to the movement target point includes:
judging whether a straight line path exists between the moving starting point and the moving target point;
if yes, determining a first path corresponding to the straight path;
if not, adopting a preset path searching algorithm to search paths and determining a first path.
Optionally, the method further comprises:
when the first game object is determined to collide with the non-pushable object, determining circle center vectors corresponding to the first game object and the non-pushable object;
when the moving target point is at the left side of the circle center vector, controlling the first game object to move to the left side of the circle center vector;
and when the moving target point is on the right side of the circle center vector, controlling the first game object to move to the right side of the circle center vector.
Optionally, the method further comprises:
presetting a physical engine;
and establishing a first physical entity corresponding to the first game object and a second physical entity corresponding to the second game object in the physical engine.
Optionally, the first game object comprises a game character object, and the second game object comprises an obstacle object and/or a game character object;
the step of determining the offset position of the first game object after the collision includes: :
determining a first physical attribute corresponding to the first physical entity;
and determining a second physical attribute corresponding to the second physical entity;
and calculating the offset position of the first game object after collision by adopting the first physical attribute and the second physical attribute in the physical engine.
Optionally, the first path and/or the second path includes a moving path composed of a plurality of routing grids, and the method further includes:
and gridding the game scene to obtain a plurality of path finding grids.
Optionally, each routing grid has grid information including at least vertex height, routing sign.
An apparatus for in-game motion control by rendering a graphical user interface by executing a software application on a processor of a terminal, the graphical user interface displaying content that at least partially includes a portion or all of the game scene including at least a first game object and a second game object, the apparatus comprising:
the mobile target point determining module is used for determining a mobile target point corresponding to the first game object;
the first movement control module is used for determining a first path corresponding to the movement target point and controlling the first game object to move towards the movement target point according to the first path;
the offset position determining module is used for responding to the collision of the first game object and the second game object in the moving process and determining the offset position of the first game object after the collision;
and the second movement control module is used for controlling the first game object to move from the offset position to the movement target point.
An electronic device comprising a processor, a memory and a computer program stored on the memory and capable of running on the processor, which when executed by the processor, performs the steps of the method of in-game movement control as described above.
A computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of a method of in-game movement control as described above.
The embodiment of the application has the following advantages:
in the embodiment of the application, the moving target point corresponding to the first game object is determined in the game process, the first path corresponding to the moving target point is determined, the first game object is controlled to move according to the first path, in the moving process, when the first game object collides with the second game object, the second path corresponding to the moving target point is determined according to the collision result calculated by the physical engine, and then the first game object is controlled to move to the moving target point according to the second path, so that the moving control of the game object is realized, and the reality of the game effect is improved.
Drawings
In order to more clearly illustrate the technical solutions of the present application, the drawings that are needed in the description of the present application will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort to a person skilled in the art.
FIG. 1 is a flow chart of steps of a method of in-game movement control according to one embodiment of the present application;
FIG. 2a is a schematic diagram of a game object movement according to one embodiment of the present application;
FIG. 2b is a schematic illustration of another game object movement provided in an embodiment of the present application;
FIG. 2c is a schematic illustration of another game object movement provided in an embodiment of the present application;
FIG. 3 is a schematic diagram of a gridding according to an embodiment of the present application;
FIG. 4 is a schematic illustration of another game object movement provided in an embodiment of the present application;
fig. 5 is a schematic structural diagram of an apparatus for in-game movement control according to an embodiment of the present application.
Detailed Description
In order that the above-recited objects, features and advantages of the present application will become more readily apparent, a more particular description of the invention briefly described above will be rendered by reference to specific embodiments that are illustrated in the appended drawings. It will be apparent that the embodiments described are some, but not all, of the embodiments of the present application. All other embodiments, which can be made by one of ordinary skill in the art based on the embodiments herein without making any inventive effort, are intended to be within the scope of the present application.
Referring to fig. 1, a flowchart illustrating steps of a method for mobile control in a game according to an embodiment of the present application is provided, where a graphical user interface is rendered by executing a software application on a processor of a terminal, where a content displayed on the graphical user interface at least partially includes a partial or complete game scene, and where at least a first game object and a second game object may be included in the game scene.
The first game object may be a game virtual character that is played by the player through the mobile terminal, and may be presented through the graphical user interface, where the presented content may include all of the virtual character or may be a part of the virtual character. For example, in a third person perspective game, the content presented by the graphical user interface may contain all of the virtual characters, or in a first person perspective game, the content presented by the graphical user interface may contain portions or parts of the virtual characters.
The second game object may be a game virtual character controlled by an opponent player in the game, or may be a Non-player character (Non-Practicing Character, NPC) preset by a game developer in a specific game scene.
Specifically, the method comprises the following steps:
step 101, determining a movement target point corresponding to a first game object;
in particular implementations, in response to a game player input, such as a mouse click at a location in a game scene, a movement target point corresponding to a first game object may be determined.
In an embodiment of the present application, step 101 may include the following sub-steps:
determining the received marker position; judging whether the mark position corresponds to an obstacle object or not; if the marking position corresponds to an obstacle object, determining a first position closest to the marking position as a moving target point.
Since the position of the obstacle object is not reachable, the position of the mark input by the game player, such as the position clicked by the mouse, can be determined first, and then whether the obstacle object exists at the position of the mark is judged.
If there is no obstacle object, the marker position may be directly used as the movement target point, and if there is an obstacle object, a first position closest to the marker position may be selected as the movement target point between the marker position and the movement start point of the first game object.
Step 102, determining a first path corresponding to the moving target point, and controlling the first game object to move towards the moving target point according to the first path;
after the moving target point is determined, a first path corresponding to the moving target point can be acquired, and then the first game object can be controlled to move according to the first path.
In an embodiment of the present application, the first game object may have a movement start point, and the step of determining the first path corresponding to the movement target point includes:
judging whether a straight line path exists between the moving starting point and the moving target point; if yes, determining a first path corresponding to the straight path; if not, adopting a preset path searching algorithm to search paths and determining a first path.
As an example, the routing algorithm may be an a-routing algorithm.
Because the road searching algorithm is adopted to search the road, a large amount of resources are consumed, before the road searching is carried out, whether a linear path exists between the moving starting point and the moving target point can be judged, if the linear path exists, a first path corresponding to the linear path can be determined; if no straight line exists, a path finding algorithm can be adopted to find a path, and a first path is determined.
Step 103, responding to the collision of the first game object and the second game object in the moving process, and determining the offset position of the first game object after the collision;
in the moving process, when the first game object collides with the second game object, a physical engine can be adopted to calculate a collision result, and then a second path corresponding to the moving target point of the first game object can be determined according to the collision result.
In an embodiment of the present application, the method may further include the following steps:
presetting a physical engine; and establishing a first physical entity corresponding to the first game object and a second physical entity corresponding to the second game object in the physical engine.
In practical application, a physical engine may be preset, and then a first physical entity corresponding to the first game object and a second physical entity corresponding to the second game object may be established in the physical engine.
In an embodiment of the present application, step 104 may include the following sub-steps:
determining a first physical attribute corresponding to the first physical entity; and determining a second physical attribute corresponding to the second physical entity; and calculating the offset position of the first game object after collision by adopting the first physical attribute and the second physical attribute in the physical engine.
As an example, a physical attribute may be associated with a game attribute corresponding to a game object, such as a character with a smaller force value in the game attribute, and a smaller force value in the physical attribute.
In a specific implementation, the physical engine calculates the motion, rotation and collision reflection by giving the rigid object real physical properties, so that the first physical properties corresponding to the first physical entity can be determined, the second physical properties corresponding to the second physical entity can be determined, and then the offset position of the first game object after collision can be calculated by adopting the first physical properties and the second physical properties.
Because the physical engine is based on physical operation, for example, if four people are around a car, the speed and the mass of the car are high, when moving towards one direction, people in the way can be easily pushed away, but when one person is around four cars, the cars are difficult to push away, and the more realistic physical feedback can make the game more vivid, and can add new strategic playing methods to the game.
Specifically, in the programming of the c++ language, mapCell class is used as a core class and is used as a management hub of the whole system to manage the creation, destruction, transmission of a mobile command and the like of a mobile unit maptonit in the whole system, and realize all the path-finding functions.
When one MapUnit sends out a moving command, after the MapCell finishes the route searching, the MapUnit records the current route and moves sequentially according to the route points, and the map continues to move to the next route point every time the map reaches one route point.
During the movement, if MapUnit collides, it is possible to change the position, so each frame of the game corrects the moving direction and synchronizes the moving direction to Body (each MapUnit is associated with one Body, body and MapUnit are in one-to-one correspondence).
The Body synchronizes the moving direction to b2Body (entity in physical engine), and each frame MapCell executes update, calls Physics World to execute update, then calls Step of b2World (all physical collision and operation are performed here), and finally synchronizes the position of b2Body to Body and MapUnit, thus completing all motion changes of one frame.
In one embodiment of the present application, the first game object may include game character objects, such as player-controlled characters, non-player-controlled characters, and the second game object includes an obstacle object and a game character object.
As shown in fig. 2a, the first game object is a game object 1, the second game object is a game object 2 and a game object 3, the game object 2 is a game character object, and the game object 3 is an obstacle object.
As shown in fig. 2b and fig. 2c, since the physical engine is provided with the truly existing rigid body for the obstacle object, for example, a Block class is defined, along with the movement of the game object 1, the game object 2 is co-extruded by the game object 1 and the game object 3 and further extruded, thereby avoiding that the game object 2 is extruded into the obstacle object due to the fact that no steel body is arranged for the obstacle object.
Step 104, controlling the first game object to move from the offset position to the movement target point.
After determining the offset position, the first game object may be controlled to move from the offset position to the movement target point in accordance with the offset position.
In an embodiment of the present application, the first path may include at least two waypoints, where the waypoints may be used to determine the moving direction of the first game character, and step 104 may include the following sub-steps:
and controlling the first game object to move from the offset position to one of the waypoints in the first path and move along the first path to the moving target point.
The first path may include a passing waypoint and an unremoved waypoint, where a waypoint in the first path is a next unremoved waypoint determined by a nearest passing waypoint.
For example, the first path has 3 waypoints which are formed by A-B-C, the first game object moves from A to B, and after collision, the first game object is pushed over the offset position F, and then from a waypoint B in the first path, the first game object is controlled to return from F to B, and then moves according to the path of B-C.
In another embodiment of the present application, step 104 may include the following sub-steps:
and re-determining a second path corresponding to the moving target point according to the offset position, and controlling the first game object to move to the moving target point according to the second path.
For example, the first path has 3 waypoints consisting of A-B-C, the first game object moves from A to B, after collision, is pushed over the offset position F, the second path F-C can be redetermined, and then the first game object can be controlled to move directly from F to C without returning to B.
In an embodiment of the present application, the first path and/or the second path may include a moving path composed of a plurality of routing grids, and the method may further include the steps of:
and gridding the game scene to obtain a plurality of path finding grids.
In practical application, as shown in fig. 3, an editor may be used to gridde a game scene to obtain multiple routing grids, where each routing grid may have grid information.
Wherein the mesh information may include vertex heights (heights of four vertices of the mesh), form an uneven ground surface by editing heights of the terrain, may exhibit different heights when the game object stands on the uneven ground, and may further include a seek mark (mark is reachable or unreachable).
Of course, other information, such as obstacle information corresponding to the road-finding grid, may also be included, where the current position of the road-finding grid is identified as corresponding to an obstacle.
In an embodiment of the present application, the method may further include the following steps:
when the first game object is determined to collide with the non-pushable object, determining circle center vectors corresponding to the first game object and the non-pushable object; when the moving target point is at the left side of the circle center vector, controlling the first game object to move to the left side of the circle center vector; and when the moving target point is on the right side of the circle center vector, controlling the first game object to move to the right side of the circle center vector.
In online games, not all objects can be pushed, such as static objects, an interface can be opened to set whether the objects can be pushed, and in the moving process, whether the non-pushable objects are blocked in front of the objects can be judged, namely whether the current waypoint corresponds to a non-pushable object is judged.
If the current waypoint corresponds to the non-pushable object, a circle center vector corresponding to the first game object and the non-pushable object can be determined, then vector cross multiplication can be adopted to judge whether the moving target point is on the left side or the right side of the circle center vector, when the moving target point is on the left side, the first game object can be controlled to move to the left side of the circle center vector, and when the moving target point is on the right side, the first game object is controlled to move to the right side of the circle center vector, so that the first game object can bypass the non-pushable object.
As shown in fig. 4, the center of the first game object a is o1, the center of the non-pushable object B is o2, the direction of the center vector o1o2 is the original moving direction, when the target point T is on the right side of the center vector o1o2 (the case shown in the figure), the moving direction of a is directly corrected to the direction of the tangent line B, and when the target point T is on the left side of the center vector o1o2, the moving direction of a is corrected to the direction of the tangent line a.
In the embodiment of the application, the moving target point corresponding to the first game object is determined in the game process, the first path corresponding to the moving target point is determined, the first game object is controlled to move according to the first path, in the moving process, when the first game object collides with the second game object, the second path corresponding to the moving target point is determined according to the collision result calculated by the physical engine, and then the first game object is controlled to move to the moving target point according to the second path, so that the moving control of the game object is realized, and the reality of the game effect is improved.
Referring to fig. 5, a schematic structural diagram of an apparatus for mobile control in a game according to an embodiment of the present application is shown, where a graphical user interface is rendered by executing a software application on a processor of a terminal, where a content displayed on the graphical user interface at least partially includes a part or all of the game scenes, and the game scenes include at least a first game object and a second game object.
Specifically, the method can comprise the following modules:
a moving target point determining module 501, configured to determine a moving target point corresponding to the first game object;
a first movement control module 502, configured to determine a first path corresponding to the movement target point, and control the first game object to move towards the movement target point according to the first path;
an offset position determining module 503, configured to determine an offset position of the first game object after the collision in response to the first game object colliding with the second game object during the moving process;
a second movement control module 504, configured to control the first game object to move from the offset position to the movement target point.
In an embodiment of the present application, the first path includes at least two waypoints, where the waypoints are used to determine a moving direction of the first game role; the second movement control module 504 includes:
and the offset moving submodule is used for controlling the first game object to move from the offset position to one waypoint in the first path and move along the first path to the moving target point.
In an embodiment of the present application, the first path includes a passing waypoint and an non-passing waypoint; one of the waypoints in the first path is the next one of the non-traversed waypoints determined with the closest traversed waypoint.
In an embodiment of the present application, the second movement control module 504 includes:
and the second path moving sub-module is used for redetermining a second path corresponding to the moving target point according to the offset position and controlling the first game object to move to the moving target point according to the second path.
In an embodiment of the present application, the moving target point determining module 501 includes:
a marker position determination sub-module for determining a received marker position;
the obstacle object judging submodule is used for judging whether the marking position corresponds to an obstacle object or not;
and the first position determining sub-module is used for determining a first position nearest to the marked position as a moving target point if the marked position corresponds to an obstacle object.
In an embodiment of the present application, the first game object has a movement start point, and the first movement control module 502 includes:
the straight line path judging sub-module is used for judging whether a straight line path exists between the moving starting point and the moving target point; if yes, calling a straight line path determination sub-module, and if not, calling a finding sub-module;
the linear path determining submodule is used for determining a first path corresponding to the linear path;
the path finding sub-module is used for finding paths by adopting a preset path finding algorithm and determining a first path.
In an embodiment of the present application, the apparatus further includes:
the circle center vector determining module is used for determining circle center vectors corresponding to the first game object and the non-pushable object when the first game object collides with the non-pushable object;
the left moving module is used for controlling the first game object to move to the left side of the circle center vector when the moving target point is at the left side of the circle center vector;
and the right side moving module is used for controlling the first game object to move to the right side of the circle center vector when the moving target point is on the right side of the circle center vector.
In an embodiment of the present application, the apparatus further includes:
the physical engine presetting module is used for presetting a physical engine;
and the physical entity establishing module is used for establishing a first physical entity corresponding to the first game object and a second physical entity corresponding to the second game object in the physical engine.
In an embodiment of the present application, the first game object comprises a game character object, and the second game object comprises an obstacle object and/or a game character object;
the offset position determining module 503 includes: :
a first physical attribute determining submodule, configured to determine a first physical attribute corresponding to the first physical entity;
a second physical attribute determining submodule, configured to determine a second physical attribute corresponding to the second physical entity;
and the offset position calculating sub-module is used for calculating the offset position of the first game object after collision in the physical engine by adopting the first physical attribute and the second physical attribute.
In an embodiment of the present application, the first path and/or the second path includes a moving path composed of a plurality of routing grids, and the apparatus further includes:
and the gridding module is used for gridding the game scene to obtain a plurality of path finding grids.
In an embodiment of the present application, each routing grid has grid information including at least vertex height, routing markers.
For the device embodiments, since they are substantially similar to the method embodiments, the description is relatively simple, and reference is made to the description of the method embodiments for relevant points.
An embodiment of the present application further provides an electronic device that may include a processor, a memory, and a computer program stored on the memory and capable of running on the processor, the computer program implementing the steps of the method of movement control in a game as described above when executed by the processor.
An embodiment of the present application also provides a computer-readable storage medium on which a computer program is stored, which when executed by a processor, implements the steps of the method of movement control in a game as above.
In this specification, each embodiment is described in a progressive manner, and each embodiment is mainly described by differences from other embodiments, and identical and similar parts between the embodiments are all enough to be referred to each other.
It will be apparent to those skilled in the art that embodiments of the present application may be provided as a method, apparatus, or computer program product. Accordingly, the present embodiments may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present application may take the form of a computer program product on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
Embodiments of the present application are described with reference to flowchart illustrations and/or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing terminal device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal device, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present embodiments have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. It is therefore intended that the following claims be interpreted as including the preferred embodiments and all such alterations and modifications as fall within the scope of the embodiments of the present application.
Finally, it is further noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or terminal that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or terminal. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article or terminal device comprising the element.
The above method and apparatus for mobile control in game, electronic device, and storage medium are described in detail, and specific examples are applied herein to illustrate the principles and embodiments of the present application, and the above examples are only used to help understand the method and core ideas of the present application; meanwhile, as those skilled in the art will have modifications in the specific embodiments and application scope in accordance with the ideas of the present application, the present description should not be construed as limiting the present application in view of the above.

Claims (11)

1. A method of in-game movement control, characterized in that a graphical user interface is rendered by executing a software application on a processor of a terminal, the graphical user interface displaying content that at least partially comprises a partial or complete game scene, the game scene comprising at least a first game object and a second game object, the method comprising:
determining a moving target point corresponding to the first game object;
determining a first path corresponding to the moving target point, and controlling the first game object to move towards the moving target point according to the first path;
in the moving process, responding to collision of the first game object and the second game object, and determining the offset position of the first game object after collision;
controlling the first game object to move from the offset position to the moving target point;
wherein the step of determining the offset position of the first game object after the collision includes:
determining a first physical attribute corresponding to a first physical entity, wherein the first physical entity is a physical entity corresponding to the first game object;
determining a second physical attribute corresponding to a second physical entity, wherein the second physical entity is the physical entity corresponding to the second game object;
calculating an offset position of the first game object after collision by adopting the first physical attribute and the second physical attribute in a physical engine;
the first path at least comprises two road points, and the road points are used for determining the moving direction of the first game role; the step of controlling the first game object to move from the offset position to the moving target point comprises the following steps:
and controlling the first game object to move from the offset position to one of the waypoints in the first path and move along the first path to the moving target point.
2. The method of claim 1, wherein the first path includes passing waypoints and non-passing waypoints; one of the waypoints in the first path is the next one of the non-traversed waypoints determined with the closest traversed waypoint.
3. The method of claim 1, wherein determining a movement target point for the first game object comprises:
determining the received marker position;
judging whether the mark position corresponds to an obstacle object or not;
and if the marked position corresponds to an obstacle object, determining a first position closest to the marked position as a moving target point.
4. The method of claim 1, wherein the first game object has a movement starting point, and wherein the step of determining the first path corresponding to the movement target point comprises:
judging whether a straight line path exists between the moving starting point and the moving target point;
if yes, determining a first path corresponding to the straight path;
if not, adopting a preset path searching algorithm to search paths and determining a first path.
5. The method according to claim 1, wherein the method further comprises:
when the first game object is determined to collide with the non-pushable object, determining circle center vectors corresponding to the first game object and the non-pushable object;
when the moving target point is at the left side of the circle center vector, controlling the first game object to move to the left side of the circle center vector;
and when the moving target point is on the right side of the circle center vector, controlling the first game object to move to the right side of the circle center vector.
6. The method of claim 1, wherein the first game object comprises a game character object and the second game object comprises an obstacle object and/or a game character object.
7. The method of claim 1, wherein the first path comprises a movement path comprised of a plurality of routing grids, the method further comprising:
and gridding the game scene to obtain a plurality of path finding grids.
8. The method of claim 7, wherein each routing grid has grid information including at least vertex height, routing markers.
9. An apparatus for in-game motion control, wherein a graphical user interface is rendered by executing a software application on a processor of a terminal, the graphical user interface displaying content that at least partially includes a partial or complete game scene including at least a first game object and a second game object, the apparatus comprising:
the mobile target point determining module is used for determining a mobile target point corresponding to the first game object;
the first movement control module is used for determining a first path corresponding to the movement target point and controlling the first game object to move towards the movement target point according to the first path;
the offset position determining module is used for responding to the collision of the first game object and the second game object in the moving process and determining the offset position of the first game object after the collision;
a second movement control module for controlling the first game object to move from the offset position to the movement target point;
wherein the offset position determination module comprises:
a first physical attribute determining submodule, configured to determine a first physical attribute corresponding to a first physical entity, where the first physical entity is a physical entity corresponding to the first game object;
a second physical attribute determining submodule, configured to determine a second physical attribute corresponding to the second physical entity, where the second physical entity is a physical entity corresponding to the second game object;
an offset position calculation sub-module, configured to calculate, in a physical engine, an offset position of the first game object after the collision using the first physical attribute and the second physical attribute;
the first path at least comprises two road points, and the road points are used for determining the moving direction of the first game role; the second movement control module includes:
and the offset moving submodule is used for controlling the first game object to move from the offset position to one waypoint in the first path and move along the first path to the moving target point.
10. An electronic device comprising a processor, a memory and a computer program stored on the memory and executable on the processor, the computer program implementing the steps of the method of in-game movement control as claimed in any one of claims 1 to 8 when executed by the processor.
11. A computer readable storage medium, characterized in that the computer readable storage medium has stored thereon a computer program which, when executed by a processor, implements the steps of the method of in-game movement control according to any of claims 1 to 8.
CN201910544543.2A 2019-06-21 2019-06-21 Method and device for mobile control in game, electronic equipment and storage medium Active CN110141862B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910544543.2A CN110141862B (en) 2019-06-21 2019-06-21 Method and device for mobile control in game, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910544543.2A CN110141862B (en) 2019-06-21 2019-06-21 Method and device for mobile control in game, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN110141862A CN110141862A (en) 2019-08-20
CN110141862B true CN110141862B (en) 2023-05-05

Family

ID=67596144

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910544543.2A Active CN110141862B (en) 2019-06-21 2019-06-21 Method and device for mobile control in game, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN110141862B (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110706318B (en) * 2019-09-30 2023-07-14 北京金山安全软件有限公司 Object moving speed control method and device
CN110743161B (en) * 2019-10-16 2021-08-24 腾讯科技(深圳)有限公司 Virtual object control method, device, terminal and storage medium
CN111068322B (en) * 2019-12-28 2023-07-04 上海米哈游天命科技有限公司 Object moving method, device, terminal and storage medium
CN111265877B (en) * 2020-01-20 2023-06-13 网易(杭州)网络有限公司 Game virtual object control method and device, electronic equipment and storage medium
CN111389002B (en) * 2020-03-13 2023-04-14 网易(杭州)网络有限公司 Game character movement control method, device, equipment and storage medium
CN111760268B (en) * 2020-07-06 2021-06-08 网易(杭州)网络有限公司 Path finding control method and device in game
KR102494456B1 (en) * 2020-08-05 2023-02-06 상하이 리리쓰 테크놀로지 코포레이션 Interaction control system and method for game objects, server and computer readable storage medium
CN114470786B (en) * 2022-01-27 2023-12-01 北京字跳网络技术有限公司 Frame synchronization data processing method and device, readable medium and electronic equipment

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104077797B (en) * 2014-05-19 2017-05-10 无锡梵天信息技术股份有限公司 three-dimensional game animation system
CN104759097A (en) * 2015-04-13 2015-07-08 四川天上友嘉网络科技有限公司 Automatic way-finding method in game
CN107952243B (en) * 2017-11-29 2020-08-04 杭州电魂网络科技股份有限公司 Path determining method and device
CN108635855A (en) * 2018-05-03 2018-10-12 网易(杭州)网络有限公司 The control method for movement of carrier, device and terminal in game
CN109925713B (en) * 2019-02-28 2020-11-03 腾讯科技(深圳)有限公司 Object control method and device, storage medium and electronic device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
路朝龙."Quest 3D动力学".《Quest 3D从入门到精通》.2012,第203-204页. *

Also Published As

Publication number Publication date
CN110141862A (en) 2019-08-20

Similar Documents

Publication Publication Date Title
CN110141862B (en) Method and device for mobile control in game, electronic equipment and storage medium
JP5887458B1 (en) A game system for searching for a route of a non-player character based on a player's movement history
CN102221975B (en) Project navigation using motion capturing data
JP7232341B2 (en) Information display method, device, electronic equipment and computer program
CN112862935B (en) Game role movement processing method and device, storage medium and computer equipment
CN104941180B (en) A kind of collision checking method and device of 2D game
CN110755848A (en) Path finding method in game, terminal and readable storage medium
US20230281357A1 (en) Generating simulation environments for testing av behaviour
CN112587927A (en) Prop control method and device, electronic equipment and storage medium
CN111013146B (en) Dynamically modifiable way finding navigation method and device for oversized map
Emerson Crowd pathfinding and steering using flow field tiles
CN103631261A (en) Information processing method and apparatus
CN116036601B (en) Game processing method and device, computer equipment and storage medium
KR101267570B1 (en) Virtual character steering behaviors simulation method and apparatus based on attractive field with 2d texture image, and virtual ecology park visualization method
EP4264437A1 (en) Generating simulation environments for testing av behaviour
EP4264439A1 (en) Generating simulation environments for testing av behaviour
Cassol et al. Simulation of autonomous agents using terrain reasoning
Geraerts Camera planning in virtual environments using the corridor map method
JP6576544B2 (en) Information processing apparatus, information processing method, and computer-readable storage medium
JP2021037167A (en) Video game processing program and video game processing system
KR101570785B1 (en) Situation-based Method for implementing navigation in first-person shooter
CN117232531B (en) Robot navigation planning method, storage medium and terminal equipment
CN117732073A (en) Virtual object control method and device, computer equipment and readable storage medium
CN116870481A (en) Game character movement control method, equipment and storage medium
CN117732066A (en) Virtual object control method and device, computer equipment and readable storage medium

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