CN102387132B - Fighting system realization method - Google Patents
Fighting system realization method Download PDFInfo
- Publication number
- CN102387132B CN102387132B CN201110247809.0A CN201110247809A CN102387132B CN 102387132 B CN102387132 B CN 102387132B CN 201110247809 A CN201110247809 A CN 201110247809A CN 102387132 B CN102387132 B CN 102387132B
- Authority
- CN
- China
- Prior art keywords
- client
- technical ability
- server
- pathfinding
- event
- 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
Links
Images
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 fighting system realization method.
Background technology
In current diverse network game, combat system is a very basic also very important first floor system.The quality of combat system, is related to the experience effect of game player in game, is also related to the effect of game.
Current combat system is mainly divided into two classes, and a class is turn-based combat system, represents that another kind of is immediate system combat system as " dreamlike Journey to the West ", " asking " etc., represents as " legend ", " World of Warcraft " etc.
In current combat system, the movement of client mainly comprises two kinds of modes: a kind of mode is that client is notified to server when mobile, after waiting for server feedback, moves again, and it is slow that this mode can cause client to move, and operates not smooth; Another kind of mode is: client constantly sends positional information to server, and server is trusted this positional information, and this mode can increase the communication flows between client and server greatly; cause waste, and, conventionally can be by plug-in; produce various serious bug, risk is larger.
Summary of the invention
The invention provides fighting system realization method, realize client on the one hand and move in time, avoid on the other hand client frequently to send positional information to server, and reduce plug-in risk.
Technical scheme provided by the invention comprises:
A kind of fighting system realization method, comprising:
Whether client detects its game role of serving as and can move, if so, dynamic calculation pathfinding logic, and according to self calculate pathfinding logic attempt pathfinding move, after move successfully, notify to server;
Server receives after notice, dynamic calculation pathfinding logic, and the pathfinding logical AND client pathfinding together of calculating according to self, and while noting abnormalities in pathfinding process, notice client terminate moves, and client is withdrawn into assigned address.
As can be seen from the above technical solutions, in the present invention, server trust client, first moved by client, server and client side's pathfinding simultaneously afterwards, in the time that server notes abnormalities in pathfinding process, revise the position of client, this can guarantee that client moves in time, and, because client and server is separately according to the pathfinding logic pathfinding of self, do not need frequent mutual, this has reduced the communication flows between client and server, saving resource, and also reduce by the risk of plug-in utilization.
Accompanying drawing explanation
The basic flow sheet that Fig. 1 provides for the embodiment of the present invention;
The fight flow chart that Fig. 2 provides for the embodiment of the present invention;
Event synchronization flow chart in the fight 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, describe the present invention below in conjunction with the drawings and specific embodiments.
Method provided by the invention comprises the flow process shown in Fig. 1:
Referring to Fig. 1, the basic flow sheet 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, whether client detects its game role of serving as and can move, and if so, performs step 102, otherwise, do not move.
Particularly, whether this step 101 can be by detecting its game role of serving as and can move judging to realize: judge currently whether limit the condition that game role that client serves as moves and exist to realize, if had, determine that game role can not move, otherwise, determine that game role can move.
Step 102, dynamic calculation pathfinding logic, and the pathfinding logic trial pathfinding of calculating according to self is moved.
Step 103, client is after moving successfully, and notice is to server.
Step 104, server receives after notice, dynamic calculation pathfinding logic, and the pathfinding logical AND client pathfinding together of calculating according to self.
In this step 104, in the pathfinding logic that described server calculates, starting point and terminal in the pathfinding logic that the starting point of pathfinding is all calculated with client with terminal are identical.Conventionally,, as long as starting point is identical with terminal, pathfinding logic is also almost identical.
Can find out, in the present invention, client and server pathfinding simultaneously, do not need when mobile, to notify to server as prior art, after waiting for server feedback, move, this can make the technique effect of client shows smoothness again, and, in the present invention, client and server, separately according to the pathfinding logic pathfinding of self, does not need frequently alternately, and this has reduced the communication flows between client and server, saving resource, and also reduce by the risk of plug-in utilization.
Step 105, when server notes abnormalities in pathfinding process, notice client terminate moves, and client is withdrawn into assigned address.
Here, when described be extremely that distance between described server and described client is when unreasonable, describedly client is withdrawn into assigned address comprises: client is returned to the rational position of distance making between described server and described client, such as the position at server place etc.
When described abnormal while detecting for described server the condition that the described client of restriction moves, describedly client is withdrawn into assigned address comprises: client is returned to near the position current position of described server that described server is specified, to avoid this abnormal.
So far, complete the flow process shown in Fig. 1.
Can find out from the flow process shown in Fig. 1, in the present invention, server trust client, first moved by client, server and client side's pathfinding simultaneously afterwards, in the time that server notes abnormalities in pathfinding process, revise the position of client, this can guarantee that client moves in time, and, because client and server is separately according to the pathfinding logic pathfinding of self, do not need frequent mutual, this has reduced the communication flows between client and server, saving resource, and also reduce by the risk of plug-in utilization.
Preferably, in the present invention, the game role that described client is served as also can be fought, and while needing to use technical ability in course of battle, sends technical ability request to server, and receiving after the notice of the use technical ability that server sends, brings into use technical ability.Be described below by the flow process shown in Fig. 2:
It should be noted that, in the present invention, described client and server is observed identical fight logic, and this fight logic is set in advance.
Referring to Fig. 2, the fight flow chart that Fig. 2 provides for the embodiment of the present invention.As shown in Figure 2, this flow process can comprise the following steps:
It should be noted that, synchronous for guaranteeing client and server position in fight, the current residing position of game role that in described technical ability request, described in portability, client is served as, so that server receives this technical ability require after, the position that requires to carry according to this technical ability reach between client and server synchronously.
Checking in this step 203 comprises: whether the frequency of utilization that judges the technical ability of described client-requested exceedes preset value, described preset value is for preventing the thresholding of plug-in malicious exploitation, the frequency of utilization of the technical ability of described client-requested is realized by the counter arranging, if, be defined as the plug-in utilization of malice, stop client and use described technical ability, and record plug-in situation to LOG; Otherwise, determine that client can be used the technical ability of request, execution step 204.
When judgement specific implementation in this step 205, can there is various ways, such as judging according to can normally moving to the position that described technical ability request is carried in the present speed setting-up time of described game role, if can, think rationally, otherwise, think unreasonable.
Can realize server and client side by step 204 to step 206 synchronous.Can find out, during at every turn to server request technical ability, all can carry out the synchronous of client and server in client.That is to say that user end to server request technical ability is synchronous opportunity of client and server.Why carry out client and server synchronous, main cause is: in course of battle, position is very important, and the present invention is 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.
In this step 208, do not arrive behind described position if client detects described server, continue to wait for, until described server arrives described position, just bring into use the technical ability of its request.
Step 209, client, in the time that the technical ability using comprises chance event, is used described random number seed to process described chance event.
By performing step 209, can guarantee that the result of client and server is consistent.
So far, complete the flow process shown in Fig. 2.
It should be noted that, in the flow process shown in Fig. 2, if discovering server is any abnormal, all need timely correction, this can improve player's experience sense.
In addition, also it should be noted that, in the fight logic of client executing, exist some decision such as attacks results decision, and client self can not be judged, it can be carried out according to the result of determination of acquiescence, carries out after judgement at server, the result of determination of finding client executing is wrong, corrects in time client.This can guarantee the accuracy of fight.
In addition, in fight, the event result corresponding with this event that client triggers must be synchronous, and Fig. 3 shows the flow process of event synchronization in fight.
Referring to Fig. 3, the schematic diagram of event synchronization in the fight that Fig. 3 provides for the embodiment of the present invention.As shown in Figure 3, this event synchronization is divided into 6 stages, describes successively below:
In the stage 1, within this stage, client is brought into use technical ability.
In the stage 2, within this stage, server detects that client brings into use technical ability;
In the stage 3, within this stage, server sends result data corresponding to event to client.
In this stage 3, server is than client trigger event, and (generally 100-200 millisecond in advance, specifically can according to average latency adjustment) sends result data corresponding to this event can to shift to an earlier date a period of time.Here, event is generally the action of client executing, and result data corresponding to event is the result that this action causes.In this stage 3, can limit this event, such as, be critical event, such as injury judgement event, technical ability flow process redirect event etc.Take event as hitting as example, such as, client fireball hits a target, and this hits the event 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, client trigger event,
Stage 6, the result data corresponding to this event being triggered of the direct display buffer of client.
Hit a target take event as client fireball, corresponding result data is the animation of getting a beating, fireball blast animation, and injury is example,, in this stage 6, in the time that client fireball hits a target, client can be play the animation that target is got a beating in time, the animation of fireball blast, and show injury.More in time, accurately, the effect of event and client performance is synchronous in this performance that has guaranteed client, is in advance or is hysteresis unlike prior art.
It should be noted that, if because some reason, server could not send to client by result data corresponding event in time,, when client trigger event, can wait until, until when the arrival of the result data of correspondence, show this result data.
So far, completing method provided by the invention describes.
As can be seen from the above technical solutions, in the present invention, server trust client, first moved by client, server and client side's pathfinding simultaneously afterwards, in the time that server notes abnormalities in pathfinding process, revise the position of client, this can guarantee that client moves in time, and, because client and server is separately according to the pathfinding logic pathfinding of self, do not need frequent mutual, this has reduced the communication flows between client and server, saving resource, and also reduce by the risk of plug-in utilization.
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 (7)
1. a fighting system realization method, is characterized in that, the method comprises:
Whether client detects its game role of serving as and can move, if so, dynamic calculation pathfinding logic, and the game role that it is served as is moved in the pathfinding logic trial pathfinding of calculating according to self, the game role that client is served as is after moving successfully, and notice is to server;
Server receives after notice, dynamic calculation pathfinding logic, and the pathfinding logical AND client pathfinding together of calculating according to self, when noting abnormalities in pathfinding process, its game role of serving as of notice client terminate moves, and the game role that client is served as is withdrawn into assigned address;
When described abnormal while detecting for described server the condition that the described client of restriction moves, describedly client is withdrawn into assigned address comprises: the game role that client is served as is returned near the position current position of game role in described server that described server is specified;
In the pathfinding logic that the pathfinding logic that described client is calculated and described server calculate, the starting point of pathfinding is identical with terminal.
2. method according to claim 1, is characterized in that, the method further comprises:
The game role that described client is served as is fought according to the fight logic arranging, and while needing to use technical ability in course of battle, sends technical ability request to server, and receiving after the notice of the use technical ability that server sends, brings into use technical ability.
3. method according to claim 2, is characterized in that, described user end to server sends technical ability request and comprises:
Judge and need the technical ability using whether to satisfy condition, if met, send technical ability request to server, otherwise, the prompting that technical ability does not satisfy condition provided.
4. according to the method in claim 2 or 3, it is characterized in that, described server sends and uses the notice of technical ability to comprise:
Described server receives after technical ability request, verify whether described client can use the technical ability of described client-requested, if so, send to client the notice that uses technical ability, and self also brings into use the technical ability of described client-requested according to described fight logic.
5. method according to claim 4, is characterized in that, described server sends and uses the notice of technical ability to comprise to client:
Server generates random number seed, and described random number seed is carried in the notice that uses technical ability and sends to client;
The method further comprises:
Client, in the time that the technical ability using comprises chance event, is used described random number seed to process described chance event.
6. method according to claim 4, is characterized in that, in the technical ability request that described client sends, carries the current residing position of game role that described client is served as;
Described server is in the time verifying described client and can use the technical ability of described client-requested, further comprise: described server judges that whether the distance of the position of self carrying apart from described technical ability request is reasonable, if, self is set to described position, otherwise, move to described position according to present speed;
Described client brings into use technical ability to comprise: detects described server and whether arrives described position, if so, bring into use technical ability, otherwise, continue to wait for, until described server arrives described position.
7. according to the method in claim 2 or 3, it is characterized in that, the method further comprises:
Server is in the time detecting that client is brought into use technical ability, and result data corresponding to transmission event is to client; Described event at least comprises: injury judgement event, technical ability flow process redirect event;
The result data that client-cache receives, and in the time of trigger event, the directly result data corresponding to this event being triggered of 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 CN102387132A (en) | 2012-03-21 |
CN102387132B true 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) |
Families Citing this family (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102769616B (en) * | 2012-07-04 | 2015-03-25 | 珠海金山网络游戏科技有限公司 | Delay calculation method based on game movement logic client and server synchronization |
CN104932872A (en) | 2014-03-18 | 2015-09-23 | 腾讯科技(深圳)有限公司 | Message processing method and server |
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 |
CN105879391B (en) * | 2016-04-08 | 2019-04-02 | 腾讯科技(深圳)有限公司 | The control method for movement and server and client of role in a kind of game |
CN107835148B (en) * | 2017-08-23 | 2020-06-23 | 杭州电魂网络科技股份有限公司 | Game role control method, device and system and game client |
CN108325216B (en) * | 2017-12-29 | 2020-08-14 | 黄巧香 | Position capturing method and device of remote control toy, user terminal and system |
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 |
Also Published As
Publication number | Publication date |
---|---|
CN102387132A (en) | 2012-03-21 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102387132B (en) | Fighting system realization method | |
US8545325B2 (en) | Communication game system | |
US9804743B2 (en) | Sequential selection of multiple objects | |
JP7058042B2 (en) | Online game synchronization method, online game synchronization system, server, client terminal, and online game synchronization program | |
EP2615758B1 (en) | Fault-tolerant method for online game interaction logic and fault-tolerant system and client for online games | |
CN103272382A (en) | Method and device for using Bluetooth gamepad to simulate intelligent terminal touch screen to control game | |
US10729975B1 (en) | Network connection selection processing system | |
US20190329129A1 (en) | Systems and methods for transferring object authority in a shared virtual environment | |
WO2014026647A1 (en) | Network game system without dynamic obstructions and processing method thereof | |
TWI600456B (en) | Battle-type game control methods and programs | |
CN105163823A (en) | Methods and apparatus for hiding latency in network multiplayer games | |
CN111249719B (en) | Track prompting method and device, storage medium and electronic device | |
CN110711380A (en) | State processing method and related device | |
CN110559663A (en) | Game control method, device, terminal equipment, server and medium | |
CN103731340B (en) | Communication method for online game system | |
US20200155950A1 (en) | Program, information processing device, and control method | |
US8996944B2 (en) | Client-server gaming | |
WO2020247118A1 (en) | Latency erasure | |
CN103310084A (en) | Network distance-based game matching method and game server | |
JP2011143104A (en) | Game system and game terminal | |
JPH11196126A (en) | Message processing method of multiuser game program | |
JP7178421B2 (en) | Information processing method, device, program, and recording medium | |
US9220987B2 (en) | Method of exchanging data between communication terminals | |
JP2016039876A (en) | System, server device, and program | |
JP6148149B2 (en) | Video game processing program and video game processing system |
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 |