Collision Detection - Jeff Thompson

文章推薦指數: 80 %
投票人數:10人

This book explains the algorithms behind those collisions using basic shapes like circles, rectangles, and lines so you can implement them into your own ... [yourbrowserdoesnotsupportthecanvastag] COLLISIONDETECTION JeffThompson Thecollisionofobjectsunderliesmostgameexperiencesanduser-interfaces.Baseballbatscollidewithballs,zombiesbumpintowalls,andMariolandsonplatformsandstompsturtles.Evensomethingassimpleasclickingabutton(arectangle)withyourmouse(apoint)isacollision. Thisbookexplainsthealgorithmsbehindthosecollisionsusingbasicshapeslikecircles,rectangles,andlinessoyoucanimplementthemintoyourownprojects. UPDATE!Thissitehasbeengettinglotsofvisitswhichisawesome.I'vemadesomechangessoitwilllookbetteronmobiledevices,makenavigationeasier,andtriedtolookovereverythingformistakes.Ifyouhaveanyproblemsorsuggestions,pleasepostanissueontheprojectrepository.Thanks! Readytogetstarted?SkipaheadtotheTableofContents... WHAT'SCOVEREDHERE? Thisbookcoverscollisionsbetweenpoints,circles,rectangles,lines,polygons,andtriangles.Theseexamplesaremeanttobeasreadableandeasilyunderstoodaspossible.Therearedefinitelyfaster,moreefficientwaystodetectthesecollisions,butthisbookisintendedtobefriendlyandteachtheprincipleswithminimalmath. Eachsectionincludeadescriptionofthecollisionalgorithmandaninteractiveexamplebuiltusingprocessing.js.Youcanviewthesourcecodeforalltheexamples(andthisbook!)onGitHub. NOTE!Ifyou'reonamobiledevice,theexamplesmightnotworksuperwellforyou.Theyaredesignedformouseinput,soifyou'regettingfrustratedoryourfingerisintheway,trythesiteonacomputer. WHAT'SNOT? Aswithanybook,there'salotmoreusefulmaterialthancouldbecoveredhere.Thingsthataren'tdiscussedaremostlyleftoutbecausethemathgetstoocomplicated.Three-dimensionalspaceisn'ttouchedon.Ellipses,whichseemliketheyshouldbeprettyeasy,areactuallyverydifficult. Ifthere'saspecificcollisionnotcoveredthatwouldbehelpful,pleasepleasesubmitanissuewitharequestor,betteryet,submitaworkingexamplethatyou'vebuilt! ISSUES? Ifyoufindcodethatdoesn'truncorrectly,analgorithmthatisn'texplainedquiteright,oratypo,pleasereportthematthisproject'sGitHubrepository.Thanksforyourhelp! NAVIGATION OK,let'swritesomecode!Clickthelinkatthebottomthepage,orthearrowsatthetop,tomovetothenextchapter.TheCollisionDetectionlinkatthetopwilltakeyoubacktotheTableofContents. NEXT:TableOfContents



請為這篇文章評分?