资源描述:
《网游同步解决方案(synchronous solution for online games)》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、网游同步解决方案(Synchronoussolutionforonlinegames)Becauserecentlyinthestudyofathing,thereisadifficultproblem,thatis,theproblemofsynchronization,hasbeenontheInternettofindinformation,andfinallyfoundafewarticles,feelgood.Thenetworkgameinsidethesynchronizationproblemsexplainedveryclearly~sostickout
2、everyonetodiscussanddiscuss.ButIwantthissynchronizationisnot,itisnowalittlepicture.Takeamomenttocalmdownandthinkaboutit.Thisissomuch.-------------------------------------------------------------------------------------------------------------------------------Iwonderifeveryonehaseverencou
3、nteredthiskindofsituation.Whenaplayersendsoutafireball,thefireballhasitsowntrajectory,sohowdoyoudetermineifthefireballhashitsomeone?Mostofthetime,whenplanningtomakethisrequest,usuallywillbedeniedbytheprogram,thereasonis:toomuchtrouble,haha.Thecomplexalsoinvolvestwofireballscollidingwithea
4、chother.So,isitreallyimpossibletosimulatethiskindofsimulationinonlinegames?Firstofall,let'sseewhatkindoftroublethissimulationcancause:1,theservermusttracethetrajectoryofthefireball,atfirstthought,veryslow.2,networkdelays,delays,delays,delays,instability,andtrouble.3,therearetwopointscanno
5、tbesolved,andthendonotwanttothinkagain.Well,actually,it'smucheasiertosimulatethefireballthantosimulatethemovementofthecharacters.Thereasonissimple.Thedirectionofthefireballdoesn'tchange.Here'salookatwhatspecificstructuretoachieve:DonotknowifyourememberDeadReckoningalgorithmImentionedlasty
6、earthistime,wewanttosimulatekeyliesinaballgamecalledMovingObjectsTracingServerserver,thisserveriswhat.Theserverreceivesthemaingameserversendstheeventregistrationinformation,suchasagameplayer,begantomove,sothemaingameservertoexercisePDU,thegameplayerincludesdirection,speed,acceleration,sta
7、rtingpointtoMOTS(MovingObjectsTracingServerMOTS),thenhestartedtheoperationsimulation,whenthegametheserversentsecondPDUpackage,foreachpositionoftheobjectismodified,andrestartthesimulation.So,what'sthepurposeofoursimulation?Ofcourse,whensomethinghappens,suchasacrash,o