ai and fundamental game technologiesin final fantasy xv

48
© 2017 SQUARE ENIX CO.,LTD. All Rights Reserved. YOUICHIRO MIYAKE, SQUARE ENIX CO., LTD. ISAMU HASEGAWA, SQUARE ENIX CO., LTD. AI AND FUNDAMENTAL GAME TECHNOLOGIES IN FINAL FANTASY XV

Upload: rakuten-inc

Post on 21-Jan-2018

90 views

Category:

Technology


6 download

TRANSCRIPT

Page 1: AI AND FUNDAMENTAL GAME TECHNOLOGIESIN FINAL FANTASY XV

© 2017 SQUARE ENIX CO.,LTD. All Rights Reserved.

YOUICHIRO MIYAKE, SQUARE ENIX CO., LTD.

ISAMU HASEGAWA, SQUARE ENIX CO., LTD.

AI AND FUNDAMENTAL GAME TECHNOLOGIES

IN FINAL FANTASY XV

Page 2: AI AND FUNDAMENTAL GAME TECHNOLOGIESIN FINAL FANTASY XV

© 2017 SQUARE ENIX CO.,LTD. All Rights Reserved.

AGENDA

• Our studio and products.

• Visual Script

– What is visual script?

– Advantages

– Best practices

• AI in FINAL FANTASY XV

Page 3: AI AND FUNDAMENTAL GAME TECHNOLOGIESIN FINAL FANTASY XV

© 2017 SQUARE ENIX CO.,LTD. All Rights Reserved.

© 2017 SQUARE ENIX CO.,LTD. All Rights Reserved.

Page 4: AI AND FUNDAMENTAL GAME TECHNOLOGIESIN FINAL FANTASY XV

© 2017 SQUARE ENIX CO.,LTD. All Rights Reserved.

• The majority of the members are Japanese.

• But some of them are from:

China, India, Korea, Malaysia, Thailand, etc. (in alphabetical order)

• Globalized product development

MULTINATIONAL

Page 5: AI AND FUNDAMENTAL GAME TECHNOLOGIESIN FINAL FANTASY XV

© 2017 SQUARE ENIX CO.,LTD. All Rights Reserved.

CG TECHNOLOGY

• Develop both of pre-rendering movies, and real-time games.

– SIGGRAPH 2016 Electronic Theater

“The Universe of FINAL FANTASY XV”

– SIGGRAPH 2016 Real-Time Live!

“Real-time technologies of FINAL FANTASY XV battles”

– Bidirectional technical cooperation and asset sharing.

Pre-rendering ⇔ Real-time

Page 6: AI AND FUNDAMENTAL GAME TECHNOLOGIESIN FINAL FANTASY XV

© 2017 SQUARE ENIX CO.,LTD. All Rights Reserved.

ACADEMIC CONTRIBUTION

• SIGGRAPH 2017

– CG in Asia

– Production Art Gallery

– 1 Poster

– 2 Talk sessions (Character Art, and Snapshot system)

• SIGGRAPH 2016

– Electronic Theater

– Real-Time Live!

– 5 Talk sessions (AI/Animation, Env, CharModel, Rendering, VFX)

• GDC 2017

– “FINAL FANTASY XV: A Challenger Once Again”

– “How a Buddy-AI Auto-Snapshots Your Adventure in FFXV”

• CEDEC2017

– 3 Sessions (Working Mother, AI, Animation)

• CEDEC2016

– 5 Sessions (AI, UI, Backend, Optimization, CharEnv)

• Collaborations with Tokyo University of the Arts.

■ Art

■ Technology

Page 7: AI AND FUNDAMENTAL GAME TECHNOLOGIESIN FINAL FANTASY XV

© 2017 SQUARE ENIX CO.,LTD. All Rights Reserved.

WHAT IS VISUAL SCRIPT?

• Write logic by assembling visual elements.

– scratch (MIT Media Lab.): assembling blocks

– node graph based visual script: nodes and edges

• Advantages

– Readable

– Easy to develop

• Target / Purpose

– For education

– For non programmer

Page 8: AI AND FUNDAMENTAL GAME TECHNOLOGIESIN FINAL FANTASY XV

© 2017 SQUARE ENIX CO.,LTD. All Rights Reserved.

WHAT IS VISUAL SCRIPT? (CONTD.)

• Visual script

for education

– scratch

– Blockly

– Programin

(プログラミン)

Scratch is developed by the Lifelong Kindergarten Group at the MIT Media Lab. See http://scratch.mit.edu

Page 9: AI AND FUNDAMENTAL GAME TECHNOLOGIESIN FINAL FANTASY XV

© 2017 SQUARE ENIX CO.,LTD. All Rights Reserved.

NODE GRAPH BASED VISUAL SCRIPT

Node properties

Node

Pin: node in/output

Edge: control/data flow

Page 10: AI AND FUNDAMENTAL GAME TECHNOLOGIESIN FINAL FANTASY XV

© 2017 SQUARE ENIX CO.,LTD. All Rights Reserved.

ROUGH WORKFLOW

Concept Art

Artist

Modeler

Animator

Etc.

Programmer

Planner

Game Engine

Level Script Level Script

Level Script

Game

Assets(Model,…)

Page 11: AI AND FUNDAMENTAL GAME TECHNOLOGIESIN FINAL FANTASY XV

© 2017 SQUARE ENIX CO.,LTD. All Rights Reserved.

REQUIREMENTS FOR GAME DEV.

• Many non-programmers write many scripts.

• Many types of scripts cooperate.

• High affinity for native codes.

Page 12: AI AND FUNDAMENTAL GAME TECHNOLOGIESIN FINAL FANTASY XV

© 2017 SQUARE ENIX CO.,LTD. All Rights Reserved.

WHY VISUAL SCRIPTS IN GAME DEV.

Requirements

• Many non-programmers

write many scripts.

• Many types of scripts

cooperate.

• High affinity for native codes.

Characteristics of visual scripts

• Graphical

• Simple semantics

Advantages

• Low learning cost

• High productivity

?

Page 13: AI AND FUNDAMENTAL GAME TECHNOLOGIESIN FINAL FANTASY XV

© 2017 SQUARE ENIX CO.,LTD. All Rights Reserved.

COMPONENTIZATION IN VISUAL SCRIPT

Characteristics of visual scripts

• Graphical

• Simple semantics Easy to componentize

Page 14: AI AND FUNDAMENTAL GAME TECHNOLOGIESIN FINAL FANTASY XV

© 2017 SQUARE ENIX CO.,LTD. All Rights Reserved.

COMPONENTIZATION (CONTD.)

Can be a node graph of other type

Many types of scripts cooperate

Page 15: AI AND FUNDAMENTAL GAME TECHNOLOGIESIN FINAL FANTASY XV

© 2017 SQUARE ENIX CO.,LTD. All Rights Reserved.

COMPONENTIZATION (CONTD.)

Can be replaced with native code node implementation

High affinity for native codes

Page 16: AI AND FUNDAMENTAL GAME TECHNOLOGIESIN FINAL FANTASY XV

© 2017 SQUARE ENIX CO.,LTD. All Rights Reserved.

UNMAINTENANCABLE HUGE GRAPH

Page 17: AI AND FUNDAMENTAL GAME TECHNOLOGIESIN FINAL FANTASY XV

© 2017 SQUARE ENIX CO.,LTD. All Rights Reserved.

STANDARDIZATION (FOR UI DEV.)

• Ununiform skill

• Mass production

⇒ Standardization

Typical User Interface

– External Input Events

– State Machine

– UI Parts(Widget)

⇒ Standardize layout

Input Events

State

machine

Widgets

Page 18: AI AND FUNDAMENTAL GAME TECHNOLOGIESIN FINAL FANTASY XV

© 2017 SQUARE ENIX CO.,LTD. All Rights Reserved.

STRUCTURED PROGRAMMING

• Nodes: fundamental, generic

• Components: high-functioning (but not generic)

Write logic

with components

(not nodes)

Page 19: AI AND FUNDAMENTAL GAME TECHNOLOGIESIN FINAL FANTASY XV

© 2017 SQUARE ENIX CO.,LTD. All Rights Reserved.

OBJECT ORIENTED

• Encapsulate UI part implementation

• Expose UI part interface

Page 20: AI AND FUNDAMENTAL GAME TECHNOLOGIESIN FINAL FANTASY XV

Buddy、Nature、Monsters

©2017 SQUARE ENIX CO., LTD. All Rights Reserved.

Page 21: AI AND FUNDAMENTAL GAME TECHNOLOGIESIN FINAL FANTASY XV

Buddy、Nature、Monsters

©2017 SQUARE ENIX CO., LTD. All Rights Reserved.

Page 22: AI AND FUNDAMENTAL GAME TECHNOLOGIESIN FINAL FANTASY XV

FFXV -EPISODE DUSCAE- AI Overview

Making and Characters ©2017 SQUARE ENIX CO., LTD. All Rights Reserved.

Page 23: AI AND FUNDAMENTAL GAME TECHNOLOGIESIN FINAL FANTASY XV

Navigation AI

Meta-AI

Character AI

Dynamic allocation of enemies Observing level in real-time Direction for agents Making progress of game

Autonomous thinking Cooperation Team AI

Preparing data to make meta-AI and character AI recognize the level Managing object representation Managing Navigation data Path-finding / Tactical point analysis

Support

Enemy character

Player

Brain

Information Acquisition

Control

© 2017 SQUARE ENIX CO., LTD. All Rights Reserved.

Page 24: AI AND FUNDAMENTAL GAME TECHNOLOGIESIN FINAL FANTASY XV

Meta-AI

A buddy character receives a Meta AI’s order ,

and co-operate each other

©2017 SQUARE ENIX CO., LTD. All Rights Reserved.

Page 25: AI AND FUNDAMENTAL GAME TECHNOLOGIESIN FINAL FANTASY XV

Hybrid node format

©2017 SQUARE ENIX CO., LTD. All Rights Reserved.

State machine

Behavior tree

A Processing Node can change into Graph Structure.

IDLE

MOVE

FIGHT

MOVE

ATTACK

State machine Different types of graph system can be combined.

Page 26: AI AND FUNDAMENTAL GAME TECHNOLOGIESIN FINAL FANTASY XV

Hybrid node format

©2017 SQUARE ENIX CO., LTD. All Rights Reserved.

State machine

Behavior tree State machine

Page 27: AI AND FUNDAMENTAL GAME TECHNOLOGIESIN FINAL FANTASY XV

Visual node debugger and In-game debug window

©2017 SQUARE ENIX CO., LTD. All Rights Reserved.

Visual node debugger displays

current status of nodes.

In-game debug window display detailed logs.

Page 28: AI AND FUNDAMENTAL GAME TECHNOLOGIESIN FINAL FANTASY XV

Parallel thinking

Parallel thinking on a behavior tree.

©2017 SQUARE ENIX CO., LTD. All Rights Reserved.

Page 29: AI AND FUNDAMENTAL GAME TECHNOLOGIESIN FINAL FANTASY XV

Level

Navigation AI

Meta-AI

Character AI

Dynamic allocation of enemies Observing level in real-time Direction for agents Making progress of game

Autonomous thinking Cooperation Team AI

Preparing data to make meta-AI and character AI recognize the level Managing object representation Managing Navigation data Path-finding / Tactical point analysis

Support

Enemy character

Player

Brain

Information Acquisition

Control

© 2017 SQUARE ENIX CO., LTD. All Rights Reserved.

Page 30: AI AND FUNDAMENTAL GAME TECHNOLOGIESIN FINAL FANTASY XV

Pathfinding

©2017 SQUARE ENIX CO., LTD. All Rights Reserved.

Page 31: AI AND FUNDAMENTAL GAME TECHNOLOGIESIN FINAL FANTASY XV

Smart waypoint

©2017 SQUARE ENIX CO., LTD. All Rights Reserved.

Page 32: AI AND FUNDAMENTAL GAME TECHNOLOGIESIN FINAL FANTASY XV

PQS and Movement

• PQS

©2017 SQUARE ENIX CO., LTD. All Rights Reserved.

Page 33: AI AND FUNDAMENTAL GAME TECHNOLOGIESIN FINAL FANTASY XV

Attack Motion Analysis

©2017 SQUARE ENIX CO., LTD. All Rights Reserved.

• Attack Motion Analysis

By simulating and analyzing a motion, attack range and attack angle are automatically detected . These information is used in AI Graph. This work has ever been done by game designers. The automation can shorten development works.

Page 34: AI AND FUNDAMENTAL GAME TECHNOLOGIESIN FINAL FANTASY XV

Attack Motion Analysis

©2017 SQUARE ENIX CO., LTD. All Rights Reserved.

Page 35: AI AND FUNDAMENTAL GAME TECHNOLOGIESIN FINAL FANTASY XV

Movement Motion Analysis

• Movement Motion Analysis

©2017 SQUARE ENIX CO., LTD. All Rights Reserved.

By simulating movement motion, rotation radius and speed control ability are detected Automatically. By using the data chart., motion feature for each character are abstracted.

Page 36: AI AND FUNDAMENTAL GAME TECHNOLOGIESIN FINAL FANTASY XV

Decision-making by behavior-tree

• Decision-making by behavior-tree

©2017 SQUARE ENIX CO., LTD. All Rights Reserved.

Page 37: AI AND FUNDAMENTAL GAME TECHNOLOGIESIN FINAL FANTASY XV

1. Vison sensor and target search

• Vision sensor

©2017 SQUARE ENIX CO., LTD. All Rights Reserved.

Page 38: AI AND FUNDAMENTAL GAME TECHNOLOGIESIN FINAL FANTASY XV

3. Rule-based AI System • Rule-based AI

©2017 SQUARE ENIX CO., LTD. All Rights Reserved.

Behemoth’s

rule

Page 39: AI AND FUNDAMENTAL GAME TECHNOLOGIESIN FINAL FANTASY XV

4. AI Graph override

©2017 SQUARE ENIX CO., LTD. All Rights Reserved.

Me07 behemoth

Page 40: AI AND FUNDAMENTAL GAME TECHNOLOGIESIN FINAL FANTASY XV

4. AI Graph override

©2017 SQUARE ENIX CO., LTD. All Rights Reserved.

Me04 Catoblepas

Page 41: AI AND FUNDAMENTAL GAME TECHNOLOGIESIN FINAL FANTASY XV

AI Graph Override

©2017 SQUARE ENIX CO., LTD. All Rights Reserved.

Page 42: AI AND FUNDAMENTAL GAME TECHNOLOGIESIN FINAL FANTASY XV

AI Graph Override

©2017 SQUARE ENIX CO., LTD. All Rights Reserved.

Page 43: AI AND FUNDAMENTAL GAME TECHNOLOGIESIN FINAL FANTASY XV

5. Motion Analysis

©2017 SQUARE ENIX CO., LTD. All Rights Reserved.

• Attack Motion Analysis The system detect a region where each monster attack will hit by putting opaque sphere around monster. The spheres which is hit by the attack become red. The system detect the region size, position, and angle. The monster remebers the region feature. It saves much development cost by removing game designer’s task.

Page 44: AI AND FUNDAMENTAL GAME TECHNOLOGIESIN FINAL FANTASY XV

5. Motion Analysis

©2017 SQUARE ENIX CO., LTD. All Rights Reserved.

• Attack Motion Analysis

Page 45: AI AND FUNDAMENTAL GAME TECHNOLOGIESIN FINAL FANTASY XV

5. Motion Analysis

©2017 SQUARE ENIX CO., LTD. All Rights Reserved.

• Attack Motion Analysis

Page 46: AI AND FUNDAMENTAL GAME TECHNOLOGIESIN FINAL FANTASY XV

5. Motion Analysis

©2017 SQUARE ENIX CO., LTD. All Rights Reserved.

• Travelling Motion Analysis Using an automatic analysis system, we can view the performance of a character’s turning and stopping ability in chart form. From the chart, if there is a problem in the animation data, we can adjust the data.

Page 47: AI AND FUNDAMENTAL GAME TECHNOLOGIESIN FINAL FANTASY XV

Movement Motion Analysis

©2017 SQUARE ENIX CO., LTD. All Rights Reserved.

Page 48: AI AND FUNDAMENTAL GAME TECHNOLOGIESIN FINAL FANTASY XV

© 2017 SQUARE ENIX CO.,LTD. All Rights Reserved.

Thank you for your time

and attention.

Xbox One is a trademark or registered trademark of Microsoft Corporation.

PlayStation is a trademark or registered trademark of Sony Interactive Entertainment Inc.

All other trademarks are the property of their respective owners.