Académique Documents
Professionnel Documents
Culture Documents
Outline
Preface Casestudy:ResistanceGPOptimization CellPerformanceHighLevel AspectsforPerformanceaProposal Summary ModeratedDiscussion
Drones Aspectsexperiment
Preface
Qualifications?
Performanceconsiderationsforgameplay
Notwhatwereusedto
Commentsencouraged
ResistanceGPOptimization ProblemStatement
AIandMovewereexpensive Profilewasprettyflat,ie.fewhotspots Deferredtargetingcollisioncheckssmall improvement Designercontributions
Limitedeffect Toolaborintensivetobeageneralpurpose solution
MassiveMonolithicUpdatesareBad.
ResistanceGPOptimization theTechnique
DecidedtoimplementDrones Abilities
Verycheap(bycomparison)butConvincing NoAIorMove Selecttarget Shoot Cover(lowormedium,butnotfull) Die Promote
Dronescouldnotrelocate*
ResistanceGPOptimization DronePlanning
WhoisaDroneandwhen Desiredpopulation
3Affinities:No,Medium,High FillfromHighAffinityifpossible IfdesiredpopulationcantbefilledwithHigh Affinitycandidates,useLowAffinityones NeverdemoteNoAffinitycandidates 2distancesfullyspecifyAffinityZones*
ForResistance,A(moby)=f(distance)
ResistanceGPOptimization DronePlanning(contd)
Promotiontriggers
WhenisaDronenotaDrone? Damagedbyplayer Zoomedinon NoAffinity(partofPlanning) Timed,randomizedinterval
Planningupdatedcontinuously Planningdata
ResistanceGPOptimization Results
Droneswere~10%ofthecost Planningworkedwell Squadplanningdatausedrarely Withplanning,affinity,andpromotion triggers,Dronesarebarelynoticeable Afewscenariosstillneededtobetrimmed AI&Movefitinbudget
Proposal:AspectsforPerformance
IdeaofAspectstakenfromAspectOriented Programming
ConsiderthehighlevelelementsofCell performance
CellPerformanceHighLevel
Weakness
Highpenaltiesforcachemissandmispredicted branches Parallelism! Separateconcerns,runtheminparallel GoalsmatchAOP!
Strength
Approach:
Thesefactorsarelikelytobemoreprominentin futurehardware
Proposal:AspectsforPerformance
Systemsowntheirdata(insteadofmobys) WhenaSystemupdates,ittearsthroughitsdata Systemscouldworkinparallelwithothersystems Tighterloopswithfewerconditionalsandless branching NoneedtotestifaGameObjecthasaparticular typeofdatatoupdate Contextswitchesarealwaysexpensive! Systemsoperatingonlocaldatacanoperatemore efficiently
Proposal:AspectsforPerformance
InfrastructureforDronesexerciseinAOP
Wevebeenheadinginthatdirection!
Components PhysicsInstances UpdateClasses(toanextent) AnimManager
ToolshavemovedtowardAssets
LendsitselfwelltoAspects
Proposal:AspectsforPerformance
Ultimately,GameObjectisjustacontainer
Thecontainerisnolongernecessary!
Aspect*GetAspect(AspectType,GameObjectID)
Notallornothing
gradualtransitionisstraightforward
AspectsforPerformance CurrentTechnique
Components
AbstractinterfacetoGameObjects Encouragessynchronousprocessing
AspectsforPerformance LookingForward
Aspects
Dynamicallyadding/removingAspects supportedinaunifiedway Systemsowntheirdata,processingiscache friendly,encouragesasynchprocessing NooverheadqueryingforComponents
AOGD ThoughtExperiments
Howgranularshouldaspectsbe? Shouldtheybehierarchicalorflat? ConsiderformingastatemachineoutofAspects
Statetransitionsreplacethecurrentstateaspectwith another StateinitializedwhenAspectadded Supportforsimultaneousstates StatescommunicateviasharedBlackboard (effectivelymemberdata)(likedynamicpvars)
AOGD ThoughtExperiments
Newwaysofvisualization/analysis CoolAspectAnalysisscreens:
Aspectsbyowner(GameObjectID)
PointatGameObjectandseehisAspects Selectanaspectandseeitsproperties&values
AspectscouldimplementaDebugDumpmethod ToTTYortoViewport
AspectsbySystemw/owner Pivotdata
AspectsforPerformance Misc.Considerations
SharingdatabetweenAspects
crosscuttingconcernsinAOPlingo Implementassystemsseefit
SharedDatauploadedwithmultiplesystems Systemreferstodataownedbyothersystem
Debugging
Summary
Droneswereaveryeffectiveoptimization ProvidedalimitedtestofAspects Cellperformancedemandsparallelism Aspectorientedgamedevelopmentplays directlyintothestrengthsandweaknesses oftheCell
ModeratedDiscussion
SpeakUp