ai and fundamental game technologiesin final fantasy xv
TRANSCRIPT
© 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
© 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
© 2017 SQUARE ENIX CO.,LTD. All Rights Reserved.
© 2017 SQUARE ENIX CO.,LTD. All Rights Reserved.
© 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
© 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
© 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
© 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
© 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
© 2017 SQUARE ENIX CO.,LTD. All Rights Reserved.
NODE GRAPH BASED VISUAL SCRIPT
Node properties
Node
Pin: node in/output
Edge: control/data flow
© 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,…)
© 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.
© 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
?
© 2017 SQUARE ENIX CO.,LTD. All Rights Reserved.
COMPONENTIZATION IN VISUAL SCRIPT
Characteristics of visual scripts
• Graphical
• Simple semantics Easy to componentize
© 2017 SQUARE ENIX CO.,LTD. All Rights Reserved.
COMPONENTIZATION (CONTD.)
Can be a node graph of other type
Many types of scripts cooperate
© 2017 SQUARE ENIX CO.,LTD. All Rights Reserved.
COMPONENTIZATION (CONTD.)
Can be replaced with native code node implementation
High affinity for native codes
© 2017 SQUARE ENIX CO.,LTD. All Rights Reserved.
UNMAINTENANCABLE HUGE GRAPH
© 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
© 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)
© 2017 SQUARE ENIX CO.,LTD. All Rights Reserved.
OBJECT ORIENTED
• Encapsulate UI part implementation
• Expose UI part interface
Buddy、Nature、Monsters
©2017 SQUARE ENIX CO., LTD. All Rights Reserved.
Buddy、Nature、Monsters
©2017 SQUARE ENIX CO., LTD. All Rights Reserved.
FFXV -EPISODE DUSCAE- AI Overview
Making and Characters ©2017 SQUARE ENIX CO., LTD. All Rights Reserved.
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.
Meta-AI
A buddy character receives a Meta AI’s order ,
and co-operate each other
©2017 SQUARE ENIX CO., LTD. All Rights Reserved.
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.
Hybrid node format
©2017 SQUARE ENIX CO., LTD. All Rights Reserved.
State machine
Behavior tree State machine
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.
Parallel thinking
Parallel thinking on a behavior tree.
©2017 SQUARE ENIX CO., LTD. All Rights Reserved.
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.
Pathfinding
©2017 SQUARE ENIX CO., LTD. All Rights Reserved.
Smart waypoint
©2017 SQUARE ENIX CO., LTD. All Rights Reserved.
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.
Attack Motion Analysis
©2017 SQUARE ENIX CO., LTD. All Rights Reserved.
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.
Decision-making by behavior-tree
• Decision-making by behavior-tree
©2017 SQUARE ENIX CO., LTD. All Rights Reserved.
1. Vison sensor and target search
• Vision sensor
©2017 SQUARE ENIX CO., LTD. All Rights Reserved.
3. Rule-based AI System • Rule-based AI
©2017 SQUARE ENIX CO., LTD. All Rights Reserved.
Behemoth’s
rule
4. AI Graph override
©2017 SQUARE ENIX CO., LTD. All Rights Reserved.
Me07 behemoth
4. AI Graph override
©2017 SQUARE ENIX CO., LTD. All Rights Reserved.
Me04 Catoblepas
AI Graph Override
©2017 SQUARE ENIX CO., LTD. All Rights Reserved.
AI Graph Override
©2017 SQUARE ENIX CO., LTD. All Rights Reserved.
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.
5. Motion Analysis
©2017 SQUARE ENIX CO., LTD. All Rights Reserved.
• Attack Motion Analysis
5. Motion Analysis
©2017 SQUARE ENIX CO., LTD. All Rights Reserved.
• Attack Motion Analysis
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.
Movement Motion Analysis
©2017 SQUARE ENIX CO., LTD. All Rights Reserved.
© 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.