Presentation is loading. Please wait.

Presentation is loading. Please wait.

Artificial Intelligence in Game Design Smart Terrain.

Similar presentations


Presentation on theme: "Artificial Intelligence in Game Design Smart Terrain."— Presentation transcript:

1 Artificial Intelligence in Game Design Smart Terrain

2 Objects in world meet needs of characters Characters should be influenced to move towards those objects Choice of objects should be influenced by: –Type and degree of needs –Location of objects –Degree to which they meet needs HungerRefrigerator, Microwave, Cookie Jar EnergyBed, Sofa, Chair FunComputer, Bookshelf

3 Objects and Influences Objects have an area of influence –Radius in which they influence character to move towards them Character with energy need in influence radius of bed Should move towards bed to meet need

4 Radius of Influence Radius of influence depends on the “strength” of the object –Degree to which it meets needs of character –Character should move to things that better meet needs BedEnergy – 10 SofaEnergy – 5 ChairEnergy – 1 Only sleep in chair if actually in chair!

5 Influences and Distances Influence of objects lessens with distance –Idea: “More effort” required to reach object –Usually linear dropoff influence = strength - distance 02468246810

6 Influences and Distances Basic idea: Move towards object with greatest influence –Also based on current needs Bed has greater influence, so move towards it Note that never sleep in chair, since bed always has greater influence!

7 Map Flooding Map Flooding used to determine influence at each location –Moves around walls, not through them 3456765 4767876 15678987 12167891098 2345676543 1234565432 123454321 1234321 12321 121

8 Movement and Smart Terrain Sim moves to tile that has largest value for that need –No need for any complex path algorithms! 3456765 4767876 15678987 12167891098 2345676543 1234565432 123454321 1234321 12321 121

9 Combined Influences Influence at tile is maximum of influences from objects –Sim moves towards object with strongest influence 3456765 4767876 15678987 12167891098 2345676543 2234565432 3223454321 432234321 54322321 4323221

10 Meeting Multiple Needs What if influences from multiple needs? –Energy = 10, 8 units from bed –Hunger = 5, 4 units from refrigerator Have separate tile value for each need Move in direction of greatest value of greatest need –Not bad idea, since movement does not require a lot of time –Can also use discomfort level for actions that take longer 3456765 4767876 15678987 12167891098 2345676541413232 1234565414132322323 123454141323223231414 12341413232232314145 1212132322323141467 1121223231414578

11 Multi-Step Actions Each part of plan requires an object Example: Cooking and eating food 1. Get uncooked food 2. Cook food 3. Eat food Overall scripted plan to meet “hungry” need microwave meets need refrigerator meets need table meets need

12 Multi-Step Actions “Get uncooked food” need 123 1234 12345 123456 1234567 12345678

13 Multi-Step Actions “Cook uncooked food” need 1 121 1234567 12345678 1234567 123456 12345 1234

14 Multi-Step Actions “Eat food” need 1 121 2321 134321 123454321 2345654321 3456765432 4567876543 5678987654 67891098765

15 Multi-Step Actions Potential problem: Plans may be interrupted if other needs become greater Example: Hungry = 5 Social = 10 –No objects meet “social” need, so start plan to meet “hungry” need Get food Cook food –Friend comes to door Meets “social” need, so move towards friend Abandon plan to eat!


Download ppt "Artificial Intelligence in Game Design Smart Terrain."

Similar presentations


Ads by Google