CN103699487A - Method and device for implementing automatic trigger logics - Google Patents

Method and device for implementing automatic trigger logics Download PDF

Info

Publication number
CN103699487A
CN103699487A CN201310741667.2A CN201310741667A CN103699487A CN 103699487 A CN103699487 A CN 103699487A CN 201310741667 A CN201310741667 A CN 201310741667A CN 103699487 A CN103699487 A CN 103699487A
Authority
CN
China
Prior art keywords
region
triggering
event
chained list
logic
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.)
Pending
Application number
CN201310741667.2A
Other languages
Chinese (zh)
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.)
Beijing Pixel Software Technology Co Ltd
Original Assignee
Beijing Pixel Software Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Pixel Software Technology Co Ltd filed Critical Beijing Pixel Software Technology Co Ltd
Priority to CN201310741667.2A priority Critical patent/CN103699487A/en
Publication of CN103699487A publication Critical patent/CN103699487A/en
Pending legal-status Critical Current

Links

Images

Abstract

The invention provides a method and a device for implementing automatic trigger logics. The method includes dividing a scene into different zones according to requirements and organizing the divided zones via tree structures; sequentially traversing each divided zone, and further dividing each traversed zone into different zones if the traversed zone needs to be further divided according to the requirements; setting a trigger linked list corresponding to each divided zone; automatically triggering corresponding events according to trigger logics in the trigger linked list corresponding to an optional zone when the trigger linked list corresponding to the optional zone is specified and executed. Various possible events in each zone and the trigger logics of the various events are recorded in the corresponding trigger linked list of the zone. The method and the device have the advantage that the automatic trigger logics in the application scene such as a game scene can be implemented by the aid of the method and the device.

Description

Realize the method and apparatus that automatically triggers logic
Technical field
The application relates to computer technology, particularly realizes the method and apparatus that automatically triggers logic.
Background technology
Application scenes such as MMO role playing (MMOPRG) scene of game in, logical triggering mechanism is very important.Wherein, logical triggering mechanism is exactly to trigger the method that logic is carried out, and the triggering of logic is on the upper strata of scene tissue, the data of scene to be processed separately separately.
Conventionally, the logic being applied in scene is to need programming to trigger some functions, for example a player starts fight after entering a region, can be specially to this behavior coding, wherein, for the behavior during coding, also can write the triggering mode that the behavior realizes, only when meeting this triggering mode, just can trigger the behavior.But this method quite bothers, and needs multiparty collaboration on stream, dirigibility is not high.
Many defects based on realize logical triggering in scene, in existing application scenarios, generally can in scene, not realize logic, even if some application scenarios is realized logic, also quite single, just simply by some signs, remove to process some simple states, for example, with 0, represent to fight, 1 represents to fight etc.
Based on this, a kind of at application scenarios, to realize the method that automatically triggers logic in such as scene of game be current technical matters urgently to be resolved hurrily.
Summary of the invention
The application provides and has realized the method and apparatus that automatically triggers logic, to realize at application scenarios, automatically triggers logic in such as scene of game.
The technical scheme that the application provides comprises:
A method that realizes automatic triggering logic, comprising:
According to demand, by the different region of scene partitioning, organize by tree structure in the region of division;
Each region that traversal is divided successively, for the region traversing, if required this region Further Division according to demand, the different region of Further Division in this region;
For triggering chained list corresponding to this region of each region division of dividing, the triggering chain table record that each region is corresponding the triggering logic of contingent all kinds of events and all kinds of events in this region;
When the designated execution of triggering chained list corresponding to arbitrary region, according to the triggering logic in triggering chained list corresponding to this region, automatically trigger corresponding event.
A device of realizing automatic triggering logic, comprising:
Division unit, be used for according to demand the different region of scene partitioning, organize by tree structure in the region of dividing, and, each region that traversal is divided successively, for the region traversing, if required this region Further Division according to demand, the different region of Further Division in this region;
Linked list units, is used to the triggering chained list corresponding to this region of each region division of division, the triggering chain table record that each region is corresponding the triggering logic of contingent all kinds of events and all kinds of events in this region;
Trigger element, for when the designated execution of triggering chained list corresponding to arbitrary region, triggers corresponding event automatically according to the triggering logic in triggering chained list corresponding to this region.
As can be seen from the above technical solutions, in the present invention, by according to demand by the different region of scene partitioning, organize by tree structure in the region of division; Each region that traversal is divided successively, for the region traversing, if required this region Further Division according to demand, the different region of Further Division in this region; For triggering chained list corresponding to this region of each region division of dividing, the triggering chain table record that each region is corresponding the triggering logic of contingent all kinds of events and all kinds of events in this region; When the designated execution of triggering chained list corresponding to arbitrary region, according to the triggering logic in triggering chained list corresponding to this region, automatically trigger corresponding event, this has realized at application scenarios and has automatically triggered logic in such as scene of game.
Further, in the present invention, the chained list trigger mechanism based on region just can complete the basic smooth logic in a scene substantially, and these logics are chained list based on resource, does not need upper strata to go to trigger, and implements fairly simple.
Accompanying drawing explanation
The method flow diagram that Fig. 1 provides for the embodiment of the present invention;
The regional structure schematic diagram of the scene partitioning that Fig. 2 provides for the embodiment of the present invention;
The structure drawing of device that Fig. 3 provides for the embodiment of the present invention.
Embodiment
In order to make the object, technical solutions and advantages of the present invention clearer, below in conjunction with the drawings and specific embodiments, describe the present invention.
Method provided by the invention can realize the control of some more complicated of bottom, can realize at application scenarios and automatically trigger logic in such as scene of game.
Below method provided by the invention is described:
Referring to Fig. 1, the method flow diagram that Fig. 1 provides for the embodiment of the present invention.As shown in Figure 1, this flow process can comprise the following steps:
Step 101, according to demand, by the different region of scene partitioning, organize by tree structure in the region of division.
In application scenes is played such as MMOPRG, player and NPC personage's all operations is all based on scene.Based on this, this step 101 can be according to demand by the different region of scene partitioning.Here, this step 101 can be from more wide in range angle by the different region of scene partitioning.As an embodiment who is applied to MMOPRG game, the region of dividing here can be landform, building, restraining mass etc.
Preferably, as one embodiment of the present of invention, the region that this step 101 is divided can be organized by tree structure.Region 6,7,8,9 is as shown in Figure 2 all the zones of different by scene partitioning is obtained, and these regions organize together by tree structure.By such tissue, whole scene is exactly one tree, and all triggerings are afterwards all the regions based in this tree, pointed like this, described in the step 104 that specifically sees below.
The scene of organizing by tree structure can realize the basic function that tree has, and for example traversal, searches etc.And in the present invention, in order further to segment the region of scene partitioning, can also the region of division further be segmented according to demand, wherein, this segmentation can travel through realization according to the basic function of tree, specifically sees step 102.
Step 102, each region that traversal is divided successively, for the region traversing, if required this region Further Division according to demand, the different region of Further Division in this region.
Region 6 is as shown in Figure 2 example, when traversing region 6, if also need this region 6 to carry out Further Division according to demand, in these 6 Further Division regions 1, region, region 2, region 3.
As one embodiment of the present of invention, in region, the region 1 of 6 Further Divisions, region 2, region 3 can be organized according to tree structure, specifically as shown in Figure 2.
Preferably, in the present invention, in region after Further Division zones of different, such as the 6 interior zonings 1 in region, region 2, behind region 3, also need further to travel through the region 1 of this division, region 2, region 3, for each region, according to demand estimation, whether also need this region Further Division, if, the different region of Further Division again in this region, such as, the different region 11 of 1 interior Further Division in region, region 12 etc., wherein, be somebody's turn to do the zones of different 11 of the 1 interior Further Division in region, region 12 is according to tree structure tissue, afterwards, again for each region of dividing such as region 11, region 12, return according to demand estimation and whether also need the operation to this region Further Division, until satisfy the demands.
Step 103, triggering chained list corresponding to this region of each region division of be dividing, the triggering chain table record that each region is corresponding the triggering logic of contingent all kinds of events and all kinds of events in this region.
In the present invention, can be triggering chained list corresponding to this region of each region division of dividing based on actual conditions and demand.
Wherein, the triggering logic that triggers the event of chain table record is used to indicate the logic that event occurs, and is specifically below being described, and wouldn't repeat here.
Step 104, when the designated execution of triggering chained list corresponding to arbitrary region, triggers corresponding event automatically according to the triggering logic in triggering chained list corresponding to this region.
As one embodiment of the present of invention, triggering chained list corresponding to each region also recorded the working method of this triggering chained list.When the working method of this triggering chained list carries out triggering chained list if being used to indicate.
Based on this, in this step 104, the designated execution of triggering chained list corresponding to described arbitrary region comprises:
Triggering chained list corresponding to arbitrary region meets the working method of this triggering chain table record, confirms the designated execution of triggering chained list that this region is corresponding.
In addition, as one embodiment of the present of invention, in this step 104, describedly according to the triggering logic in triggering chained list corresponding to this region, automatically trigger corresponding event and comprise:
Travel through successively the event of triggering chain table record corresponding to this region,
For the event traversing, detect the triggering logic whether current condition meets this event, if, trigger this event, if not, when this event is not last event of triggering chain table record corresponding to this region, continue to return the event of triggering chain table record corresponding to this region of traversal.
As one embodiment of the present of invention, the triggering logic of above-mentioned event includes but not limited to following several:
1, the triggering mode of event, wherein, different events can have different triggering modes, also can have identical triggering mode, specifically can be according to the feature setting of event itself.
Particularly, the triggering mode of event its objective is how indication event triggers, and can be random tactile method, certain triggering, touches method redirect, touches side by side method, condition triggering etc. during specific implementation.
2, event for object.Wherein, different events can be for different objects, also can be for identical object, and specifically can be according to the feature setting of event itself.
Particularly, event for object can be for whom and trigger this event, during specific implementation, can be the player of NPC personage, player, different brackets, player of different occupation etc.
3, the opportunity of Event triggered; Wherein, different events can have different trigger timings, also can have identical trigger timing, specifically can be according to the feature setting of event itself.
Particularly, refer to trigger event under what conditions the opportunity of Event triggered, during specific implementation, can be and enter area triggering, go out area triggering, in region fight trigger, dead trigger etc. in region.
4, the parameter of Event triggered; Wherein, different events can have different trigger parameter, also can have identical trigger parameter, specifically can be according to the feature setting of event itself.
Particularly, the parameter of Event triggered refers in event satisfied parameter occurs, such as, time, triggering mode be numbering of concurrent tactile method chained list while touching method side by side etc. similar parameter.
It should be noted that, above-described 4 kinds of triggering logics that not contain event completely, its just for the application is described clearly for the triggering logic of event, make for example, and non-limiting the present invention.
Take the region 6 shown in Fig. 2 is example, if the triggering chain table record of region 6 correspondences one event be: fight, the triggering logic of this event comprises:
The triggering mode of event is that condition triggers, and whether the grade that detects player reaches class 60, if so, trigger event, on the contrary trigger event, does not point out this region dangerous, and points out that to player other regions allow player's pathfinding go over;
Event for object be player;
The opportunity of Event triggered is for entering region 6;
The parameter of Event triggered is empty;
; triggering logic based on above-described event; when player enters region 6; detect current player levels and whether reach class 60; if so, just in this region 6, brush out NPC personage and fight with it, if not; point out this region 6 danger, and point out that to player other regions allow player's pathfinding go over.Can find out, the demand that such demand fights just can complete by triggering chained list, has realized the automatic triggering of logic.
Can find out, the chained list trigger mechanism based on region just can complete the basic smooth logic in a scene substantially, and these logics are chained list based on resource, does not need upper strata to go to trigger.Give an example as the aforementioned, when player enters the region 6 in Fig. 2, can guide player to play from NPC fight or guide the different region 2,3 of returning home to fight by judgement player's rank.Equally, when player levels is very low, also player can be guided to recessed region 1 and 2,3 pairs, region player can not be walked, dynamically shield player.More originally, the logic that seemed more complicated just can be very simply from bottom layer treatment.
So far, complete flow process shown in Fig. 1.
Above method provided by the invention is described, below device provided by the invention is described:
Referring to Fig. 3, the structure drawing of device that Fig. 3 provides for the embodiment of the present invention.As shown in Figure 3, this device comprises:
Division unit, be used for according to demand the different region of scene partitioning, organize by tree structure in the region of dividing, and, each region that traversal is divided successively, for the region traversing, if required this region Further Division according to demand, the different region of Further Division in this region;
Linked list units, is used to the triggering chained list corresponding to this region of each region division of division, the triggering chain table record that each region is corresponding the triggering logic of contingent all kinds of events and all kinds of events in this region;
Trigger element, for when the designated execution of triggering chained list corresponding to arbitrary region, triggers corresponding event automatically according to the triggering logic in triggering chained list corresponding to this region.
Preferably, as one embodiment of the invention, in the present invention, behind the different region of described division unit Further Division in region, further according to tree structure, be organized in the zones of different of Further Division in region; Travel through successively each region of Further Division in region, according to demand estimation, whether also need this region Further Division, if, the different region of Further Division again in this region, return to the operation that is organized in the zones of different of Further Division in region according to tree structure, until satisfy the demands.
Preferably, as one embodiment of the invention, in the present invention, triggering chained list corresponding to each region also recorded the working method of this triggering chained list;
The designated execution of triggering chained list corresponding to described arbitrary region comprises:
Triggering chained list corresponding to arbitrary region meets the working method of this triggering chain table record, confirms the designated execution of triggering chained list that this region is corresponding.
Preferably, as one embodiment of the invention, in the present invention, described trigger element automatically triggers corresponding event according to the triggering logic in triggering chained list corresponding to this region and comprises:
Travel through successively the event of triggering chain table record corresponding to this region,
For the event traversing, detect the triggering logic whether current condition meets this event, if, trigger this event, if not, when this event is not last event of triggering chain table record corresponding to this region, continue to return the event of triggering chain table record corresponding to this region of traversal.
Preferably, as one embodiment of the invention, in the present invention, the triggering logic of described all kinds of events includes but not limited to following several:
The triggering mode of event;
Event for object;
The opportunity of Event triggered;
The parameter of Event triggered.
So far, complete the unit describe shown in Fig. 3.
As can be seen from the above technical solutions, in the present invention, by according to demand by the different region of scene partitioning, organize by tree structure in the region of division; Each region that traversal is divided successively, for the region traversing, if required this region Further Division according to demand, the different region of Further Division in this region; For triggering chained list corresponding to this region of each region division of dividing, the triggering chain table record that each region is corresponding the triggering logic of contingent all kinds of events and all kinds of events in this region; When the designated execution of triggering chained list corresponding to arbitrary region, according to the triggering logic in triggering chained list corresponding to this region, automatically trigger corresponding event, this has realized at application scenarios and has automatically triggered logic in such as scene of game.
Further, in the present invention, the chained list trigger mechanism based on region just can complete the basic smooth logic in a scene substantially, and these logics are chained list based on resource, does not need upper strata to go to trigger, and implements fairly simple.
The foregoing is only preferred embodiment of the present invention, in order to limit the present invention, within the spirit and principles in the present invention not all, any modification of making, be equal to replacement, improvement etc., within all should being included in the scope of protection of the invention.

Claims (10)

1. realize a method that automatically triggers logic, it is characterized in that, the method comprises:
According to demand, by the different region of scene partitioning, organize by tree structure in the region of division;
Each region that traversal is divided successively, for the region traversing, if required this region Further Division according to demand, the different region of Further Division in this region;
For triggering chained list corresponding to this region of each region division of dividing, the triggering chain table record that each region is corresponding the triggering logic of contingent all kinds of events and all kinds of events in this region;
When the designated execution of triggering chained list corresponding to arbitrary region, according to the triggering logic in triggering chained list corresponding to this region, automatically trigger corresponding event.
2. method according to claim 1, is characterized in that, in region, behind the different region of Further Division, the method further comprises:
According to tree structure, be organized in the zones of different of Further Division in region;
Travel through successively each region of Further Division in region, according to demand estimation, whether also need this region Further Division, if, the different region of Further Division again in this region, return to the operation that is organized in the zones of different of Further Division in region according to tree structure, until satisfy the demands.
3. method according to claim 1, is characterized in that, triggering chained list corresponding to each region also recorded the working method of this triggering chained list;
The designated execution of triggering chained list corresponding to described arbitrary region comprises:
Triggering chained list corresponding to arbitrary region meets the working method of this triggering chain table record, confirms the designated execution of triggering chained list that this region is corresponding.
4. method according to claim 1, is characterized in that, describedly according to the triggering logic in triggering chained list corresponding to this region, automatically triggers corresponding event and comprises:
Travel through successively the event of triggering chain table record corresponding to this region,
For the event traversing, detect the triggering logic whether current condition meets this event, if, trigger this event, if not, when this event is not last event of triggering chain table record corresponding to this region, continue to return the event of triggering chain table record corresponding to this region of traversal.
5. method according to claim 4, is characterized in that, the triggering logic of described all kinds of events includes but not limited to following several:
The triggering mode of event;
Event for object;
The opportunity of Event triggered;
The parameter of Event triggered.
6. realize a device that automatically triggers logic, it is characterized in that, this device comprises:
Division unit, be used for according to demand the different region of scene partitioning, organize by tree structure in the region of dividing, and, each region that traversal is divided successively, for the region traversing, if required this region Further Division according to demand, the different region of Further Division in this region;
Linked list units, is used to the triggering chained list corresponding to this region of each region division of division, the triggering chain table record that each region is corresponding the triggering logic of contingent all kinds of events and all kinds of events in this region;
Trigger element, for when the designated execution of triggering chained list corresponding to arbitrary region, triggers corresponding event automatically according to the triggering logic in triggering chained list corresponding to this region.
7. device according to claim 6, is characterized in that, behind the different region of described division unit Further Division in region, further according to tree structure, is organized in the zones of different of Further Division in region; Travel through successively each region of Further Division in region, according to demand estimation, whether also need this region Further Division, if, the different region of Further Division again in this region, return to the operation that is organized in the zones of different of Further Division in region according to tree structure, until satisfy the demands.
8. device according to claim 6, is characterized in that, triggering chained list corresponding to each region also recorded the working method of this triggering chained list;
The designated execution of triggering chained list corresponding to described arbitrary region comprises:
Triggering chained list corresponding to arbitrary region meets the working method of this triggering chain table record, confirms the designated execution of triggering chained list that this region is corresponding.
9. device according to claim 6, is characterized in that, described trigger element automatically triggers corresponding event according to the triggering logic in triggering chained list corresponding to this region and comprises:
Travel through successively the event of triggering chain table record corresponding to this region,
For the event traversing, detect the triggering logic whether current condition meets this event, if, trigger this event, if not, when this event is not last event of triggering chain table record corresponding to this region, continue to return the event of triggering chain table record corresponding to this region of traversal.
10. device according to claim 6, is characterized in that, the triggering logic of described all kinds of events includes but not limited to following several:
The triggering mode of event;
Event for object;
The opportunity of Event triggered;
The parameter of Event triggered.
CN201310741667.2A 2013-12-27 2013-12-27 Method and device for implementing automatic trigger logics Pending CN103699487A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310741667.2A CN103699487A (en) 2013-12-27 2013-12-27 Method and device for implementing automatic trigger logics

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310741667.2A CN103699487A (en) 2013-12-27 2013-12-27 Method and device for implementing automatic trigger logics

Publications (1)

Publication Number Publication Date
CN103699487A true CN103699487A (en) 2014-04-02

Family

ID=50361023

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310741667.2A Pending CN103699487A (en) 2013-12-27 2013-12-27 Method and device for implementing automatic trigger logics

Country Status (1)

Country Link
CN (1) CN103699487A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109316750A (en) * 2018-11-21 2019-02-12 北京像素软件科技股份有限公司 Scene of game region partitioning method and device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040172599A1 (en) * 2003-02-28 2004-09-02 Patrick Calahan Systems and methods for streaming XPath query
CN101688899A (en) * 2007-08-22 2010-03-31 株式会社Lg化学 Apparatus for estimating open circuit voltage of battery, apparatus for estimating state of charge of battery, and method for controlling the same
CN102289467A (en) * 2011-07-22 2011-12-21 浙江百世技术有限公司 Method and device for determining target site
CN102662646A (en) * 2012-03-01 2012-09-12 华为技术有限公司 Sensing data processing method and compute node
CN103106222A (en) * 2011-11-15 2013-05-15 阿里巴巴集团控股有限公司 Processing method and processing device of timer

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040172599A1 (en) * 2003-02-28 2004-09-02 Patrick Calahan Systems and methods for streaming XPath query
CN101688899A (en) * 2007-08-22 2010-03-31 株式会社Lg化学 Apparatus for estimating open circuit voltage of battery, apparatus for estimating state of charge of battery, and method for controlling the same
CN102289467A (en) * 2011-07-22 2011-12-21 浙江百世技术有限公司 Method and device for determining target site
CN103106222A (en) * 2011-11-15 2013-05-15 阿里巴巴集团控股有限公司 Processing method and processing device of timer
CN102662646A (en) * 2012-03-01 2012-09-12 华为技术有限公司 Sensing data processing method and compute node

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109316750A (en) * 2018-11-21 2019-02-12 北京像素软件科技股份有限公司 Scene of game region partitioning method and device
CN109316750B (en) * 2018-11-21 2022-01-11 北京像素软件科技股份有限公司 Game scene area dividing method and device

Similar Documents

Publication Publication Date Title
CA2748497C (en) Standard gestures
CN106201266B (en) A kind of mobile control method and device of virtual role, electronic equipment
JP6259167B2 (en) Lighting effect control
CN106164852A (en) The method and system shift action of mobile object programmed with function object
US20080231628A1 (en) Utilizing Ray Tracing for Enhanced Artificial Intelligence Path-Finding
JP2017529188A5 (en)
US20090219291A1 (en) Movie animation systems
US9724607B2 (en) Controlling a display of a computer device
DE112013004190T5 (en) Integration of a robotic system into one or more mobile computing devices
CN104978759A (en) Method and apparatus for rendering same regions of multi frames
CN106582020B (en) Game level processing method and device
CN108037952A (en) The processing method of Object Operations, the generation method and device of Object Operations data
CN108536470A (en) A kind of development approach and system of resource file
CN102447818A (en) Playing method of video copyright protection and classification watching
CN103019725A (en) Interface logic control method based on 3D (three-dimensional) model
CN110262791A (en) A kind of visual programming method, apparatus and performer, readable storage medium storing program for executing
CN103699487A (en) Method and device for implementing automatic trigger logics
CN110716766A (en) Game scene loading method and device, computer readable medium and electronic equipment
Kohwalter et al. Capturing game telemetry with provenance
CN105607937B (en) A kind of hot patch method and apparatus
CN110427231B (en) Property throwing method and device, electronic equipment and storage medium
US20160378892A1 (en) Simulation device
CN109876446B (en) Method and device for detecting occupation distribution of game map and grid in memory
CN108159704A (en) A kind of gesture operation processing method and processing device
CN107832000A (en) Information processing method, device, electronic equipment and storage medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C02 Deemed withdrawal of patent application after publication (patent law 2001)
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20140402