158
Concurrent Interactions in The Sims 4 Peter Ingebretson Max Rebuschatis Software Engineers @ Maxis / Electronic Arts

Concurrent Interactions in Sims4 by Peter Ingebretson

Embed Size (px)

DESCRIPTION

This slide was presented at GDC 2014 by Peter Ingebretson who is a game developer working at EA.

Citation preview

Page 1: Concurrent Interactions in Sims4 by Peter Ingebretson

Concurrent Interactions inThe Sims 4

Peter IngebretsonMax Rebuschatis

Software Engineers @ Maxis / Electronic Arts

Page 2: Concurrent Interactions in Sims4 by Peter Ingebretson
Page 3: Concurrent Interactions in Sims4 by Peter Ingebretson

Outline

Page 4: Concurrent Interactions in Sims4 by Peter Ingebretson

● Interactions

Outline

Page 5: Concurrent Interactions in Sims4 by Peter Ingebretson

● Interactions● Constraints

Outline

Page 6: Concurrent Interactions in Sims4 by Peter Ingebretson

● Interactions● Constraints● Interaction Queue

Outline

Page 7: Concurrent Interactions in Sims4 by Peter Ingebretson

● Interactions● Constraints● Interaction Queue● Transitions

Outline

Page 8: Concurrent Interactions in Sims4 by Peter Ingebretson

● Interactions● Constraints● Interaction Queue● Transitions● Socials

Outline

Page 9: Concurrent Interactions in Sims4 by Peter Ingebretson

● Interactions● Constraints● Interaction Queue● Transitions● Socials● Q&A

Outline

Page 10: Concurrent Interactions in Sims4 by Peter Ingebretson

Interactions

Page 11: Concurrent Interactions in Sims4 by Peter Ingebretson

● The world is built using game objects

The Sims Architecture

Page 12: Concurrent Interactions in Sims4 by Peter Ingebretson

● The world is built using game objects● Game objects provide interactions

– Sims are objects too!

The Sims Architecture

Page 13: Concurrent Interactions in Sims4 by Peter Ingebretson

● The world is built using game objects● Game objects provide interactions

– Sims are objects too!

● Sims run interactions– Interactions are fundamental unit of

behavior

The Sims Architecture

Page 14: Concurrent Interactions in Sims4 by Peter Ingebretson

● Natural– People do multiple things at the same time

Multitasking

Page 15: Concurrent Interactions in Sims4 by Peter Ingebretson

● Natural– People do multiple things at the same time

● Frequently requested feature

Multitasking

Page 16: Concurrent Interactions in Sims4 by Peter Ingebretson

● Natural– People do multiple things at the same time

● Frequently requested feature● Systematic approach is valuable

– Ad hoc implementation is lots of work, inconsistent results

Multitasking

Page 17: Concurrent Interactions in Sims4 by Peter Ingebretson

● No true concurrent execution– This is a hard problem

– Deadlock, race conditions, etc...

Concurrency vs Multitasking

Page 18: Concurrent Interactions in Sims4 by Peter Ingebretson

● No true concurrent execution– This is a hard problem

– Deadlock, race conditions, etc...

● Multitasking– Context switching

– Cooperative

Concurrency vs Multitasking

Page 19: Concurrent Interactions in Sims4 by Peter Ingebretson

GrabDrink

GrabDrink SitSit Sip

Drink

SipDrink ...

MultitaskingTurn

on TV

Turnon TV YawnYawn Channel

Surf

ChannelSurf

SipDrink

SipDrink

DiscardDrink

DiscardDrink LaughLaugh Turn

off TV

Turnoff TV

ReadBook

ReadBook

Page 20: Concurrent Interactions in Sims4 by Peter Ingebretson
Page 21: Concurrent Interactions in Sims4 by Peter Ingebretson
Page 22: Concurrent Interactions in Sims4 by Peter Ingebretson

GrabDrink

GrabDrink SitSit Sip

Drink

SipDrink ...

MultitaskingTurn

on TV

Turnon TV YawnYawn Channel

Surf

ChannelSurf

SipDrink

SipDrink

DiscardDrink

DiscardDrink LaughLaugh Turn

off TV

Turnoff TV

ReadBook

ReadBook

Page 23: Concurrent Interactions in Sims4 by Peter Ingebretson

Turnon TV

Turnon TV

GrabDrink

GrabDrink

DiscardDrink

DiscardDrink

SitSit ......

SipDrink

Turnoff TV

Turnoff TV

ChannelSurf

SipDrink

Yawn

Laugh

ReadBook

ReadBook ......

Multitasking

Page 24: Concurrent Interactions in Sims4 by Peter Ingebretson

Turnon TV

Turnon TV

GrabDrink

GrabDrink

DiscardDrink

DiscardDrink

SitSit ......

SipDrink

Turnoff TV

Turnoff TV

ChannelSurf

SipDrink

Yawn

Laugh

ReadBook

ReadBook ......

InteractionsWatch TV Interaction

Sub ActionsBegin End

Page 25: Concurrent Interactions in Sims4 by Peter Ingebretson

● Each Sim has– A set of active interactions– An ordered queue of pending interactions

Running Interactions

Page 26: Concurrent Interactions in Sims4 by Peter Ingebretson

● Each Sim has– A set of active interactions– An ordered queue of pending interactions

● Sub-actions run “inside” active interactions

Running Interactions

Page 27: Concurrent Interactions in Sims4 by Peter Ingebretson

● Compatible with all running interactions

Sub Actions

Page 28: Concurrent Interactions in Sims4 by Peter Ingebretson

● Compatible with all running interactions● Selected using weighted random

Sub Actions

Page 29: Concurrent Interactions in Sims4 by Peter Ingebretson

● Compatible with all running interactions● Selected using weighted random● Can be limited with additional tests

Sub Actions

Page 30: Concurrent Interactions in Sims4 by Peter Ingebretson

Constraints

Page 31: Concurrent Interactions in Sims4 by Peter Ingebretson

● Can I perform an action?

Rules

Page 32: Concurrent Interactions in Sims4 by Peter Ingebretson

● Can I perform an action?¬Condition → ¬Action

Rules

Page 33: Concurrent Interactions in Sims4 by Peter Ingebretson

● Can I perform an action?¬Condition → ¬Action

● How do I perform an action?

Rules

Page 34: Concurrent Interactions in Sims4 by Peter Ingebretson

● Can I perform an action?¬Condition → ¬Action

● How do I perform an action? Action → Condition

Rules

Page 35: Concurrent Interactions in Sims4 by Peter Ingebretson

● Can I perform an action?¬Condition → ¬Action

● How do I perform an action? Action → Condition

● Avoids duplicated logic

Rules

Page 36: Concurrent Interactions in Sims4 by Peter Ingebretson

● Data-driven rules

Constraints

Page 37: Concurrent Interactions in Sims4 by Peter Ingebretson

● Data-driven rules● Preconditions on running an interaction

Constraints

Page 38: Concurrent Interactions in Sims4 by Peter Ingebretson

● Data-driven rules● Preconditions on running an interaction● Answer the questions

– Can I run an interaction?– How do I run an interaction?

Constraints

Page 39: Concurrent Interactions in Sims4 by Peter Ingebretson

Position

Page 40: Concurrent Interactions in Sims4 by Peter Ingebretson

Orientation

Page 41: Concurrent Interactions in Sims4 by Peter Ingebretson

AnimationSlot

Page 42: Concurrent Interactions in Sims4 by Peter Ingebretson

Posture

Page 43: Concurrent Interactions in Sims4 by Peter Ingebretson

PostureExamples

Page 44: Concurrent Interactions in Sims4 by Peter Ingebretson

PostureExamples

Page 45: Concurrent Interactions in Sims4 by Peter Ingebretson

CarryingDoesn't needhands

Page 46: Concurrent Interactions in Sims4 by Peter Ingebretson

CarryingObject in hand

Page 47: Concurrent Interactions in Sims4 by Peter Ingebretson

CarryingNeeds hands

Page 48: Concurrent Interactions in Sims4 by Peter Ingebretson

SurfacesObject onSurface

Page 49: Concurrent Interactions in Sims4 by Peter Ingebretson

SurfacesEmpty surface

Page 50: Concurrent Interactions in Sims4 by Peter Ingebretson

Line ofSight

Page 51: Concurrent Interactions in Sims4 by Peter Ingebretson

ScoringFunctions

Page 52: Concurrent Interactions in Sims4 by Peter Ingebretson

● Data driven– Animation: Position, posture, carry– XML Tuning: Geometry, orientation,

surface– Script: Scoring function, line-of-sight

Constraint Authoring

Page 53: Concurrent Interactions in Sims4 by Peter Ingebretson

● Multitasking combines constraints

Constraint Combination

Page 54: Concurrent Interactions in Sims4 by Peter Ingebretson

● Multitasking combines constraints● Supported operations

– Intersection– Union

Constraint Combination

Page 55: Concurrent Interactions in Sims4 by Peter Ingebretson
Page 56: Concurrent Interactions in Sims4 by Peter Ingebretson
Page 57: Concurrent Interactions in Sims4 by Peter Ingebretson

Q: Are interactions compatible?

Interaction Compatibility

Page 58: Concurrent Interactions in Sims4 by Peter Ingebretson

Q: Are interactions compatible?A: Yes, if the intersection of their constraints is non-empty

Interaction Compatibility

Page 59: Concurrent Interactions in Sims4 by Peter Ingebretson
Page 60: Concurrent Interactions in Sims4 by Peter Ingebretson
Page 61: Concurrent Interactions in Sims4 by Peter Ingebretson

Interaction Queue

Page 62: Concurrent Interactions in Sims4 by Peter Ingebretson

● Each Sim has– A set of active interactions– An ordered queue of pending interactions

Interaction Queue

Page 63: Concurrent Interactions in Sims4 by Peter Ingebretson

● Each Sim has– A set of active interactions– An ordered queue of pending interactions

● Interactions have priority– High (User directed)– Low (Autonomous)– Idle (Finished but still running)

Interaction Queue

Page 64: Concurrent Interactions in Sims4 by Peter Ingebretson

Queue Processing

Can NextInteraction

Run?

Can NextInteraction

Run?

Page 65: Concurrent Interactions in Sims4 by Peter Ingebretson

Queue Processing

Can NextInteraction

Run?

Can NextInteraction

Run?

Wait in QueueWait in Queue

No

Page 66: Concurrent Interactions in Sims4 by Peter Ingebretson

Queue Processing

Can NextInteraction

Run?

Can NextInteraction

Run?

Wait in QueueWait in Queue

No

Yes

CancelIncompatible

ActiveInteractions

CancelIncompatible

ActiveInteractions

Page 67: Concurrent Interactions in Sims4 by Peter Ingebretson

Queue Processing

Can NextInteraction

Run?

Can NextInteraction

Run?

Wait in QueueWait in Queue

No

Yes

CancelIncompatible

ActiveInteractions

CancelIncompatible

ActiveInteractions

Start RunningStart Running

Page 68: Concurrent Interactions in Sims4 by Peter Ingebretson

Turnon TV

Turnon TV

GrabDrink

GrabDrink

DiscardDrink

DiscardDrink

SitSit ......

SipDrink

Turnoff TV

Turnoff TV

ChannelSurf

SipDrink

Yawn

Laugh

ReadBook

ReadBook ......

Interaction Processing Example

Page 69: Concurrent Interactions in Sims4 by Peter Ingebretson

Don'tCare

Next interaction

Active Interactions

Queued Interactions

WatchTV

WatchTVDrinkDrink SitSit Read

Book

ReadBook

Interaction Processing Example

Where How Hands

AnythingAnywhere

Page 70: Concurrent Interactions in Sims4 by Peter Ingebretson

Don'tCare

Next interaction

Active Interactions

Queued Interactions

WatchTV

WatchTV

DrinkDrink

SitSit ReadBook

ReadBook

Interaction Processing Example

Where How Hands

AnythingAnywhere

Page 71: Concurrent Interactions in Sims4 by Peter Ingebretson

Next interaction

Active Interactions

Queued Interactions

WatchTV

WatchTV

DrinkDrink

SitSit ReadBook

ReadBook

Interaction Processing Example

Where

Don'tCare

HoldingDrink

How Hands

AnythingAnywhere

Anywhere Anything

Page 72: Concurrent Interactions in Sims4 by Peter Ingebretson

Next interaction

Active Interactions

Queued Interactions

WatchTV

WatchTV

DrinkDrink

SitSit ReadBook

ReadBook

Interaction Processing Example

Where

Don'tCare

How Hands

AnythingAnywhere

Anywhere

Page 73: Concurrent Interactions in Sims4 by Peter Ingebretson

Next interaction

Active Interactions

Queued Interactions

WatchTV

WatchTV

DrinkDrink

SitSit ReadBook

ReadBook

Interaction Processing Example

Where

Don'tCare

How Hands

AnythingAnywhere

Anywhere

Page 74: Concurrent Interactions in Sims4 by Peter Ingebretson

Next interaction

Active Interactions

Queued Interactions

WatchTV

WatchTV

DrinkDrink

SitSit ReadBook

ReadBook

Interaction Processing Example

Where

Don'tCare

How Hands

AnythingAnywhere

AnywhereSit orStand

Page 75: Concurrent Interactions in Sims4 by Peter Ingebretson

Next interaction

Active Interactions

Queued Interactions

WatchTV

WatchTV

DrinkDrink

SitSit ReadBook

ReadBook

Interaction Processing Example

Where

Don'tCare

How Hands

AnythingAnywhere

AnywhereSit orStand

Page 76: Concurrent Interactions in Sims4 by Peter Ingebretson

Next interaction

Active Interactions

Queued Interactions

WatchTV

WatchTV

DrinkDrink

SitSit ReadBook

ReadBook

Interaction Processing Example

Where

Don'tCare

HoldDrink

How Hands

AnythingAnywhere

AnywhereSit orStand

Page 77: Concurrent Interactions in Sims4 by Peter Ingebretson

Next interaction

Active Interactions

Queued Interactions

WatchTV

WatchTV

DrinkDrink

SitSit ReadBook

ReadBook

Interaction Processing Example

Where

Don'tCare

HoldDrink

How Hands

AnythingAnywhere

AnywhereSit orStand

Page 78: Concurrent Interactions in Sims4 by Peter Ingebretson

Next interaction

Active Interactions

Queued Interactions

WatchTV

WatchTV

DrinkDrink

SitSit ReadBook

ReadBook

Interaction Processing Example

Where

HoldDrink

How Hands

Sit orStand

Anywhere

Page 79: Concurrent Interactions in Sims4 by Peter Ingebretson

Next interaction

Active Interactions

Queued Interactions

WatchTV

WatchTV

DrinkDrink

SitSit

ReadBook

ReadBook

Interaction Processing Example

Where

HoldDrink

How Hands

Sit orStand

Anywhere

Page 80: Concurrent Interactions in Sims4 by Peter Ingebretson

Next interaction

Active Interactions

Queued Interactions

WatchTV

WatchTV

DrinkDrink

SitSit

ReadBook

ReadBook

Interaction Processing Example

Where

HoldDrink

How Hands

Sit orStand

Anywhere

Page 81: Concurrent Interactions in Sims4 by Peter Ingebretson

Next interaction

Active Interactions

Queued Interactions

WatchTV

WatchTV

DrinkDrink

SitSit

ReadBook

ReadBook

Interaction Processing Example

Where

HoldDrink

How Hands

Sit orStand

Anywhere

On Seat

Page 82: Concurrent Interactions in Sims4 by Peter Ingebretson

Next interaction

Active Interactions

Queued Interactions

WatchTV

WatchTV

DrinkDrink

SitSit

ReadBook

ReadBook

Interaction Processing Example

Where

HoldDrink

How Hands

Sit orStand

Anywhere

On Seat

Page 83: Concurrent Interactions in Sims4 by Peter Ingebretson

Next interaction

Active Interactions

Queued Interactions

WatchTV

WatchTV

DrinkDrink

SitSit

ReadBook

ReadBook

Interaction Processing Example

Where

HoldDrink

How Hands

Sit orStand

Anywhere

On Seat Sit

Page 84: Concurrent Interactions in Sims4 by Peter Ingebretson

Next interaction

Active Interactions

Queued Interactions

WatchTV

WatchTV

DrinkDrink

SitSit

ReadBook

ReadBook

Interaction Processing Example

Where

HoldDrink

How Hands

Sit orStand

Anywhere

On Seat Sit

Page 85: Concurrent Interactions in Sims4 by Peter Ingebretson

Next interaction

Active Interactions

Queued Interactions

WatchTV

WatchTV

DrinkDrink

SitSit

ReadBook

ReadBook

Interaction Processing Example

Where

HoldDrink

Don'tCare

How Hands

Sit orStand

Anywhere

On Seat Sit

Page 86: Concurrent Interactions in Sims4 by Peter Ingebretson

Next interaction

Active Interactions

Queued Interactions

WatchTV

WatchTV

DrinkDrink

SitSit

ReadBook

ReadBook

Interaction Processing Example

Where

HoldDrink

Don'tCare

How Hands

Sit orStand

Anywhere

On Seat Sit

Page 87: Concurrent Interactions in Sims4 by Peter Ingebretson

Next interaction

Active Interactions

Queued Interactions

WatchTV

WatchTV

DrinkDrink

SitSit

ReadBook

ReadBook

Interaction Processing Example

Where

HoldDrink

Don'tCare

How Hands

Sit orStand

Anywhere

On Seat Sit

Page 88: Concurrent Interactions in Sims4 by Peter Ingebretson

Next interaction

Active Interactions

Queued Interactions

WatchTV

WatchTV

DrinkDrinkSitSit

ReadBook

ReadBook

Interaction Processing Example

Where

HoldDrink

How Hands

SitOn Seat

Page 89: Concurrent Interactions in Sims4 by Peter Ingebretson

Next interaction

Active Interactions

Queued Interactions

WatchTV

WatchTV

DrinkDrinkSitSit

ReadBook

ReadBook

Interaction Processing Example

Where

HoldDrink

How Hands

SitOn Seat

Page 90: Concurrent Interactions in Sims4 by Peter Ingebretson

Next interaction

Active Interactions

Queued Interactions

WatchTV

WatchTV

DrinkDrinkSitSit

ReadBook

ReadBook

Interaction Processing Example

Where

HoldDrink

How Hands

SitOn Seat

Page 91: Concurrent Interactions in Sims4 by Peter Ingebretson

Next interaction

Active Interactions

Queued Interactions

WatchTV

WatchTV

DrinkDrinkSitSit

ReadBook

ReadBook

Interaction Processing Example

Where

HoldDrink

How Hands

SitOn Seat

In view,Facing

Page 92: Concurrent Interactions in Sims4 by Peter Ingebretson

Next interaction

Active Interactions

Queued Interactions

WatchTV

WatchTV

DrinkDrinkSitSit

ReadBook

ReadBook

Interaction Processing Example

Where

HoldDrink

How Hands

SitOn Seat

In view,Facing

Page 93: Concurrent Interactions in Sims4 by Peter Ingebretson

Next interaction

Active Interactions

Queued Interactions

WatchTV

WatchTV

DrinkDrinkSitSit

ReadBook

ReadBook

Interaction Processing Example

Where

HoldDrink

How Hands

SitOn Seat

In view,Facing

Sit orStand

Page 94: Concurrent Interactions in Sims4 by Peter Ingebretson

Next interaction

Active Interactions

Queued Interactions

WatchTV

WatchTV

DrinkDrinkSitSit

ReadBook

ReadBook

Interaction Processing Example

Where

HoldDrink

How Hands

SitOn Seat

In view,Facing

Sit orStand

Page 95: Concurrent Interactions in Sims4 by Peter Ingebretson

Next interaction

Active Interactions

Queued Interactions

WatchTV

WatchTV

DrinkDrinkSitSit

ReadBook

ReadBook

Interaction Processing Example

Where

HoldDrink

Don'tCare

How Hands

SitOn Seat

In view,Facing

Sit orStand

Page 96: Concurrent Interactions in Sims4 by Peter Ingebretson

Next interaction

Active Interactions

Queued Interactions

WatchTV

WatchTV

DrinkDrinkSitSit

ReadBook

ReadBook

Interaction Processing Example

Where

HoldDrink

Don'tCare

How Hands

SitOn Seat

In view,Facing

Sit orStand

Page 97: Concurrent Interactions in Sims4 by Peter Ingebretson

Next interaction

Active Interactions

Queued Interactions

WatchTV

WatchTV

DrinkDrinkSitSit

ReadBook

ReadBook

Interaction Processing Example

Where

HoldDrink

Don'tCare

How Hands

SitOn Seat

In view,Facing

Sit orStand

Page 98: Concurrent Interactions in Sims4 by Peter Ingebretson

Next interaction

Active Interactions

Queued Interactions

WatchTV

WatchTV DrinkDrinkSitSit

ReadBook

ReadBook

Interaction Processing Example

Where

HoldDrink

How Hands

SitOn Seat

Page 99: Concurrent Interactions in Sims4 by Peter Ingebretson

Next interaction

Active Interactions

Queued Interactions

WatchTV

WatchTV DrinkDrinkSitSit

ReadBook

ReadBook

Interaction Processing Example

Where

HoldDrink

How Hands

SitOn Seat

Page 100: Concurrent Interactions in Sims4 by Peter Ingebretson

Next interaction

Active Interactions

Queued Interactions

WatchTV

WatchTV DrinkDrinkSitSit

ReadBook

ReadBook

Interaction Processing Example

Where

HoldDrink

How Hands

SitOn Seat

Anywhere

Page 101: Concurrent Interactions in Sims4 by Peter Ingebretson

Next interaction

Active Interactions

Queued Interactions

WatchTV

WatchTV DrinkDrinkSitSit

ReadBook

ReadBook

Interaction Processing Example

Where

HoldDrink

How Hands

SitOn Seat

Anywhere

Page 102: Concurrent Interactions in Sims4 by Peter Ingebretson

Next interaction

Active Interactions

Queued Interactions

WatchTV

WatchTV DrinkDrinkSitSit

ReadBook

ReadBook

Interaction Processing Example

Where

HoldDrink

How Hands

SitOn Seat

Anywhere Sit or Stand,Not TV

Page 103: Concurrent Interactions in Sims4 by Peter Ingebretson

Next interaction

Active Interactions

Queued Interactions

WatchTV

WatchTV DrinkDrinkSitSit

ReadBook

ReadBook

Interaction Processing Example

Where

HoldDrink

How Hands

SitOn Seat

Anywhere Sit or Stand,Not TV

Page 104: Concurrent Interactions in Sims4 by Peter Ingebretson

Next interaction

Active Interactions

Queued Interactions

WatchTV

WatchTV DrinkDrinkSitSit

ReadBook

ReadBook

Interaction Processing Example

Where

HoldDrink

BothHands

How Hands

SitOn Seat

Anywhere Sit or Stand,Not TV

Page 105: Concurrent Interactions in Sims4 by Peter Ingebretson

Next interaction

Active Interactions

Queued Interactions

WatchTV

WatchTV DrinkDrinkSitSit

ReadBook

ReadBook

Interaction Processing Example

Where

HoldDrink

BothHands

How Hands

SitOn Seat

Anywhere Sit or Stand,Not TV

Page 106: Concurrent Interactions in Sims4 by Peter Ingebretson

Next interaction

Active Interactions

Queued Interactions

WatchTV

WatchTV DrinkDrinkSitSit

ReadBook

ReadBook

Interaction Processing Example

Where

HoldDrink

BothHands

How Hands

SitOn Seat

Anywhere Sit or Stand,Not TV

Page 107: Concurrent Interactions in Sims4 by Peter Ingebretson

Next interaction

Active Interactions

Queued Interactions

WatchTV

WatchTV SitSit

ReadBook

ReadBook

Interaction Processing Example

Where

Don'tCare

BothHands

How Hands

SitOn Seat

Anywhere Sit or Stand,Not TV

Page 108: Concurrent Interactions in Sims4 by Peter Ingebretson

Next interaction

Active Interactions

Queued Interactions

WatchTV

WatchTV SitSit

ReadBook

ReadBook

Interaction Processing Example

Where

Don'tCare

BothHands

How Hands

SitOn Seat

Anywhere Sit or Stand,Not TV

Page 109: Concurrent Interactions in Sims4 by Peter Ingebretson

Next interaction

Active Interactions

Queued Interactions

WatchTV

WatchTV SitSit

ReadBook

ReadBook

Interaction Processing Example

Where

Don'tCare

BothHands

How Hands

SitOn Seat

Anywhere Sit or Stand,Not TV

Page 110: Concurrent Interactions in Sims4 by Peter Ingebretson

Next interaction

Active Interactions

Queued Interactions

SitSit

ReadBook

ReadBook

Interaction Processing Example

Where

Don'tCare

BothHands

How Hands

SitOn Seat

Anywhere Sit or Stand,Not TV

Page 111: Concurrent Interactions in Sims4 by Peter Ingebretson

Next interaction

Active Interactions

Queued Interactions

SitSit

ReadBook

ReadBook

Interaction Processing Example

Where

Don'tCare

BothHands

How Hands

SitOn Seat

Anywhere Sit or Stand,Not TV

Page 112: Concurrent Interactions in Sims4 by Peter Ingebretson

Next interaction

Active Interactions

Queued Interactions

SitSitReadBook

ReadBook

Interaction Processing Example

Where

BothHands

How Hands

Sit,Not TV

On Seat

Page 113: Concurrent Interactions in Sims4 by Peter Ingebretson

Next interaction

Active Interactions

Queued Interactions

SitSitReadBook

ReadBook

Interaction Processing Example

Where

BothHands

How Hands

Sit,Not TV

On Seat

Page 114: Concurrent Interactions in Sims4 by Peter Ingebretson
Page 115: Concurrent Interactions in Sims4 by Peter Ingebretson
Page 116: Concurrent Interactions in Sims4 by Peter Ingebretson

Transitions

Page 117: Concurrent Interactions in Sims4 by Peter Ingebretson

● Constraints define preconditions for performing an interaction

Generating Behavior

Page 118: Concurrent Interactions in Sims4 by Peter Ingebretson

● Constraints define preconditions for performing an interaction

● Can be used generatively

Generating Behavior

Page 119: Concurrent Interactions in Sims4 by Peter Ingebretson

● Constraints define preconditions for performing an interaction

● Can be used generatively● Requires ability to find transition to

constraint

Generating Behavior

Page 120: Concurrent Interactions in Sims4 by Peter Ingebretson

● The constraints on each object are stored in an abstract graph

Transition Graph

Page 121: Concurrent Interactions in Sims4 by Peter Ingebretson

● The constraints on each object are stored in an abstract graph

● Edges are state changes

Transition Graph

Page 122: Concurrent Interactions in Sims4 by Peter Ingebretson

● The constraints on each object are stored in an abstract graph

● Edges are state changes● Search graph to generate a transition

sequence

Transition Graph

Page 123: Concurrent Interactions in Sims4 by Peter Ingebretson
Page 124: Concurrent Interactions in Sims4 by Peter Ingebretson

Using theGraph

Stand near table,Carry Drink

Stand near table,Carry Drink

Page 125: Concurrent Interactions in Sims4 by Peter Ingebretson

Using theGraph

Stand near table,Carry Drink

Stand near table,Carry Drink

Stand near table,Drink on table

Stand near table,Drink on table

Page 126: Concurrent Interactions in Sims4 by Peter Ingebretson

Using theGraph

Stand near table,Carry Drink

Stand near table,Carry Drink

Sit at table,Drink on table

Sit at table,Drink on table

Stand near table,Drink on table

Stand near table,Drink on table

Page 127: Concurrent Interactions in Sims4 by Peter Ingebretson

● Multiple nodes can match requirements

Graph Searching

Page 128: Concurrent Interactions in Sims4 by Peter Ingebretson

● Multiple nodes can match requirements● Edges are weighted by cost

– Routes weighted by approximate distance

Graph Searching

Page 129: Concurrent Interactions in Sims4 by Peter Ingebretson

● Multiple nodes can match requirements● Edges are weighted by cost

– Routes weighted by approximate distance

● Search determines optimal path

Graph Searching

Page 130: Concurrent Interactions in Sims4 by Peter Ingebretson

ExampleCarry Transference

Page 131: Concurrent Interactions in Sims4 by Peter Ingebretson

ExampleCarry Transference

Page 132: Concurrent Interactions in Sims4 by Peter Ingebretson

● Bidirectional search

Search Optimizations

Page 133: Concurrent Interactions in Sims4 by Peter Ingebretson

● Bidirectional search● Simplifications

– Carry– Slot

Search Optimizations

Page 134: Concurrent Interactions in Sims4 by Peter Ingebretson

● Bidirectional search● Simplifications

– Carry– Slot

● Node query indexing

Search Optimizations

Page 135: Concurrent Interactions in Sims4 by Peter Ingebretson

Socials

Page 136: Concurrent Interactions in Sims4 by Peter Ingebretson

Socials

Page 137: Concurrent Interactions in Sims4 by Peter Ingebretson

Socials

Page 138: Concurrent Interactions in Sims4 by Peter Ingebretson

SocialsIntersected with TV constraint

Page 139: Concurrent Interactions in Sims4 by Peter Ingebretson

SocialsIntersected with TV constraint

Page 140: Concurrent Interactions in Sims4 by Peter Ingebretson

ConvexLOS

Page 141: Concurrent Interactions in Sims4 by Peter Ingebretson

SocialClustering

Page 142: Concurrent Interactions in Sims4 by Peter Ingebretson

SocialClustering

Page 143: Concurrent Interactions in Sims4 by Peter Ingebretson

● Building Features

Challenges – Complexity

Page 144: Concurrent Interactions in Sims4 by Peter Ingebretson

● Building Features– Less tolerance for ad-hoc implementation

Challenges – Complexity

Page 145: Concurrent Interactions in Sims4 by Peter Ingebretson

● Building Features– Less tolerance for ad-hoc implementation

– Must express features using constraints

Challenges – Complexity

Page 146: Concurrent Interactions in Sims4 by Peter Ingebretson

● Building Features– Less tolerance for ad-hoc implementation

– Must express features using constraints

● Authoring content

Challenges – Complexity

Page 147: Concurrent Interactions in Sims4 by Peter Ingebretson

● Building Features– Less tolerance for ad-hoc implementation

– Must express features using constraints

● Authoring content

● Complexity of data

Challenges – Complexity

Page 148: Concurrent Interactions in Sims4 by Peter Ingebretson

● Excessive multitasking

Challenges – Player Expectations

Page 149: Concurrent Interactions in Sims4 by Peter Ingebretson

● Excessive multitasking● Communicating compatibility

Challenges – Player Expectations

Page 150: Concurrent Interactions in Sims4 by Peter Ingebretson

● Excessive multitasking● Communicating compatibility● Uncanny valley

Challenges – Player Expectations

Page 151: Concurrent Interactions in Sims4 by Peter Ingebretson

● The best rules can be used both to restrict and to drive behavior

Takeaway

Page 152: Concurrent Interactions in Sims4 by Peter Ingebretson

● The best rules can be used both to restrict and to drive behavior

● Composable rules are necessary to support multitasking

Takeaway

Page 153: Concurrent Interactions in Sims4 by Peter Ingebretson

● The spatial relationship between objects is more important

Impact

Page 154: Concurrent Interactions in Sims4 by Peter Ingebretson

● The spatial relationship between objects is more important

● More diverse behavior with the same amount of content

Impact

Page 155: Concurrent Interactions in Sims4 by Peter Ingebretson

Peter Ingebretson ([email protected])Max Rebuschatis ([email protected])

Questions?

Page 156: Concurrent Interactions in Sims4 by Peter Ingebretson

Bonus Content!

Page 157: Concurrent Interactions in Sims4 by Peter Ingebretson

Holstering

Page 158: Concurrent Interactions in Sims4 by Peter Ingebretson

Holstering