builing brink’s smart systmtwvideo01.ubm-us.net/o1/vault/gdc2012/slides/programming track... ·...
TRANSCRIPT
![Page 1: BUILING BRINK’S SMART SYSTMtwvideo01.ubm-us.net/o1/vault/gdc2012/slides/Programming Track... · Step 4.3: Evaluate Low Moves Iterate all areas Area within height of 0.4x player](https://reader035.vdocuments.net/reader035/viewer/2022071001/5fbd50a9415a36626334e5b3/html5/thumbnails/1.jpg)
VAULT, SLIDE, MANTLE BUILDING BRINK’S SMART SYSTEM
Arne Olav Hallingstad Lead Gameplay Programmer Splash Damage
BRINK is a registered trademark of ZeniMax Media Inc. © 2011. ZeniMax Media Inc. All Rights Reserved.
![Page 2: BUILING BRINK’S SMART SYSTMtwvideo01.ubm-us.net/o1/vault/gdc2012/slides/Programming Track... · Step 4.3: Evaluate Low Moves Iterate all areas Area within height of 0.4x player](https://reader035.vdocuments.net/reader035/viewer/2022071001/5fbd50a9415a36626334e5b3/html5/thumbnails/2.jpg)
Splash Damage
Multiplayer team & objective based FPS games
Relatively small team
Evolve multiplayer shooters
![Page 3: BUILING BRINK’S SMART SYSTMtwvideo01.ubm-us.net/o1/vault/gdc2012/slides/Programming Track... · Step 4.3: Evaluate Low Moves Iterate all areas Area within height of 0.4x player](https://reader035.vdocuments.net/reader035/viewer/2022071001/5fbd50a9415a36626334e5b3/html5/thumbnails/3.jpg)
Goals
Improve player movement
Be consistent
Be accessible
Support different body types
Shouldn’t require extra LD work
Must be usable by AI JACK MONAHAN
GAUSSWERKS.COM
![Page 4: BUILING BRINK’S SMART SYSTMtwvideo01.ubm-us.net/o1/vault/gdc2012/slides/Programming Track... · Step 4.3: Evaluate Low Moves Iterate all areas Area within height of 0.4x player](https://reader035.vdocuments.net/reader035/viewer/2022071001/5fbd50a9415a36626334e5b3/html5/thumbnails/4.jpg)
SMART moves
![Page 5: BUILING BRINK’S SMART SYSTMtwvideo01.ubm-us.net/o1/vault/gdc2012/slides/Programming Track... · Step 4.3: Evaluate Low Moves Iterate all areas Area within height of 0.4x player](https://reader035.vdocuments.net/reader035/viewer/2022071001/5fbd50a9415a36626334e5b3/html5/thumbnails/5.jpg)
What we’ll cover
Prototype
Precomputation
Runtime Detection
Runtime Execution
Lessons Learned
![Page 6: BUILING BRINK’S SMART SYSTMtwvideo01.ubm-us.net/o1/vault/gdc2012/slides/Programming Track... · Step 4.3: Evaluate Low Moves Iterate all areas Area within height of 0.4x player](https://reader035.vdocuments.net/reader035/viewer/2022071001/5fbd50a9415a36626334e5b3/html5/thumbnails/6.jpg)
Prototype
![Page 7: BUILING BRINK’S SMART SYSTMtwvideo01.ubm-us.net/o1/vault/gdc2012/slides/Programming Track... · Step 4.3: Evaluate Low Moves Iterate all areas Area within height of 0.4x player](https://reader035.vdocuments.net/reader035/viewer/2022071001/5fbd50a9415a36626334e5b3/html5/thumbnails/7.jpg)
Prototype
Prove viability of SMART movement
– Multiplayer game
– Impact on level design and gameplay
Prototyped using run-time collision traces
Refined over 6 months
![Page 8: BUILING BRINK’S SMART SYSTMtwvideo01.ubm-us.net/o1/vault/gdc2012/slides/Programming Track... · Step 4.3: Evaluate Low Moves Iterate all areas Area within height of 0.4x player](https://reader035.vdocuments.net/reader035/viewer/2022071001/5fbd50a9415a36626334e5b3/html5/thumbnails/8.jpg)
Ledge Detection & Vaulting
Find ground
Find wall
Find low edge/high edge
Trace clip to ledge height
Trace clip over ledge
Trace clip down
Trace down on ledge
![Page 9: BUILING BRINK’S SMART SYSTMtwvideo01.ubm-us.net/o1/vault/gdc2012/slides/Programming Track... · Step 4.3: Evaluate Low Moves Iterate all areas Area within height of 0.4x player](https://reader035.vdocuments.net/reader035/viewer/2022071001/5fbd50a9415a36626334e5b3/html5/thumbnails/9.jpg)
Successes
Easy to implement
No LD placed hint objects
Works on any map
Standardized map metrics
![Page 10: BUILING BRINK’S SMART SYSTMtwvideo01.ubm-us.net/o1/vault/gdc2012/slides/Programming Track... · Step 4.3: Evaluate Low Moves Iterate all areas Area within height of 0.4x player](https://reader035.vdocuments.net/reader035/viewer/2022071001/5fbd50a9415a36626334e5b3/html5/thumbnails/10.jpg)
Issues
At least 1 trace every frame
Worst case 8 traces per player
![Page 11: BUILING BRINK’S SMART SYSTMtwvideo01.ubm-us.net/o1/vault/gdc2012/slides/Programming Track... · Step 4.3: Evaluate Low Moves Iterate all areas Area within height of 0.4x player](https://reader035.vdocuments.net/reader035/viewer/2022071001/5fbd50a9415a36626334e5b3/html5/thumbnails/11.jpg)
Precomputation
![Page 12: BUILING BRINK’S SMART SYSTMtwvideo01.ubm-us.net/o1/vault/gdc2012/slides/Programming Track... · Step 4.3: Evaluate Low Moves Iterate all areas Area within height of 0.4x player](https://reader035.vdocuments.net/reader035/viewer/2022071001/5fbd50a9415a36626334e5b3/html5/thumbnails/12.jpg)
Nav mesh system
Used for AI path-finding
Map-compile step
Areas connected by reachabilities
Potential use for SMART?
![Page 13: BUILING BRINK’S SMART SYSTMtwvideo01.ubm-us.net/o1/vault/gdc2012/slides/Programming Track... · Step 4.3: Evaluate Low Moves Iterate all areas Area within height of 0.4x player](https://reader035.vdocuments.net/reader035/viewer/2022071001/5fbd50a9415a36626334e5b3/html5/thumbnails/13.jpg)
Reachabilities
Get all edges between two areas
Edges overlap vertically we may create a reachability
Stores edge segment
travel_flags
![Page 14: BUILING BRINK’S SMART SYSTMtwvideo01.ubm-us.net/o1/vault/gdc2012/slides/Programming Track... · Step 4.3: Evaluate Low Moves Iterate all areas Area within height of 0.4x player](https://reader035.vdocuments.net/reader035/viewer/2022071001/5fbd50a9415a36626334e5b3/html5/thumbnails/14.jpg)
Reachability Types
barrier_vault barrier_mantle AI pathfinding Used by players & bots barrier_dynamic
– Used by players only – Vault/Mantle move decided at
runtime – Explosion in number of reachabilities
barrier_dynamic barrier_mantle barrier_vault
![Page 15: BUILING BRINK’S SMART SYSTMtwvideo01.ubm-us.net/o1/vault/gdc2012/slides/Programming Track... · Step 4.3: Evaluate Low Moves Iterate all areas Area within height of 0.4x player](https://reader035.vdocuments.net/reader035/viewer/2022071001/5fbd50a9415a36626334e5b3/html5/thumbnails/15.jpg)
Slide
Areas marked low ceiling
Bots & players required to crouch
Players can auto slide into these areas
![Page 16: BUILING BRINK’S SMART SYSTMtwvideo01.ubm-us.net/o1/vault/gdc2012/slides/Programming Track... · Step 4.3: Evaluate Low Moves Iterate all areas Area within height of 0.4x player](https://reader035.vdocuments.net/reader035/viewer/2022071001/5fbd50a9415a36626334e5b3/html5/thumbnails/16.jpg)
Runtime Detection
![Page 17: BUILING BRINK’S SMART SYSTMtwvideo01.ubm-us.net/o1/vault/gdc2012/slides/Programming Track... · Step 4.3: Evaluate Low Moves Iterate all areas Area within height of 0.4x player](https://reader035.vdocuments.net/reader035/viewer/2022071001/5fbd50a9415a36626334e5b3/html5/thumbnails/17.jpg)
Player Physics Loop
Step 1: Is player on ground? Step 2: Query player body type for available movement
modes Step 3: Detect high moves (vault, mantle, wall hop) Step 4: Detect low moves (slides) Step 5: Choose active move Step 6: Update player state machine
![Page 18: BUILING BRINK’S SMART SYSTMtwvideo01.ubm-us.net/o1/vault/gdc2012/slides/Programming Track... · Step 4.3: Evaluate Low Moves Iterate all areas Area within height of 0.4x player](https://reader035.vdocuments.net/reader035/viewer/2022071001/5fbd50a9415a36626334e5b3/html5/thumbnails/18.jpg)
Step 3: Detect High Move
3.1: Player checks
3.2: Nav mesh query
3.3: Evaluate high moves
![Page 19: BUILING BRINK’S SMART SYSTMtwvideo01.ubm-us.net/o1/vault/gdc2012/slides/Programming Track... · Step 4.3: Evaluate Low Moves Iterate all areas Area within height of 0.4x player](https://reader035.vdocuments.net/reader035/viewer/2022071001/5fbd50a9415a36626334e5b3/html5/thumbnails/19.jpg)
Step 3.1: Player Checks
• Cannot be in active state
• Vaulting
• Mantling
• Sliding
• Iron-sighting
• Knocked down
![Page 20: BUILING BRINK’S SMART SYSTMtwvideo01.ubm-us.net/o1/vault/gdc2012/slides/Programming Track... · Step 4.3: Evaluate Low Moves Iterate all areas Area within height of 0.4x player](https://reader035.vdocuments.net/reader035/viewer/2022071001/5fbd50a9415a36626334e5b3/html5/thumbnails/20.jpg)
Step 3.2: Nav Mesh Query
Search bounds 6x player b-box width & 2.5x player height
Areas = GetBoundsAreas( searchBounds )
– Areas in BSP-tree
For each Area
– For each Reachability
• barrier_vault, barrier_mantle or barrier_dynamic
• Append to list
![Page 21: BUILING BRINK’S SMART SYSTMtwvideo01.ubm-us.net/o1/vault/gdc2012/slides/Programming Track... · Step 4.3: Evaluate Low Moves Iterate all areas Area within height of 0.4x player](https://reader035.vdocuments.net/reader035/viewer/2022071001/5fbd50a9415a36626334e5b3/html5/thumbnails/21.jpg)
Step 3.3: Evaluate High Moves
Iterate all reachabilities – Player must look at the ledge – Distance within 2.5x player b-box width
Vault: ledge height is 0.4x-0.8x player height
Mantle: ledge height is 0.8x-1.4x player height
Auto wall hop: Ledge height is mantle height + player’s jump height
![Page 22: BUILING BRINK’S SMART SYSTMtwvideo01.ubm-us.net/o1/vault/gdc2012/slides/Programming Track... · Step 4.3: Evaluate Low Moves Iterate all areas Area within height of 0.4x player](https://reader035.vdocuments.net/reader035/viewer/2022071001/5fbd50a9415a36626334e5b3/html5/thumbnails/22.jpg)
Step 3.3: Evaluate High Moves
Reachability list
Exclude wall hop if vault/mantle in list
Mutual exclusion
– Allow mantle if within 1.5x player b-box width
– Otherwise: Allow vault
Sort potential moves by closest ledge
![Page 23: BUILING BRINK’S SMART SYSTMtwvideo01.ubm-us.net/o1/vault/gdc2012/slides/Programming Track... · Step 4.3: Evaluate Low Moves Iterate all areas Area within height of 0.4x player](https://reader035.vdocuments.net/reader035/viewer/2022071001/5fbd50a9415a36626334e5b3/html5/thumbnails/23.jpg)
Player Physics Loop
Step 1: Is player on ground? Step 2: Query player body type for available movement
modes Step 3: Detect high moves (vault, mantle, wall hop) Step 4: Detect low moves (slide) Step 5: Choose active move Step 6: Update player for delta time
![Page 24: BUILING BRINK’S SMART SYSTMtwvideo01.ubm-us.net/o1/vault/gdc2012/slides/Programming Track... · Step 4.3: Evaluate Low Moves Iterate all areas Area within height of 0.4x player](https://reader035.vdocuments.net/reader035/viewer/2022071001/5fbd50a9415a36626334e5b3/html5/thumbnails/24.jpg)
Step 4: Detect Slide
4.1: Player checks
4.2: Nav mesh query
4.3: Evaluate low moves
![Page 25: BUILING BRINK’S SMART SYSTMtwvideo01.ubm-us.net/o1/vault/gdc2012/slides/Programming Track... · Step 4.3: Evaluate Low Moves Iterate all areas Area within height of 0.4x player](https://reader035.vdocuments.net/reader035/viewer/2022071001/5fbd50a9415a36626334e5b3/html5/thumbnails/25.jpg)
Step 4.3: Evaluate Low Moves
Iterate all areas Area within height of 0.4x player height Area marked as low ceiling Auto crouch: distance < small number Auto slide: distance within 1.5x player b-
box width Mutual exclusion
– Allow auto slide if sprint held – Otherwise: Allow auto crouch
![Page 26: BUILING BRINK’S SMART SYSTMtwvideo01.ubm-us.net/o1/vault/gdc2012/slides/Programming Track... · Step 4.3: Evaluate Low Moves Iterate all areas Area within height of 0.4x player](https://reader035.vdocuments.net/reader035/viewer/2022071001/5fbd50a9415a36626334e5b3/html5/thumbnails/26.jpg)
Step 5: Choose Active Move
![Page 27: BUILING BRINK’S SMART SYSTMtwvideo01.ubm-us.net/o1/vault/gdc2012/slides/Programming Track... · Step 4.3: Evaluate Low Moves Iterate all areas Area within height of 0.4x player](https://reader035.vdocuments.net/reader035/viewer/2022071001/5fbd50a9415a36626334e5b3/html5/thumbnails/27.jpg)
Runtime Execution
![Page 28: BUILING BRINK’S SMART SYSTMtwvideo01.ubm-us.net/o1/vault/gdc2012/slides/Programming Track... · Step 4.3: Evaluate Low Moves Iterate all areas Area within height of 0.4x player](https://reader035.vdocuments.net/reader035/viewer/2022071001/5fbd50a9415a36626334e5b3/html5/thumbnails/28.jpg)
Vault Physics States
Intro and exit states Intro
– Duration: Distance and player velocity – Spline from player position to ledge
Exit – Calculates momentum – Calculates direction – Clear momentum if drop too high
(trace)
Intro Exit
![Page 29: BUILING BRINK’S SMART SYSTMtwvideo01.ubm-us.net/o1/vault/gdc2012/slides/Programming Track... · Step 4.3: Evaluate Low Moves Iterate all areas Area within height of 0.4x player](https://reader035.vdocuments.net/reader035/viewer/2022071001/5fbd50a9415a36626334e5b3/html5/thumbnails/29.jpg)
Mantle Physics States
Intro, climb and exit states Spline calculation same as vault Intro
– Duration calculation same as vault – Push player to correct position
Climb – Duration scaled up during climb – Pulls the player on top of ledge
Exit - Clear momentum
Intro Climb Exit
![Page 30: BUILING BRINK’S SMART SYSTMtwvideo01.ubm-us.net/o1/vault/gdc2012/slides/Programming Track... · Step 4.3: Evaluate Low Moves Iterate all areas Area within height of 0.4x player](https://reader035.vdocuments.net/reader035/viewer/2022071001/5fbd50a9415a36626334e5b3/html5/thumbnails/30.jpg)
Slide & Wall Hop Physics States
Sliding – Force crouch
– Constant velocity in direction of travel for a second
Wall Hop – Single frame state
– Only light body type may wall hop
Wall Hop Slide
![Page 31: BUILING BRINK’S SMART SYSTMtwvideo01.ubm-us.net/o1/vault/gdc2012/slides/Programming Track... · Step 4.3: Evaluate Low Moves Iterate all areas Area within height of 0.4x player](https://reader035.vdocuments.net/reader035/viewer/2022071001/5fbd50a9415a36626334e5b3/html5/thumbnails/31.jpg)
Third Person Animations
Animations driven by physics state
Slide - Play slide animation
Vault - Intro plays vault animation
Mantle
– Intro plays grab animation
– Climb plays mantle animation as root motion
![Page 32: BUILING BRINK’S SMART SYSTMtwvideo01.ubm-us.net/o1/vault/gdc2012/slides/Programming Track... · Step 4.3: Evaluate Low Moves Iterate all areas Area within height of 0.4x player](https://reader035.vdocuments.net/reader035/viewer/2022071001/5fbd50a9415a36626334e5b3/html5/thumbnails/32.jpg)
Third Person Animations
Animations driven by physics state
Slide - Play slide animation
Vault - Intro plays vault animation
Mantle
– Intro plays grab animation
– Climb plays mantle animation as root motion
![Page 33: BUILING BRINK’S SMART SYSTMtwvideo01.ubm-us.net/o1/vault/gdc2012/slides/Programming Track... · Step 4.3: Evaluate Low Moves Iterate all areas Area within height of 0.4x player](https://reader035.vdocuments.net/reader035/viewer/2022071001/5fbd50a9415a36626334e5b3/html5/thumbnails/33.jpg)
![Page 34: BUILING BRINK’S SMART SYSTMtwvideo01.ubm-us.net/o1/vault/gdc2012/slides/Programming Track... · Step 4.3: Evaluate Low Moves Iterate all areas Area within height of 0.4x player](https://reader035.vdocuments.net/reader035/viewer/2022071001/5fbd50a9415a36626334e5b3/html5/thumbnails/34.jpg)
Conclusions
More fluid movement
SMART Button
Generated during map-compile step
Free flow restricted by body types
![Page 35: BUILING BRINK’S SMART SYSTMtwvideo01.ubm-us.net/o1/vault/gdc2012/slides/Programming Track... · Step 4.3: Evaluate Low Moves Iterate all areas Area within height of 0.4x player](https://reader035.vdocuments.net/reader035/viewer/2022071001/5fbd50a9415a36626334e5b3/html5/thumbnails/35.jpg)
Lessons Learned
Prototyping allows quick iterations
Systems can successfully be used beyond their original intention
Could give client authority over physics
Consolidating physics states saves network bandwidth
![Page 37: BUILING BRINK’S SMART SYSTMtwvideo01.ubm-us.net/o1/vault/gdc2012/slides/Programming Track... · Step 4.3: Evaluate Low Moves Iterate all areas Area within height of 0.4x player](https://reader035.vdocuments.net/reader035/viewer/2022071001/5fbd50a9415a36626334e5b3/html5/thumbnails/37.jpg)
Questions?