資源描述:
《SFMLGameDevelopment-Unknown.pdf》由會(huì)員上傳分享,免費(fèi)在線閱讀,更多相關(guān)內(nèi)容在學(xué)術(shù)論文-天天文庫。
1、TableofContentsSFMLGameDevelopmentCreditsForewordAbouttheAuthorsAbouttheReviewerswww.PacktPub.comSupportfiles,eBooks,discountoffersandmoreWhySubscribe?FreeAccessforPacktaccountholdersPrefaceWhatthisbookcoversWhatyouneedforthisbookWhothisbookisforConvent
2、ionsReaderfeedbackCustomersupportDownloadingtheexamplecodeErrataPiracyQuestions1.MakingaGameTickIntroducingSFMLDownloadingandinstallationAminimalexampleAfewnotesonC++DevelopingthefirstgameTheGameclassGameloopsandframesInputoverseveralframesVectoralgebra
3、Frame-independentmovementFixedtimestepsOthertechniquesrelatedtoframeratesDisplayingspritesonthescreenFilepathsandworkingdirectoriesReal-timerenderingAdaptingthecodeSummary2.KeepingTrackofYourTextures–ResourceManagementDefiningresourcesResourcesinSFMLTex
4、turesImagesFontsShadersSoundbuffersMusicAtypicalusecaseGraphicsAudioAcquiring,releasing,andaccessingresourcesAnautomatedapproachFindinganappropriatecontainerLoadingfromfilesAccessingthetexturesErrorhandlingBooleanreturnvaluesThrowingexceptionsAssertions
5、GeneralizingtheapproachCompatibilitywithsf::MusicAspecialcase–sf::ShaderSummary3.ForgeoftheGods–ShapingOurWorldEntitiesAircraftAlternativeentitydesignsRenderingthesceneRelativecoordinatesSFMLandtransformsScenegraphsScenenodesNodeinsertionandremovalMakin
6、gscenenodesdrawableDrawingentitiesConnectingentitieswithresourcesAligningtheoriginScenelayersUpdatingthesceneOnestepback–absolutetransformsTheviewViewportViewoptimizationsResolutionandaspectratioViewscrollingZoomandrotationLandscaperenderingSpriteNodeLa
7、ndscapetextureTexturerepeatingComposingourworldWorldinitializationLoadingthetexturesBuildingthesceneUpdateanddrawIntegratingtheGameclassTherun()methodSummary4.CommandandControl–InputHandlingPollingeventsWindoweventsJoystickeventsKeyboardeventsMouseevent
8、sGettingtheinputstateinrealtimeEventsandreal-timeinput–whentousewhichDeltamovementfromthemousePlayingnicewithyourapplicationneighborhoodAcommand-basedcommunicationsystemIntroducingcommandsReceivercategoriesCommandexecutionCommand