CN102387132A - Fighting system realization method - Google Patents
Fighting system realization method Download PDFInfo
- Publication number
- CN102387132A CN102387132A CN2011102478090A CN201110247809A CN102387132A CN 102387132 A CN102387132 A CN 102387132A CN 2011102478090 A CN2011102478090 A CN 2011102478090A CN 201110247809 A CN201110247809 A CN 201110247809A CN 102387132 A CN102387132 A CN 102387132A
- Authority
- CN
- China
- Prior art keywords
- client
- server
- technical ability
- pathfinding
- 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.)
- Granted
Links
Images
Landscapes
- Information Transfer Between Computers (AREA)
Abstract
The invention provides a fighting system realization method. The method comprises the following steps that: a client detects whether a game character that the client plays can move; if the character can move, a pathfinding logic is dynamically calculated; and according to the calculated pathfinding logic, pathfinding move is performed; after move is successful, a server is notified; after the server receives the notification, the pathfinding logic is dynamically calculated and the pathfinding move with the client is performed according to the calculated pathfinding logic; when there is abnormity during the pathfinding, the client is notified to stop and is brought back to a specific location. By using the method of the invention, on one hand, the client can move timely; on the other hand, the client does not need to send position information frequently to the server and a plug-in risk can be reduced.
Description
Technical field
The present invention relates to network technology, particularly the combat system implementation method.
Background technology
In present diverse network recreation, combat system is a very also very important first floor system in basis.The quality of combat system is related to the experience effect of game player in recreation, also is related to the effect of recreation.
Present combat system mainly is divided into two types, and one type is the turn-based combat system, represents as " dreamlike Journey to the West ", " asking " etc., and another kind of is the immediate system combat system, represents as " legend ", " World of Warcraft " etc.
In present combat system, moving of client mainly comprises dual mode: a kind of mode is that client is notified to server when mobile, moves after the waiting for server feedback again, and it is slow that this mode can cause client to move, and operates not smooth; Another kind of mode is: client is constantly sent positional information and is given server, and server is trusted this positional information, and this mode can increase the communication flows between the client and server greatly; Cause waste, and, usually can be by plug-in; Produce various serious bug, risk is bigger.
Summary of the invention
The invention provides the combat system implementation method, realize that on the one hand client in time moves, avoid client frequently to send positional information on the other hand, and reduce plug-in risk to server.
Technical scheme provided by the invention comprises:
A kind of combat system implementation method comprises:
Whether client detects its game role of serving as and can move, if, dynamic calculation pathfinding logic, and attempt pathfinding according to the pathfinding logic of self calculating and move, after moving successfully, notice is given server;
After server receives notice, dynamic calculation pathfinding logic, and according to the pathfinding logical AND client pathfinding together of self calculating, when in the pathfinding process, noting abnormalities, the notice client terminate moves, and client is withdrawn into assigned address.
Can find out by above technical scheme, among the present invention, the server trust client; Moved earlier by client, server and client side's pathfinding simultaneously afterwards is when server notes abnormalities in the pathfinding process; Revise the position of client, this can guarantee that client in time moves, and; Because client and server separately according to the pathfinding logic pathfinding of self, does not need frequent mutual, this has reduced the communication flows between the client and server; Save resource, and also reduce by the risk of plug-in utilization.
Description of drawings
The basic flow sheet that Fig. 1 provides for the embodiment of the invention;
The fight flow chart that Fig. 2 provides for the embodiment of the invention;
Event synchronization flow chart in the fight that Fig. 3 provides for the embodiment of the invention.
Embodiment
In order to make the object of the invention, technical scheme and advantage clearer, describe the present invention below in conjunction with accompanying drawing and specific embodiment.
Method provided by the invention comprises flow process shown in Figure 1:
Referring to Fig. 1, the basic flow sheet that Fig. 1 provides for the embodiment of the invention.As shown in Figure 1, this flow process can may further comprise the steps:
Particularly; This step 101 can through realizing to judge whether detect its game role of serving as can move: judge currently whether limit condition that game role that client serves as moves and exist and realize; If have; Confirm that then game role can not move, otherwise, confirm that then game role can move.
Step 102, dynamic calculation pathfinding logic, and attempt pathfinding according to the pathfinding logic of self calculating and move.
In this step 104, in the pathfinding logic that said server calculates, the starting point of pathfinding and terminal point all with the pathfinding logic of client calculating in starting point and terminal point identical.Usually, so long as starting point is identical with terminal point, then pathfinding logic also much at one.
Can find out that among the present invention, client and server pathfinding simultaneously need not notified to server when mobile as prior art; Move after the waiting for server feedback, this can make the smooth technique effect of client shows again, and; Among the present invention, client and server does not need frequent mutual separately according to the pathfinding logic pathfinding of self; This has reduced the communication flows between the client and server, saves resource, and also reduces by the risk of plug-in utilization.
When step 105, server noted abnormalities in the pathfinding process, the notice client terminate moved, and client is withdrawn into assigned address.
Here; When said unusually be that distance between said server and the said client is when unreasonable; Saidly client is withdrawn into assigned address comprises: client is returned to the rational position of distance that makes between said server and the said client, such as the position at server place etc.
When said unusual when detecting the condition that the said client of restriction moves for said server; Saidly client is withdrawn into assigned address comprises: client is returned near the position the current position of said server of said server appointment, unusual to avoid this.
So far, accomplish flow process shown in Figure 1.
Can find out from flow process shown in Figure 1, among the present invention, the server trust client; Moved earlier by client, server and client side's pathfinding simultaneously afterwards is when server notes abnormalities in the pathfinding process; Revise the position of client, this can guarantee that client in time moves, and; Because client and server separately according to the pathfinding logic pathfinding of self, does not need frequent mutual, this has reduced the communication flows between the client and server; Save resource, and also reduce by the risk of plug-in utilization.
Preferably, among the present invention, the game role that said client is served as also can be fought, and when in course of battle, need using technical ability, sends the technical ability request to server, and after the notice that receives the use technical ability that server sends, brings into use technical ability.Describe through flow process shown in Figure 2 below:
Need to prove that among the present invention, said client and server is observed identical fight logic, this fight logic is set in advance.
Referring to Fig. 2, the fight flow chart that Fig. 2 provides for the embodiment of the invention.As shown in Figure 2, this flow process can may further comprise the steps:
When step 201, client are fought needs use one technical ability at the game role of serving as, judge whether this technical ability satisfies condition, if then execution in step 202, otherwise, provide the prompting that technical ability does not satisfy condition.
Need to prove; For guaranteeing client and server position synchronous in fight; The game role present located position that the said client of portability is served as in the said technical ability request; So that server receives after this technical ability requires, the position that requires to carry according to this technical ability reach between the client and server synchronously.
After step 203, server receive the technical ability request, verify whether said client can use the technical ability of said client-requested, if then execution in step 204, otherwise the notice client terminate is used said technical ability.
Checking in this step 203 comprises: whether the frequency of utilization of judging the technical ability of said client-requested surpasses preset value; Said preset value is used to prevent the thresholding of plug-in malicious exploitation; The frequency of utilization of the technical ability of said client-requested is realized by the counter that is provided with, if then confirm as the plug-in utilization of malice; Stop client and use said technical ability, and write down plug-in situation to LOG; Otherwise, confirm that client can use the technical ability of request, execution in step 204.
When the judgement in this step 205 specifically realizes various ways can be arranged, such as judging according to can normally moving to the position that said technical ability request is carried in the present speed setting-up time of said game role, if can, then think rationally, otherwise, think unreasonable.
Can realize that through step 204 to step 206 server and client side is synchronous.Can find out, in client during at every turn to server requests technical ability, all can carry out client and server synchronously.That is to say that user end to server request technical ability is synchronous opportunity of client and server.It is synchronous why to carry out client and server, and main cause is: the position is very important in the course of battle, and the present invention is the trust server position, thus must be in course of battle the position of synchronization server and client as much as possible.
This step 207 can be carried out in the moving process of step 206.
The notice of the use technical ability that step 208, client reception server are sent, and after detecting said server and arriving said position, bring into use technical ability.
In this step 208,, then continue to wait for, arrive said position, just bring into use the technical ability of its request until said server if after client detects the said position of said server no show.
When step 209, client comprise chance event in the technical ability of using, use said random number seed to handle said chance event.
Through execution in step 209, can guarantee that the result of client and server is consistent.
So far, accomplish flow process shown in Figure 2.
Need to prove that in flow process shown in Figure 2, if discovering server is any unusual, all need in time to correct, this can improve player's experience sense.
In addition, also need to prove, in the fight logic of client executing; Exist some decision to judge such as attacking; And client self can not be judged, it can be carried out according to the result of determination of acquiescence, after server is carried out judgement; The result of determination of finding client executing is wrong, then in time corrects client.This can guarantee the accuracy of fighting.
In addition, in fight, the incident that client the triggers result corresponding with this incident must be synchronously, and Fig. 3 shows the flow process of event synchronization in the fight.
Referring to Fig. 3, the sketch map of event synchronization in the fight that Fig. 3 provides for the embodiment of the invention.As shown in Figure 3, this event synchronization is divided into 6 stages, describes successively below:
In the stage 1, client is brought into use technical ability in this stage.
In the stage 2, server detects client and brings into use technical ability in this stage;
In the stage 3, server sends the corresponding result data of incident to client in this stage.
In this stage 3, server is than the client trigger event, and (generally shift to an earlier date the 100-200 millisecond, specifically can adjust according to average latency) sent the corresponding result data of this incident can to shift to an earlier date a period of time.Here, incident is generally the action of client executing, and the result that the corresponding result data of incident causes for this action.In this stage 3, can limit this incident, such as, be critical event, such as injury judgement incident, technical ability flow process redirect incident etc.With the incident is that strike is an example, such as, the client fireball hits a target, and this hits the incident of being, and corresponding result can be the animation of getting a beating, fireball blast animation, and injury etc., this injury is that server calculates.
Stage 4, the result data that client-cache receives.
Stage 5, the client trigger event,
Stage 6, the corresponding result data of this incident that is triggered of the direct display buffer of client.
For the client fireball hits a target, corresponding result data is the animation of getting a beating with the incident, fireball blast animation; And injury is example; Then in this stage 6, when the client fireball hit a target, client can in time be play the animation that target is got a beating; The animation of fireball blast, and show injury.This performance that has guaranteed client is timely more, accurate, i.e. the effect of incident and client performance is synchronous, is in advance or is to lag behind unlike the prior art that kind.
Need to prove that if because some reason, server in time that incident is the corresponding result data of failing sends to client, then when the client trigger event, can wait until, when the result data arrival of correspondence, show this result data.
So far, accomplishing method provided by the invention describes.
Can find out by above technical scheme, among the present invention, the server trust client; Moved earlier by client, server and client side's pathfinding simultaneously afterwards is when server notes abnormalities in the pathfinding process; Revise the position of client, this can guarantee that client in time moves, and; Because client and server separately according to the pathfinding logic pathfinding of self, does not need frequent mutual, this has reduced the communication flows between the client and server; Save resource, and also reduce by the risk of plug-in utilization.
The above is merely preferred embodiment of the present invention, and is in order to restriction the present invention, not all within spirit of the present invention and principle, any modification of being made, is equal to replacement, improvement etc., all should be included within the scope that the present invention protects.
Claims (9)
1. a combat system implementation method is characterized in that, this method comprises:
Whether client detects its game role of serving as and can move, if, dynamic calculation pathfinding logic, and attempt pathfinding according to the pathfinding logic of self calculating and move, after moving successfully, notice is given server;
After server receives notice, dynamic calculation pathfinding logic, and according to the pathfinding logical AND client pathfinding together of self calculating, when in the pathfinding process, noting abnormalities, the notice client terminate moves, and client is withdrawn into assigned address.
2. method according to claim 1; It is characterized in that; When said unusually be distance between said server and said client when unreasonable, saidly client be withdrawn into assigned address comprise: client is returned to the rational position of distance that makes between said server and the said client;
When said unusual when detecting the condition that the said client of restriction moves, saidly client is withdrawn into assigned address comprises: near the position the current position of said server that client is returned to said server appointment for said server.
3. method according to claim 1 is characterized in that, in the pathfinding logic that pathfinding logic that said client is calculated and said server calculate, the starting point of pathfinding is identical with terminal point.
4. method according to claim 1 is characterized in that, this method further comprises:
The game role that said client is served as is fought according to the fight logic that is provided with, and when in course of battle, needing to use technical ability, sends the technical ability request to server, and after the notice that receives the use technical ability that server sends, brings into use technical ability.
5. method according to claim 4 is characterized in that, said user end to server sends the technical ability request and comprises:
Whether the technical ability that judgement needs to use satisfies condition, if satisfy, then sends the technical ability request to server, otherwise, provide the prompting that technical ability does not satisfy condition.
6. according to claim 4 or 5 described methods, it is characterized in that said server sends and uses the notice of technical ability to comprise:
After said server receives the technical ability request; Verify whether said client can use the technical ability of said client-requested; If then send the notice of using technical ability, and self also brings into use the technical ability of said client-requested according to said fight logic to client.
7. method according to claim 6 is characterized in that, said server sends to client and uses the notice of technical ability to comprise:
Server generates random number seed, said random number seed is carried in the notice of using technical ability sends to client;
This method further comprises:
When client comprises chance event in the technical ability of using, use said random number seed to handle said chance event.
8. method according to claim 6 is characterized in that, carries the game role present located position that said client is served as in the technical ability request that said client is sent;
Said server is when verifying out that said client can be used the technical ability of said client-requested; Further comprise: said server judges whether self is reasonable apart from the distance of the position that said technical ability request is carried; If; Self is set to said position, otherwise, move to said position according to present speed;
Said client brings into use technical ability to comprise: detects said server and whether arrives said position, if, then bring into use technical ability, otherwise, continue to wait for, arrive said position until said server.
9. according to claim 4 or 5 described methods, it is characterized in that this method further comprises:
Server is when detecting client and bring into use technical ability, and the corresponding result data of transmission incident is given client; Said incident comprises at least: injury judgement incident, technical ability flow process redirect incident;
The result data that client-cache receives, and when trigger event, the corresponding result data of this incident that is triggered of direct display buffer.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201110247809.0A CN102387132B (en) | 2011-08-25 | 2011-08-25 | Fighting system realization method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201110247809.0A CN102387132B (en) | 2011-08-25 | 2011-08-25 | Fighting system realization method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN102387132A true CN102387132A (en) | 2012-03-21 |
CN102387132B CN102387132B (en) | 2014-05-14 |
Family
ID=45826107
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201110247809.0A Active CN102387132B (en) | 2011-08-25 | 2011-08-25 | Fighting system realization method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN102387132B (en) |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102769616A (en) * | 2012-07-04 | 2012-11-07 | 珠海金山网络游戏科技有限公司 | Delay calculation method based on game movement logic client and server synchronization |
CN104503848A (en) * | 2014-12-04 | 2015-04-08 | 珠海金山网络游戏科技有限公司 | Synchronizing and executing method for moving instructions under C/S structure |
WO2015139671A1 (en) * | 2014-03-18 | 2015-09-24 | Tencent Technology (Shenzhen) Company Limited | Message processing method and terminal device |
CN105282252A (en) * | 2015-10-30 | 2016-01-27 | 广州银汉科技有限公司 | Weak network skill optimization method |
CN107835148A (en) * | 2017-08-23 | 2018-03-23 | 杭州电魂网络科技股份有限公司 | Game role control method, device, system and game client |
CN108325216A (en) * | 2017-12-29 | 2018-07-27 | 泉州鹰击长空遥控科技有限公司 | The position catching method and its device of remote-control toy, user terminal and system |
JP2019508084A (en) * | 2016-04-08 | 2019-03-28 | テンセント・テクノロジー・(シェンジェン)・カンパニー・リミテッド | Movement control method of role in game, server and client |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20020060519A (en) * | 2001-01-11 | 2002-07-18 | 이은숙 | Method for sending and receiving character movement data packet in online game |
WO2003053531A1 (en) * | 2001-12-11 | 2003-07-03 | Majorem Ltd. | Massive multiplayer real-time persistant network game engine |
CN1932829A (en) * | 2006-10-19 | 2007-03-21 | 北京金山数字娱乐科技有限公司 | System and method for obtaining inter-two-point path in network game |
CN101635011A (en) * | 2009-08-14 | 2010-01-27 | 腾讯科技(深圳)有限公司 | Route-finding method and route-finding device |
CN102129710A (en) * | 2010-12-30 | 2011-07-20 | 北京像素软件科技股份有限公司 | Method and system for simulating flight path |
-
2011
- 2011-08-25 CN CN201110247809.0A patent/CN102387132B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20020060519A (en) * | 2001-01-11 | 2002-07-18 | 이은숙 | Method for sending and receiving character movement data packet in online game |
WO2003053531A1 (en) * | 2001-12-11 | 2003-07-03 | Majorem Ltd. | Massive multiplayer real-time persistant network game engine |
CN1932829A (en) * | 2006-10-19 | 2007-03-21 | 北京金山数字娱乐科技有限公司 | System and method for obtaining inter-two-point path in network game |
CN101635011A (en) * | 2009-08-14 | 2010-01-27 | 腾讯科技(深圳)有限公司 | Route-finding method and route-finding device |
CN102129710A (en) * | 2010-12-30 | 2011-07-20 | 北京像素软件科技股份有限公司 | Method and system for simulating flight path |
Cited By (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102769616A (en) * | 2012-07-04 | 2012-11-07 | 珠海金山网络游戏科技有限公司 | Delay calculation method based on game movement logic client and server synchronization |
CN102769616B (en) * | 2012-07-04 | 2015-03-25 | 珠海金山网络游戏科技有限公司 | Delay calculation method based on game movement logic client and server synchronization |
WO2015139671A1 (en) * | 2014-03-18 | 2015-09-24 | Tencent Technology (Shenzhen) Company Limited | Message processing method and terminal device |
US10376796B2 (en) | 2014-03-18 | 2019-08-13 | Tencent Technology (Shenzhen) Company Limited | Message processing method and terminal device |
CN104503848A (en) * | 2014-12-04 | 2015-04-08 | 珠海金山网络游戏科技有限公司 | Synchronizing and executing method for moving instructions under C/S structure |
CN104503848B (en) * | 2014-12-04 | 2018-12-11 | 珠海金山网络游戏科技有限公司 | A kind of synchronization and execution method of the move under C/S framework |
CN105282252A (en) * | 2015-10-30 | 2016-01-27 | 广州银汉科技有限公司 | Weak network skill optimization method |
JP2019508084A (en) * | 2016-04-08 | 2019-03-28 | テンセント・テクノロジー・(シェンジェン)・カンパニー・リミテッド | Movement control method of role in game, server and client |
US10661164B2 (en) | 2016-04-08 | 2020-05-26 | Tencent Technology (Shenzhen) Company Limited | Method for controlling character movement in game, server, and client |
CN107835148A (en) * | 2017-08-23 | 2018-03-23 | 杭州电魂网络科技股份有限公司 | Game role control method, device, system and game client |
CN107835148B (en) * | 2017-08-23 | 2020-06-23 | 杭州电魂网络科技股份有限公司 | Game role control method, device and system and game client |
CN108325216A (en) * | 2017-12-29 | 2018-07-27 | 泉州鹰击长空遥控科技有限公司 | The position catching method and its device of remote-control toy, user terminal and system |
Also Published As
Publication number | Publication date |
---|---|
CN102387132B (en) | 2014-05-14 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102387132B (en) | Fighting system realization method | |
JP7058042B2 (en) | Online game synchronization method, online game synchronization system, server, client terminal, and online game synchronization program | |
RU2498519C2 (en) | Network game time synchronisation apparatus and corresponding method | |
JP5767760B2 (en) | Network game system without dynamic obstacles and its processing method | |
CN107835148B (en) | Game role control method, device and system and game client | |
US10729975B1 (en) | Network connection selection processing system | |
KR20180090318A (en) | Movement control method, server, and client for role in game | |
US9555329B2 (en) | Multi-access online game system and method for controlling game for use in the multi-access online game system | |
CN105163823A (en) | Methods and apparatus for hiding latency in network multiplayer games | |
CN109276883A (en) | Synchronous method, server-side, client, medium and the electronic equipment of game information | |
CN110602249A (en) | Resource allocation method and related device | |
JP2009508573A (en) | System and method for improving player experience in wireless games | |
CN110559663A (en) | Game control method, device, terminal equipment, server and medium | |
US10051084B2 (en) | Methods and systems for bandwidth-efficient remote procedure calls | |
CN103475659A (en) | Fighting method and system based on real-time strategy game | |
TW201722523A (en) | Player-versus-player game control method and program | |
EP3980148A1 (en) | Latency erasure | |
US8996944B2 (en) | Client-server gaming | |
CN103310084A (en) | Network distance-based game matching method and game server | |
JP7178421B2 (en) | Information processing method, device, program, and recording medium | |
US9479618B2 (en) | Mechanism for handling user input loss that occurs during transmission from a client device to a remote server using ring buffer messages in conjunction with UDP | |
CN110743167A (en) | Method and device for realizing interactive function | |
CN106693364A (en) | Method for relieving game server skill target detection computation pressure | |
WO2013122195A1 (en) | Game device, and computer readable recording medium in which computer programme used in game device is stored | |
JP5461670B1 (en) | Information processing apparatus and information processing apparatus program |
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 |