CN102974098B - Unit logic control method for simulating large-scale battlefield - Google Patents

Unit logic control method for simulating large-scale battlefield Download PDF

Info

Publication number
CN102974098B
CN102974098B CN201210517817.7A CN201210517817A CN102974098B CN 102974098 B CN102974098 B CN 102974098B CN 201210517817 A CN201210517817 A CN 201210517817A CN 102974098 B CN102974098 B CN 102974098B
Authority
CN
China
Prior art keywords
unit
battlefield
stage
logic control
action
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
CN201210517817.7A
Other languages
Chinese (zh)
Other versions
CN102974098A (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 Creatoo Network Technology Co ltd
Original Assignee
Shanghai Chuangtu Network Science & Technology Development 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 Chuangtu Network Science & Technology Development Co Ltd filed Critical Shanghai Chuangtu Network Science & Technology Development Co Ltd
Priority to CN201210517817.7A priority Critical patent/CN102974098B/en
Publication of CN102974098A publication Critical patent/CN102974098A/en
Application granted granted Critical
Publication of CN102974098B publication Critical patent/CN102974098B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Processing Or Creating Images (AREA)

Abstract

The invention relates to a unit logic control method for simulating a large-scale battlefield. The method is applicable to action logic control in a real-time strategy game during unit large-scale fight. The action logic control comprises an enemy searching stage, a first action stage, a movement stage and a second action stage; an attack judgment range of each unit comprises an execution attack range and a preparation attack range; and the method comprises the following steps of: carrying out action logic control on un its on the whole battlefield through sequentially carrying out the enemy searching stage, the first action stage, the movement stage and the second action stage on the units, and realizing simulation of the large-scale battlefield. Compared with the prior art, the unit logic control method for simulating the large-scale battlefield has the advantages of reality in simulation effect, less information processing burden, high processing efficiency and the like.

Description

A kind of unit logic control method for simulating extensive battlefield
Technical field
The present invention relates to a kind of information processing method, especially relating to a kind of unit logic control method for simulating extensive battlefield.
Background technology
The calculating that extensive unit is belligerent, is used in each computer realm, in especially well-known on some markets game.
Traditional battlefield account form is mainly divided into three phases: rope enemy's stage, behavioral phase, mobile phase.In rope enemy's stage, namely according to certain attribute of unit in game, formulate corresponding AI behavior, obtain corresponding target by units all on comparison battlefield.Behavioral phase, after the reference object determined before unit obtains, unit can carry out a series of program behavior according to presetting AI, and behavior can consume force value of taking action accordingly, behavior generally comprises: perform strike order according to firing area, or meet technical ability condition of discharging and then discharge technical ability.After executing behavioral phase, the unit having action edge can perform mobile phase, and the moving algorithm at present in game mainly adopts A* searching algorithm, and this is a kind of on graphics plane, has the path of multiple node, obtains the minimum algorithm by cost.Be usually used in the mobile computing of the NPC in playing, or in the mobile computing of the BOT of online game.
By above three phases, the intellectuality battle scene of up to ten thousand units just can be realized out in a program.But this kind of common account form exists some insoluble drawbacks: first, because A* searching algorithm carries out calculating path, so larger map can strengthen operand by the data of traversal battlefield map.And unit of more playing, then mean that in the same time, calculative number of times is more.If up to ten thousand units, without through optimizing, cause system to occur blocking possibly, to such an extent as to other programs cannot respond, and have a strong impact on performance and the execution efficiency of computer itself, also can produce fatal impact to the experience of game.Secondly, for the calculating of many units behavior, because the firing area of unit is in gaming an important attribute that must occur, this properties affect each unit exectorial opportunity, and finally form a visible battlefield performance, current battlefield often there will be some not good Logical presentations, such as: front-seat toxotae and enemy toxotae start correlation, all rear units can because range be not enough to include the other side's target, do not produce attack, then perform mobile behavior, unit there will be the chaotic scene that rear unit is disorderly walked in logic everywhere, cannot the scene effect in simulating reality battlefield.
Summary of the invention
Object of the present invention is exactly provide to overcome defect that above-mentioned prior art exists the unit logic control method for simulating extensive battlefield that a kind of simulate effect is true, information processing burden is little, treatment effeciency is high.
Object of the present invention can be achieved through the following technical solutions:
A kind of unit logic control method for simulating extensive battlefield, the method be applicable to unit in real time strategy extensive belligerent time Action logic control, described Action logic controls to comprise rope enemy's stage, the first behavioral phase, mobile phase and the second behavioral phase, the attacks results decision scope of unit comprises execution firing area and preparation firing area, and described method specifically comprises the following steps:
1) in rope enemy's stage, adopt the mode of interval index, travel through all intervals in whole battlefield, until the target unit meeting Prerequisite detected, then perform step 2);
2) whether the first behavioral phase, exist target unit in the execution firing area judging this unit, if yes, then performs attack and perform step 5); If NO, then step 3 is performed);
3) mobile phase, detects and can shorten the path with the spacing of target unit, if there is described path, then moves along this path near target unit, and performs step 5); If there is not described path, then perform step 4);
4) the second behavioral phase, judges whether there is target unit in preparation firing area, if yes, then performs attack, and perform step 5); If NO, then carry out standby, and perform step 5);
5) Action logic completing this bout controls, and returns step 1), the Action logic re-executing new bout controls.
Described battlefield is divided into multiple interval, and all units are distributed in the difference interval in battlefield according to coordinate.
In the described rope enemy stage, the mode of interval index is centered by unit place coordinate, is traveled through by the interval of the interval outer layers of closing on, until the target unit meeting Prerequisite detected.
Namely firing area is the range size of unit search target of attack, if any target in scope, then meets by the condition of attacking.Firing area be divided in this method and perform firing area and preparation firing area, wherein, what perform firing area attacks the scope of attack for performing immediately, and prepare firing area can be larger than execution firing area, be used for judging many queuings.
Compared with prior art, the present invention, owing to not needing to travel through whole battlefield, significantly can reduce the computer calculate burden brought because of battlefield scale and unit scale, according to the size of battlefield and scale, can improve the efficiency of 50% ~ 500%.In addition, battlefield is free to show Duo Pai unit and carries out attacking standby global behavior simultaneously, reaches the battlefield effect that simulation is actual.
Accompanying drawing explanation
Fig. 1 is flow chart of the present invention.
Detailed description of the invention
Below in conjunction with the drawings and specific embodiments, the present invention is described in detail.
Embodiment
A kind of unit logic control method for simulating extensive battlefield, the method be applicable to unit in real time strategy extensive belligerent time Action logic control, battlefield is divided into multiple interval by the map datum according to battlefield, and all units are distributed in the difference interval in battlefield according to coordinate.
In general logic control method, namely firing area is the range size of unit search target of attack, if any target in scope, then meets by the condition of attacking.The attacks results decision range discrimination of unit and traditional pattern in this method, firing area is divided into and performs firing area and preparation firing area, wherein, perform the scope for attack attack can be performed immediately of firing area, and prepare firing area can be larger than execution firing area, be used for judging many queuings.Whole Action logic controls to comprise rope enemy's stage, the first behavioral phase, mobile phase and the second behavioral phase.
The party's body of laws comprises several steps as shown in Figure 1:
Step 1) rope enemy's stage, adopt the mode of interval index, centered by unit place coordinate, traveled through by the interval of the interval outer layers of closing on, until the target unit meeting Prerequisite detected, then perform step 2);
Step 2) the first behavioral phase, whether there is target unit in the execution firing area judging this unit, if yes, then perform attack and perform step 5); If NO, then step 3 is performed);
Step 3) mobile phase, detect and can shorten the path with the spacing of target unit, if there is described path, then move along this path near target unit, and perform step 5); If there is not described path, then perform step 4);
Step 4) the second behavioral phase, judge whether there is target unit in preparation firing area, if yes, then perform attack, and perform step 5); If NO, then carry out standby, and perform step 5);
Step 5) complete this bout Action logic control, return step 1), re-execute new bout Action logic control.
All units all carry out the logic control of fighting behavior by said method, owing to not needing to travel through whole battlefield, significantly can reduce the computer calculate burden brought because of battlefield scale and unit scale, according to the size of battlefield and scale, the efficiency of 50% ~ 500% can be improved.In addition, battlefield is free to show Duo Pai unit and carries out attacking standby global behavior simultaneously, reaches the battlefield effect that simulation is actual.

Claims (1)

1. one kind for simulating the unit logic control method in extensive battlefield, the method be applicable to unit in real time strategy extensive belligerent time Action logic control, it is characterized in that, described Action logic controls to comprise rope enemy's stage, the first behavioral phase, mobile phase and the second behavioral phase, the attacks results decision scope of unit comprises execution firing area and preparation firing area, and described method specifically comprises the following steps:
1) in rope enemy's stage, adopt the mode of interval index, travel through all intervals in whole battlefield, until the target unit meeting Prerequisite detected, then perform step 2);
2) whether the first behavioral phase, exist target unit in the execution firing area judging this unit, if yes, then performs attack and perform step 5); If NO, then step 3 is performed);
3) mobile phase, detects and can shorten the path with the spacing of target unit, if there is described path, then moves along this path near target unit, and performs step 5); If there is not described path, then perform step 4);
4) the second behavioral phase, judges whether there is target unit in preparation firing area, if yes, then performs attack, and perform step 5); If NO, then carry out standby, and perform step 5);
5) Action logic completing this bout controls, and returns step 1), the Action logic re-executing new bout controls;
Described battlefield is divided into multiple interval, and all units are distributed in the difference interval in battlefield according to coordinate;
In the described rope enemy stage, the mode of interval index is centered by unit place coordinate, is traveled through by the interval of the interval outer layers of closing on, until the target unit meeting Prerequisite detected.
CN201210517817.7A 2012-12-05 2012-12-05 Unit logic control method for simulating large-scale battlefield Active CN102974098B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210517817.7A CN102974098B (en) 2012-12-05 2012-12-05 Unit logic control method for simulating large-scale battlefield

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210517817.7A CN102974098B (en) 2012-12-05 2012-12-05 Unit logic control method for simulating large-scale battlefield

Publications (2)

Publication Number Publication Date
CN102974098A CN102974098A (en) 2013-03-20
CN102974098B true CN102974098B (en) 2015-01-28

Family

ID=47848618

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210517817.7A Active CN102974098B (en) 2012-12-05 2012-12-05 Unit logic control method for simulating large-scale battlefield

Country Status (1)

Country Link
CN (1) CN102974098B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1368712A (en) * 2001-02-06 2002-09-11 美新科技股份有限公司 Control method of open action simulating system
CN101329694A (en) * 2007-06-21 2008-12-24 上海北控智能科技有限公司 Computer aided battlefield awareness method
CN102651742A (en) * 2011-02-23 2012-08-29 株式会社都比克 Massively mutliplayer online first person shooting game service system and method

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060003841A1 (en) * 2004-07-01 2006-01-05 Aruze Corporation Game system, server and game control method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1368712A (en) * 2001-02-06 2002-09-11 美新科技股份有限公司 Control method of open action simulating system
CN101329694A (en) * 2007-06-21 2008-12-24 上海北控智能科技有限公司 Computer aided battlefield awareness method
CN102651742A (en) * 2011-02-23 2012-08-29 株式会社都比克 Massively mutliplayer online first person shooting game service system and method

Also Published As

Publication number Publication date
CN102974098A (en) 2013-03-20

Similar Documents

Publication Publication Date Title
CN101615305B (en) Method and device for detecting collision
US20220317695A1 (en) Multi-agv motion planning method, device and system
CN105469406A (en) Bounding box and space partitioning-based virtual object collision detection method
JP5905481B2 (en) Determination method and determination apparatus
CN104931934B (en) A kind of radar plot condensing method based on PAM cluster analyses
CN103336959B (en) A kind of vehicle checking method accelerated based on GPU multi-core parallel concurrent
CN108714303A (en) Collision checking method, equipment and computer readable storage medium
CN102096530A (en) Multi-touch trajectory tracking method
CN111249719B (en) Track prompting method and device, storage medium and electronic device
CN102999661A (en) Parallel collision detection system and method based on particle swarm optimization
CN109858526A (en) Sensor-based multi-target track fusion method in a kind of target following
CN109947573A (en) Intelligence suitable for electric system edge calculations accelerates chip
CN110124323B (en) Method and equipment for executing football skill in football application
CN102974098B (en) Unit logic control method for simulating large-scale battlefield
Liu et al. Inspector: Pixel-based automated game testing via exploration, detection, and investigation
CN116993893B (en) Method and device for generating antagonism map for resisting AI self-aiming cheating
CN112883589A (en) Scene association degree calculation method and device, computer equipment and storage medium
CN105205786A (en) Image depth recovery method and electronic device
CN114935893B (en) Motion control method and device for aircraft in combat scene based on double-layer model
CN108399496B (en) Attack period evaluation method for machine group combat sequential activities based on probability
CN103021258A (en) Speed-optimized map way-finding algorithm
CN103413348B (en) Virtual reality roam procedure collision detection optimization design method and system
Chen et al. Optimization of the collision detection technology in 3D skeleton animation
Rodney Analyzing decision-making in robot soccer for attacking behaviors
Li Appliance of apriori algorithm on technical-tactics analysis of volleyball

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CP01 Change in the name or title of a patent holder

Address after: Zhabei District 200072 Shanghai 777 Canton Road No. 12 lane two building A-27 room

Patentee after: SHANGHAI CREATOO NETWORK TECHNOLOGY CO.,LTD.

Address before: Zhabei District 200072 Shanghai 777 Canton Road No. 12 lane two building A-27 room

Patentee before: Shanghai Chuangtu Network Technology Development Co.,Ltd.

CP01 Change in the name or title of a patent holder
PE01 Entry into force of the registration of the contract for pledge of patent right

Denomination of invention: A unit logic control method for simulating large-scale battlefield

Effective date of registration: 20230321

Granted publication date: 20150128

Pledgee: Agricultural Bank of China Limited Shanghai Huangpu Sub branch

Pledgor: SHANGHAI CREATOO NETWORK TECHNOLOGY CO.,LTD.

Registration number: Y2023310000076

PE01 Entry into force of the registration of the contract for pledge of patent right
PC01 Cancellation of the registration of the contract for pledge of patent right

Granted publication date: 20150128

Pledgee: Agricultural Bank of China Limited Shanghai Huangpu Sub branch

Pledgor: SHANGHAI CREATOO NETWORK TECHNOLOGY CO.,LTD.

Registration number: Y2023310000076

PC01 Cancellation of the registration of the contract for pledge of patent right