Disclosure of Invention
The present invention is directed to a method for controlling formation of game units and intelligently controlling game units, so as to solve the problems of the background art. The method for formation control and intelligent control of the game units has the advantages of solving the problems of complicated operation steps and complex flow when a plurality of game units are scheduled in the instant strategy hand game, and improving the operation efficiency and the operation accuracy of the players when the plurality of game units are operated.
In order to achieve the purpose, the invention provides the following technical scheme:
the method for formation control and intelligent control of game units comprises the following steps:
(1) a UI display module for automatically creating a fixed formation for the players and creating a formation number and formation information for the fixed formation; supporting players to create temporary formations;
(2) supporting the fire gathering attack, movement and mobile attack scheduling of the fixed formation and the temporary formation, carrying out formation type arrangement on the formation when the movement is finished, and supporting the operation of replacing the formation of units in the fixed formation;
(3) automatically attributing units produced by players in the game process to a fixed formation, and displaying the production process on a formation UI display module;
(4) automatically classifying units finished in production into a current formation: the accessible sets up the formation and gathers the point, and the record formation moves the target point, and the current formation position is confirmed to the attack target position of collection fire, and the unit automatic removal that production was accomplished is to the formation position, when having the military affairs that a plurality of units correspond, decides to go out from nearest military affairs according to the distance with the formation position.
Further, when the game starts, the formation module automatically creates a fixed formation 1 and a fixed formation 2; selecting a fixed formation 1 by game default; the fixed formation 2 is initially hidden and can be expanded and displayed by using a UI module "+" ICON, the fixed formation 1 and the fixed formation 2 can be mutually switched, and a player fixedly selects one of the formations; the player can simultaneously operate the fixed formation 1 and the fixed formation 2 by using the formation UI module ALL function; the player obtains the unit type by selecting the unit type head ICON ICON in the formation UI module, and forms the unit type in the formation singly and temporarily, and selects the temporary formation at the same time; a player selects a unit by clicking the unit in a game scene, and simultaneously forms the unit individually and temporarily; the player can form all the units displayed in the shot into a temporary formation by double-clicking the units in the game scene; and deleting the temporary formation when the formation instruction is finished, and when the temporary formation is selected, the currently selected fixed formation does not accept the instruction, but the unit can be produced and added into the selected fixed formation.
Further, the formation UI display module rules: formation numbering: the game starts to display the fixed formation 1 in a default mode, wherein the default mode comprises the steps of displaying the selected state of the fixed formation 1 and displaying formation information of the fixed formation 1; after adding the fixed formation 2, the player displays the fixed formation 1, the fixed formation 2 and the ALL function; formation information: the display formation information of the fixed formation comprises the steps of obtaining all units to which the formation belongs, stacking and arranging head portrait ICON of the units in a formation UI display module according to types, and marking the quantity and the skill state of each unit; the temporary formation created by clicking the unit type head portrait has a selected state; displaying the temporary formation non-formation information formation numbers selected and created in the scene; ALL the unit information of the fixed formation 1 and the fixed formation 2 are displayed simultaneously using the ALL function.
Furthermore, when the selected state of the formation 1/2 is fixed, a unit is produced, the formation module automatically adds the unit into the production process of 1/2 units of the fixed formation, the UI display module of the corresponding fixed formation displays the production progress of the unit, including the state of a production waiting queue and the state in the process of production, and after the unit is produced, the formation module is updated in the formation information of the UI display module and is added into the formation information module for display; after the unit is produced, the unit is automatically added into the formation array, and after the unit is produced, the unit is automatically moved to the position of the formation; the position point of the formation is generated as follows: when no unit exists in the formation, the default formation position is the corresponding production barracks door of the unit; when no unit exists in the formation, the player can set a unit aggregation point, and after the unit aggregation point is set, the aggregation point is the position of the formation; when the formation moves, the moving instruction position is the formation position; when the formation attacks a target unit, recording an instruction target unit, and updating the formation position in real time according to the position of the target unit when the target exists; recording a target death site after the target dies, and taking the target death site as a formation position; if the number of the corresponding services of the unit is more than 1, the unit can move from the service birth nearest to the position of the convoy; after the unit is born, when the formation receives a new instruction, the instruction is immediately executed, and the instruction going to the position of the formation is covered at the moment.
Further, the move instruction: clicking the game scene ground, sending a moving instruction to the formation, and executing the movement to a position for sending the instruction by the formation unit; when the moving instruction moves to a target position, the formation module can execute formation array type arrangement, when the formation performs moving operation, the formation can be divided into two rectangular checkerboard array types according to an aerial unit and a ground unit, and station positions in the checkerboard array types are designated for the units in sequence, so that the formation can keep a fighting array type after moving is finished; the checkerboard type rule is as follows: the chessboard lattice type center is the center of formation, and the direction is the formation moving direction; the length and width of the checkerboard matrix are set according to the unit quantity; the unit attack distance is short-range-front row, and the unit attack distance is long-range-rear row; fire attack instruction collection: clicking an enemy unit in the game, sending a fire attack set instruction to the formation, and executing the attack of the enemy unit by the formation unit; attack movement: double-click on the game scene ground, sending an attack movement instruction to the formation, wherein units in the formation attack all units in the movement; in the above instructions, when the formation moves, a uniform route searching rule is used for issuing a moving instruction for the formation, fire attack is collected, and when the attack moves, all units of the formation automatically need to search routes to a target position according to a map grid; in the process, route searching optimization is carried out based on formation, in order to save the calculation performance of a processor, when a unit calculates a route searching path, the unit transmits the path notification to other units in the formation within a certain range around the unit, and the unit within the range can save the calculation process; selecting an instruction: when the formation is selected, all units in the formation are in a selected state and all instructions sent to the formation are executed.
Furthermore, a certain type of unit in the fixed formation 1 can be deleted from the fixed formation 1 by dragging the head ICON of the certain type of unit onto the fixed formation 2ICON, and the certain type of unit is added into the fixed formation 2, and similarly, the certain type of unit is replaced from the fixed formation 2 into the fixed formation 1; the fixed formation 1 unit can be merged into the fixed formation 2 and deleted from the fixed formation 1 by dragging the fixed formation 1ICON onto the fixed formation 2ICON, and the whole fixed formation 2 can be replaced into the fixed formation 1 in the same way.
Further, the complete formation function comprises an input module, a processing module and a display module; in the input module, a player can display the fixed formation 2 through the UI display module, switch formations, and click and select a unit card head portrait to create a temporary formation by using an ALL function; a player can operate a player unit to create a temporary formation for a single unit through a game scene, double-click the player unit and create a temporary formation for a full-screen unit; the scene ground can be clicked to issue a moving instruction to the formation, the scene ground can be clicked to issue an attack moving instruction to the formation, and an enemy unit can be clicked to issue a fire attack instruction to the formation; in the processing module, a fixed formation 1 and a fixed formation 2 are created; saving and updating information of the fixed formation 1 and the fixed formation 2 in the game running process, creating and temporarily saving a temporary formation and temporarily saving formation instructions of the fixed formation 1, the fixed formation 2 and the temporary formation; in the instruction module, an input instruction is distributed to all units which are stored in the formation module and used for receiving the instruction formation, after all units in the formation receive the instruction, the instruction is immediately executed and the previous instruction is covered, meanwhile, the instruction module records the current instruction execution state of the unit, the formation information is generated at the set moment, and the designated units are arranged according to the formation; the instruction module stores instruction information: the command target, the command execution formation and the command content maintain the command interruption in the unit execution process; in the display module, a game behavior is executed in a game scene in a single unit, an action is executed according to the game behavior, a special effect of game behavior expression is executed, and the expression effects of a selected state, an attack state and a moving state of a unit object are displayed on the unit object; and the UI display module displays the selected state of the formation, the formation number and the formation information.
Furthermore, the law produced by the law tower is a fixed formation 1, a fixed formation 2 is shared, and is displayed in the information of the fixed formations 1 and 2 and can be released by clicking the formation information UI; the unit skill is displayed on a unit head portrait ICON of the formation information and can be released by clicking through a UI of the formation information.
Compared with the prior art, the invention has the beneficial effects that:
in the multi-unit game control in the instant strategy game, the player can save the tedious process of selecting units and creating formation in the traditional formation operation by the default created fixed formation function, and meanwhile, the accurate operation of the player on the multi-unit game can be supported.
The unit production automatic attribution formation can reduce the operation of adding new units in the formation in the existing instant strategy game technology and reduce the management and maintenance operation of the formation.
The unit production automatically goes to the current formation position, so that the operation of players on newly added units of the formation is reduced, the spatial position relation of the formation multiple units is managed for the players more intelligently, and the operation efficiency of the players on the multiple game units is improved on the basis of the existing instant strategy game technology.
The invention solves the problems of complicated operation steps and complex flow when a plurality of game units are scheduled in the instant strategy tour, and improves the operation efficiency and the operation accuracy when a player operates the plurality of game units.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In the description of the present invention, it should be noted that the terms "upper/lower end", "inner", "outer", "front end", "rear end", "both ends", "one end", "the other end", and the like indicate orientations or positional relationships based on those shown in the drawings, and are only for convenience of describing the present invention and simplifying the description, but do not indicate or imply that the referred device or element must have a specific orientation, be configured in a specific orientation, and operate, and thus, should not be construed as limiting the present invention. Furthermore, the terms "first" and "second" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance.
In the description of the present invention, it should be noted that, unless otherwise explicitly specified or limited, the terms "mounted," "disposed/sleeved," "connected," and the like are to be construed broadly, e.g., "connected," which may be fixedly connected, detachably connected, or integrally connected; can be mechanically or electrically connected; they may be connected directly or indirectly through intervening media, or they may be interconnected between two elements. The specific meanings of the above terms in the present invention can be understood in specific cases to those skilled in the art.
Referring to fig. 1-6, the present invention provides the following technical solutions:
the method for formation control and intelligent control of game units comprises the following steps:
and the UI display module is used for automatically creating a fixed formation for the player and creating a formation number and formation information for the fixed formation.
Support players to create temporary formations.
The fire gathering attack, movement and movement attack scheduling is supported for the fixed formation and the temporary formation. And carrying out formation arrangement on the formation when the movement is completed. And the operation of replacing the unit in the fixed formation is supported.
And automatically attributing units produced by the players in the game process to the fixed formation, and displaying the production process on a formation UI display module.
Automatically classifying units finished in production into a current formation: the current formation position can be confirmed by setting a formation aggregation point, recording a formation movement target point, aggregating a fire attack target position and the like, and a unit which completes production automatically moves to the formation position. And when there are barracks corresponding to a plurality of units, starting from the nearest barracks according to the distance from the formation position.
1. Formation creation:
the formation in the game is divided into a fixed formation created by default and a temporary formation created according to the player selection unit, and the creation flow is shown in fig. 1.
When a game starts, the formation module automatically creates a fixed formation 1 and a fixed formation 2; selecting a fixed formation 1 by game default; fixed convoy 2 is initially hidden and may be expanded for display by using the UI module "+" ICON.
The fixed formation 1 and the fixed formation 2 can be switched with each other, and one of the formations is fixedly selected by the player.
The player can simultaneously operate the fixed convoy 1 and the fixed convoy 2 by using the convoy UI module ALL function.
A player obtains the type of units by selecting the unit type head ICON ICON in the formation UI module, and forms the type of units in the formation individually and temporarily, and selects the temporary formation at the same time.
The player selects the units by clicking the units in the game scene, and simultaneously forms the units into a queue temporarily and independently.
The player forms all such units displayed in the shot into a temporary queue by double-clicking on the units in the game scene.
And deleting the temporary formation when the formation instruction is finished, and when the temporary formation is selected, the currently selected fixed formation does not accept the instruction, but the unit can be produced and added into the selected fixed formation.
2. Formation UI display Module rules
Formation numbering: the game starts to display the fixed formation 1 by default, wherein the display comprises the display of the selected state of the fixed formation 1 and the display of the formation information of the fixed formation 1; after the player adds the fixed formation 2, the fixed formation 1, the fixed formation 2, and ALL functions are displayed.
Formation information: the display formation information of the fixed formation comprises the steps of obtaining all units to which the formation belongs, stacking and arranging head portrait ICON of the units in a formation UI display module according to types, and marking the quantity and the skill state of each unit; the temporary formation created by clicking the unit type head portrait has a selected state; displaying the temporary formation non-formation information formation numbers selected and created in the scene;
ALL the unit information of the fixed formation 1 and the fixed formation 2 are displayed simultaneously using the ALL function.
3. Unit convoy
As shown in FIG. 2, upon fixing the selected state of the convoy 1/2, the units are produced and the convoy module automatically adds the units to the fixed convoy 1/2.
In the unit production process, the corresponding fixed formation UI display module displays the unit production progress, including the production waiting queue state, the production in-process state and the like.
And after the unit is produced, updating the formation module in the formation information of the UI display module, and adding the unit into the formation information module for display.
After the unit is produced, the unit is automatically added into the formation array, the adding process is shown in figure 3, and after the unit is produced, the unit is automatically moved to the position of the formation. The position point of the formation is generated as follows:
when no unit exists in the formation, the default formation position is the corresponding production barracks door of the unit;
when no unit exists in the formation, the player can set a unit aggregation point, and after the unit aggregation point is set, the aggregation point is the position of the formation;
when the formation moves, the moving instruction position is the formation position;
when the formation attacks a target unit, recording an instruction target unit, and updating the formation position in real time according to the position of the target unit when the target exists; and recording the target death site as a formation position after the target dies.
If the corresponding troops of the unit are more than 1, the unit can move from the troop birth closest to the home position.
After the unit is born, when the formation receives a new instruction, the instruction is immediately executed, and the instruction going to the position of the formation is covered at the moment.
4. Overall scheduling of units in formation
Moving instructions: and clicking the game scene ground, sending a moving instruction to the formation, and executing and moving the formation unit to the position for sending the instruction.
When the moving instruction moves to a target position, the formation module can execute formation array type arrangement, when the formation performs moving operation, the formation can be divided into two rectangular checkerboard array types according to an aerial unit and a ground unit, and the positions in the checkerboard array types are designated for the units in sequence, so that the formation can be moved to the end and maintain the fighting array type.
The checkerboard type rule is as follows: the chessboard lattice type center is the center of formation, and the direction is the formation moving direction; the length and width of the checkerboard matrix are set according to the unit quantity; the unit attack distance is short-range-front row, and the unit attack distance is long-range-back row.
Collecting fire attack instructions: clicking an enemy unit in the game, sending a fire attack set instruction to the formation, and executing the attack of the enemy unit by the formation unit;
attack movement: double-click on the game scene ground, sending an attack movement instruction to the formation, wherein units in the formation attack all units in the movement;
in the above instructions, when the formation moves, a uniform route searching rule is used for issuing a moving instruction for the formation, fire attack is collected, and when the attack moves, all units of the formation automatically need to search routes to a target position according to a map grid; in the process, route searching optimization is carried out based on formation, in order to save the calculation performance of a processor, when a unit calculates a route searching path, the unit transmits the path notification to other units in the formation within a certain range around the unit, and the unit within the range can save the calculation process;
selecting an instruction: when the formation is selected, all units in the formation are in a selected state and all instructions sent to the formation are executed.
5. Formation merging and unit replacement formation
A certain type of unit in the fixed formation 1 can be deleted from the fixed formation 1 by dragging the head ICON of the certain type of unit to the fixed formation 2ICON, and the certain type of unit is added into the fixed formation 2, and similarly, the change of the certain type of unit from the fixed formation 2 to the fixed formation 1 is also supported;
the fixed formation 1 unit can be merged into the fixed formation 2 and deleted from the fixed formation 1 by dragging the fixed formation 1ICON onto the fixed formation 2ICON, and the whole fixed formation 2 can be replaced into the fixed formation 1 in the same way.
6. Formation implementation module
As shown in fig. 4, the full queuing function includes an input module, a processing module, and a display module. In the input module, a player can display the fixed formation 2 through the UI display module, switch formations, and click the unit card head portrait to create a temporary formation by using the ALL function; a player can operate a player unit to create a temporary formation for the single unit through a game scene, and double-click the player unit to create the temporary formation for the full-screen unit; the scene ground can be clicked to issue a moving instruction to the formation, the scene ground can be clicked to issue an attack moving instruction to the formation, and an enemy unit can be clicked to issue a fire attack instruction to the formation;
in the processing module, a fixed formation 1 and a fixed formation 2 are created; saving and updating information of the fixed formation 1 and the fixed formation 2 in the game running process, creating and temporarily saving a temporary formation and temporarily saving formation instructions of the fixed formation 1, the fixed formation 2 and the temporary formation; in the instruction module, an input instruction is distributed to all units which are stored in the formation module and used for receiving the instruction formation, after all units in the formation receive the instruction, the instruction is immediately executed and the previous instruction is covered, meanwhile, the instruction module records the current instruction execution state of the units, the formation information is generated at the set moment, and the designated units are arranged according to the formation. The instruction module stores instruction information: and the instruction target, the instruction execution formation and the instruction content maintain the instruction interruption in the unit execution process.
In the display module, the game behaviors are executed in a game scene, the behavior expressions such as actions and special effects are executed according to the game behaviors, and the state expression effects such as selection, attack and movement of the game objects are displayed on the unit objects. And the UI display module displays the selected state of the formation, the formation number and the formation information.
7. Law and unit skills
The law produced by the law tower is a fixed formation 1, a fixed formation 2 is shared, and is displayed in the information of both the fixed formations 1 and 2 and can be released by clicking through formation information UI;
the unit skill is displayed on the unit head ICON ICON of the formation information and can be clicked and released through the formation information UI.
Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that changes, modifications, substitutions and alterations can be made in these embodiments without departing from the principles and spirit of the invention, the scope of which is defined in the appended claims and their equivalents.