2D GAMES AS CYBER-PHYSICAL SYSTEMS VIDYA NARAYANAN 1
MOTIVATION • Physics based games with discrete game controllers are hybrid systems • Impossible games are no fun • Game designs need “correctness” or playability guarantees • Trivial games are no fun • Games must allow “winning strategies” and be non-trivial • Inherently adversarial — hybrid games • Opportunity to study various elements of CPSs and dL VIDYA NARAYANAN 2
RELATED WORK • Adelhart and Kargov : Mario game solver Adelhardt, Kim, and Nedyalko Kargov. "Mario game solver." IT University of Copenhagen (2012). • Graph analysis over axioms • Aloupis et. al 2015 : Mario is hard Aloupis, Greg, et al. "Classic Nintendo games are (computationally) hard." Theoretical Computer Science 586 (2015): 135-160. • Demaine et.al 2016: Mario is easy Demaine, Erik D., Giovanni Viglietta, and Aaron Williams. "Super Mario Bros. is harder/easier than we thought." (2016). VIDYA NARAYANAN 3
A (VERY) SIMPLE GAME dy dx PLAYER DYNAMICS: x’ = vdx, y’ = vdy VIDYA NARAYANAN 4
A (VERY) SIMPLE GAME PLAYER DYNAMICS: PLAYER CONTROL: x’ = vdx, y’ = vdy {v:=v+1; ++ v:=v-1; ++ ?true} VIDYA NARAYANAN 5
A (VERY) SIMPLE GAME Hj PLAYER CONTROL: PLAYER DYNAMICS: {v:=v+1; ++ v:=v-1; ++ ?true} x’ = vdx, y’ = j + vdy, j’=-g {{j:=J; g:=G} ++ {j:=0;g:=0} ++ ?true} EVOLUTION CONSTRAINTS y >= ground VIDYA NARAYANAN 6
A (VERY) SIMPLE GAME Hj PLAYER CONTROL: PLAYER DYNAMICS: {v:=v+1; ++ v:=v-1; ++ ?true} x’ = vdx, y’ = j + vdy, j’=-g {{j:=J; g:=G} ++ {j:=0;g:=0} ++ ?true} EVOLUTION CONSTRAINTS WORLD FIX-UP CONTROL: if ( y <= ground ) { j:= 0; g:=0 } y >= ground VIDYA NARAYANAN 7
A (VERY) SIMPLE GAME Hj PLAYER CONTROL: PLAYER DYNAMICS: {v:=v+1; ++ v:=v-1; ++ ?true} x’ = vdx, y’ = j + vdy, j’=-g, t’=1 {{j:=J; g:=G} ++ {j:=0;g:=0} ++ ?true} EVOLUTION CONSTRAINTS WORLD FIX-UP CONTROL: if ( y <= ground ) { j:= 0; g:=0 } y >= ground t <= T VIDYA NARAYANAN 8
LEVEL DESIGN Infinitely long WORLD CONTROL: VIRTUAL PLAYER/WORLD DYNAMICS: dx:=*; dy:=* x’ = vdx, l’ = vdy ?dx^2+dy^2=1; ? dx > 0 VIDYA NARAYANAN 9
LEVEL DESIGN Infinitely long WORLD CONTROL: VIRTUAL PLAYER/WORLD DYNAMICS: dx:=*; dy:=* ux’ = v udx, h’ = v udy ?dx^2+dy^2=1; ? dx > 0 VIDYA NARAYANAN 10
LEVEL DESIGN PLAYER CONTROLLER if( t>=T) { t:=0, …} DYNAMICS …. WORLD CONTROLLER …. VIDYA NARAYANAN 11
SAFETY AND PLAYABILITY Infinitely long Max Height H PLAYER CONTROL: if( t >= T & y = l) { j….} WORLD CONTROL: dx:=*; dy:=* ?l+dy*T + clearance < H VIDYA NARAYANAN 12
LEVEL MODELING Infinitely long Max Height dy H dx VIDYA NARAYANAN 13
SAFETY AND PLAYABILITY Infinitely long dy Max Height H dx OBSTACLES: hb + clearance < H VIDYA NARAYANAN 14
GAME CHALLENGES ATTACK PROGRESS AVOID VIDYA NARAYANAN 15
GAME CHALLENGES { IF ( T = T) T := 0 PLAYER CONTROLLER } { ODES & T < T } xb,l { WORLD CONTROLLER} PROGRESS VIDYA NARAYANAN 16
GAME CHALLENGES INITIAL CONDITIONS -> <{ IF ( T = T) T := 0 PLAYER CONTROLLER } { ODES & T < T } xb,l { WORLD CONTROLLER} }* PROGRESS > PROGRESS? VIDYA NARAYANAN 17
GAME CHALLENGES INITIAL CONDITIONS -> <{ IF ( T = T) T := 0 PLAYER CONTROLLER } { ODES & T < T } xb,l { WORLD CONTROLLER} > PROGRESS? PROGRESS VIDYA NARAYANAN 18
GAME CHALLENGES INITIAL CONDITIONS -> <{ IF ( T = T) T := 0 PLAYER CONTROLLER } { ODES & T < T } xb,l { WORLD CONTROLLER}^@ > PROGRESS? PROGRESS VIDYA NARAYANAN 19
GAME CHALLENGES INITIAL CONDITIONS -> <{ IF ( T = T) T := 0 PLAYER CONTROLLER } { ODES & T < T }^@ xb,l { WORLD CONTROLLER}^@ > PROGRESS? PROGRESS ENVIRONMENT IS AN ADVERSARY BY DESIGN VIDYA NARAYANAN 20
GAME CHALLENGES INITIAL CONDITIONS -> <{ IF ( T = T) T := 0 PLAYER CONTROLLER } { ODES & T < T }^@ xb,l { WORLD CONTROLLER}^@ > PROGRESS? PROGRESS VIDYA NARAYANAN 21
GAME CHALLENGES INITIAL CONDITIONS -> <{ { IF ( T = T) T := 0 PLAYER CONTROLLER } xb,l { ODES & T < T }^@ ?(T > 0)^@ { WORLD CONTROLLER}^@ ?(DX > 0)^@ PROGRESS }* > PROGRESS? ENVIRONMENT IS REASONABLE VIDYA NARAYANAN 22
GAME CHALLENGES INITIAL CONDITIONS -> <{ { IF ( T = T) T := 0 PLAYER CONTROLLER } xb,l { ODES & T < T }^@ ?(T > EPS)^@ { WORLD CONTROLLER}^@ ?(DX > EPS)^@ PROGRESS }* > PROGRESS? IF V = 1, EPS^2 PROGRESS IN EACH ITERATION ENVIRONMENT IS “EPSILON” REASONABLE VIDYA NARAYANAN 23
GAME CHALLENGES INITIAL CONDITIONS -> <{ { IF ( T = T) T := 0 PLAYER CONTROLLER } xb,l { ODES & T < T }^@ ?(T > EPS)^@ { WORLD CONTROLLER}^@ ?(DX > EPS)^@ AVOID }* > AVOID? VIDYA NARAYANAN 24
GAME CHALLENGES INITIAL CONDITIONS -> <{ { IF ( T = T) T := 0 PLAYER CONTROLLER } xb,l { ODES & T < T }^@ ?(T > EPS)^@ { WORLD CONTROLLER}^@ ?(DX > EPS)^@ AVOID } > AVOID? SINGLE STEP VIDYA NARAYANAN 25
GAME CHALLENGES INITIAL CONDITIONS: XB = X + TJ * V , T = 2*TJ, DX > 0 POST CONDITION: X = XB -> Y > L xb,l AVOID CAN MAKE “PROGRESS” ON THE LEVEL CAN AVOID OBSTACLE BY JUMPING IF TJ = (J+V)^2/2G CONDITIONS HOLD VIDYA NARAYANAN 26
GAME CHALLENGES INITIAL CONDITIONS: XB = X + (TJ + TB)*V , TJ + TB < T POST CONDITION: X = XB -> Y = YB ATTACK HJ = (J+V)^2/2G TJ = (J+V)/G TB^2 = 2(HB-HJ)/G , TB > 0 VIDYA NARAYANAN 27
COMPOSITION? VIDYA NARAYANAN 28
INTERACTIVE DESIGN? VIDYA NARAYANAN 29
THANK YOU! ICON CREDITS: THE NOUN PROJECT JOEL MCKINNEY, ICONSPHERE, CORPUS DELICTI VIDYA NARAYANAN 30
Recommend
More recommend