Scripting and AI Damián Isla, Moonshot Games. Scripting vs. Scripting Distinguish between scripting as technology and scripting as filthy hackery.

Slides:



Advertisements
Similar presentations
The Halo 2 AI In 10 Minutes or Less Damián Isla Bungie Studios
Advertisements

The Gym: Where The Incredible Hulk Goes To Train Bryan Brandt Lead Gameplay Programmer Kevin Coughlan Technical Director
Camera angles By Chris Hinkey (cmh209) Standard game camera angle techniques Camera controllers Replay camera angles.
Chapter Chapter 4. Think back to any very difficult quantitative problem that you had to solve in some science class How long did it take? How many times.
A P RAGMATIC A PPROACH Brent Bradbury Joshua Bruning.
Chapter 3.5 Debugging Games
1-1 Welcome to: CSC225 Introduction to Computer Organization Paul Hatalsky.
Game Deconstruction 101 How to stop developers reinventing the wheel.
Write Your First Computer Game!. Coding: Programming Languages Just like you can speak Chinese to someone who understands Chinese to tell them what to.
CS 4730 Game Design Patterns CS 4730 – Computer Game Design Credit: Some slide material courtesy Walker White (Cornell)
Producing Digital Download Content Introduction Who am I? What am I talking about? What is Digital Content in the context of this talk?
CPSC 322 Introduction to Artificial Intelligence October 29, 2004.
Spring 2007COMP Design Teams Team Structure Interdisciplinary Teams.
Aug 24, Fall 2005ITCS4010/50101 Design Teams Team Structure Interdisciplinary Teams.
Chapter 3.2 C++, Java, and Scripting Languages “The major programming languages used in game development.”
Computer Science 162 Section 1 CS162 Teaching Staff.
Sep 14, Fall 2006IAT 4101 Design Teams Team Structure Interdisciplinary Teams.
User Interface Design. Overview The Developer’s Responsibilities Goals and Considerations of UI Design Common UI Methods A UI Design Process Guidelines.
1 Software Testing and Quality Assurance Lecture 14 - Planning for Testing (Chapter 3, A Practical Guide to Testing Object- Oriented Software)
Rapid Prototyping Marti Hearst (UCB SIMS) SIMS 213, UI Design & Development February 25, 1999.
Artificial Intelligence in Video Games Damián Isla, Director of Technology Moonshot Games.
GAME 1024: Advanced Game Programming Lesson 5: Scripting Your Code Away By Kain Shin.
Chapter Languages, Programming and Architecture.
Games Development 2 Entity / Architecture Review CO3301 Week
Ch 1. Introduction Dr. Bernard Chen Ph.D. University of Central Arkansas Spring 2012.
By Yukyong Chung.  Given the terms of computational concepts, the students will be able to state examples matching the Scratch blocks.  The students.
What is Design? Why does it matter? David Vronay Research Manager Windows UI Strategy Microsoft, Inc.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1-1 Welcome to: CSC225 Introduction to Computer Organization.
Introduction GAM 376 Robin Burke Winter Outline Introductions Syllabus.
ThomasfamilyZA & BrendsZA GC3B0EJ – MEGA South Africa September 2012
An overview of scripting languages Alexander Kanavin Teachers: Barbara Miraftabi, Jan Voracek.
University of Southern California Center for Systems and Software Engineering Retrospective Analysis Supannika Koolmanojwong October 21,
Miscellaneous stuff about learning That I put in a powerpoint because I’m not in school today.
Interception and Analysis Framework for Win32 Scripts (not for public release) Tim Hollebeek, Ph.D.
AngularJS & Git Workshop Made by: Nikola Novakovic.
CHAPTER 10: CORE MECHANICS Definitions and Mechanisms.
Eagle: Maturation and Evolution 17th Annual Tcl Conference Joe Mistachkin.
Inside Abilities Daniel Kline and Lauren McHugh.
AI in games Roger Crawfis CSE 786 Game Design. AI vs. AI for games AI for games poses a number of unique design challenges AI for games poses a number.
John Imboden. What is Lua  Embeddable scripting language  Creators: Roberto Lerusalimschy, Luiz Henrique de Figueiredo, and Waldemar Celes  Designed.
Introducing Allors Applications, Tools & Platform.
By Justin Karneeb.  Many people have different views  It is not a High-Level language  It has low functionality (innate abilities)  It has minimal.
Chapter 3.6 Game Architecture. 2 Overall Architecture The code for modern games is highly complex (can easily exceed 1M LOC) The larger your program,
All about viruses, hacking and backups By Harriet Thomas.
AI Evaluation David Nowell CIS 588 2/14/05 Baldur’s Gate.
Artificial intelligence IN NPCs. Early Role Playing games Npcs in early role playing games were very limited in terms of being “Intelligent”. For instance,
F.E.A.R. Game AI Evaluation by Robert Rak. What is F.E.A.R. ? FEAR is a First Person Shooter game Player takes on the role of an elite strike force team.
Games Development 1 Review / Revision CO2301 Games Development 1 Semester 2.
CS001 Introduction to Programming Day 2 Sujana Jyothi
CHAPTER 14 Classes, Objects, and Games XNA Game Studio 4.0.
Stuck! Professor Rebecca Henderson & Professor Nelson Repenning
STL CSSE 250 Susan Reeder. What is the STL? Standard Template Library Standard C++ Library is an extensible framework which contains components for Language.
TRIUMF HLA Development High Level Applications Perform tasks of accelerator and beam control at control- room level, directly interfacing with operators.
44222: Information Systems Development
Graham (ThomasfamilyZA) Brendan (BrendsZA) Nicole (ThomasfamilyZA) GC3KEQY Techno Event 3 30 June 2012
Code Generation Instruction Selection Higher level instruction -> Low level instruction Register Allocation Which register to assign to hold which items?
Positioning and Spatial Evaluation
Building a Wherigo ThomasfamilyZA & BrendsZA
Rapid Prototyping using UDK
Architecture Components
Top Tips Summary: Software Engineering in practice
Game Engines Edd Soper.
Present by Andie Saizan, MCP
My week in JavaScript Hell
GENERAL VIEW OF KRATOS MULTIPHYSICS
CSE 303 Concepts and Tools for Software Development
Project Name Group Members.
Welcome to: CSC225 Introduction to Computer Organization
Games Development 1 Review / Revision
Games Development 2 Entity / Architecture Review
Presentation transcript:

Scripting and AI Damián Isla, Moonshot Games

Scripting vs. Scripting Distinguish between scripting as technology and scripting as filthy hackery.

Scripting as Filthy Hackery “Lazy devs faking it in script instead of doing it for real in code.” Obviously absurd.  Code doesn’t make it more real.  Script is code.  It’s all fakery if you go down far enough.

Faking it  Robust vs. brittle systems  Orthogonal to questions of implementation language  Robust is always better  A Matter of Economics  we don’t have time to do everything well  it works most of the time

The World is Lies... so what we should be asking ourselves is not “how do we avoid faking it” but “what’s the best way to fake it?”

The Most Important AI Technology Ever if then else

But this sucks if (ai.health < health_cover_threshold) { } else { }

Scripting as Architecture LUA  Compiled to bytecode  Hot swapping  Highly embeddable  Highly customizable  Dynamic typing Months of dev time saved Kill me now

Pros and Cons We like  Iteration times  Expressivity  Designer-accessibility We don’t like  Performance  Designer-accessibility

El Compromiso Systems that are performance-sensitive are generally NOT the systems where designer- expressivity is important. And vice versa.

Our Strategy  Script as a pillar of the the Engine  Component object model  Components can be implemented in  C++  Lua  Script is also the special sauce  Script is the glue

The [Production] Goal Lua can be used to create first-class systems from the ground up. 3 parts:  component scripts  system scripts  data

Components and Script ABC D

AB

A Path This is where the fun lives B Animation

Component Soup A* Perception/ Ray-casting Target selection Behavior Physics Animation playback Animation control Squad behavior Random Script

Component Soup A* Perception/ Ray-casting Target selection Behavior Physics Animation playback Animation control Squad behavior Random Script Emit balloons from ears whenever player hits the elephant with the frying pan

Component Soup A* Perception/ Ray-casting Target selection Behavior Physics Animation playback Animation control Squad behavior Random Script

Component Soup A* Perception/ Ray-casting Target selection Behavior Physics Animation playback Animation control Squad behavior Random Script

Component Soup A* Perception/ Ray-casting Target selection Behavior Physics Animation playback Animation script Squad behavior Random Script Locomotion control

Component Soup emit_balloons initialize() attach() update() detach()

System Soup System script

System Soup Boids

System Soup

Data  Need to be able to:  save out the state of the scripts  drive the system with data  define the structure for both  Lua can define structures  define structures for engine-allocated data blocks  engine controls the lifetime of these blocks  Lua  reads and writes to the blocks  is NEVER allowed to allocate it’s own dynamic memory  we lock the global scope after creation

System Soup ParametersState ParametersState System script

Script-based Systems What it gets us  A fluid design environment  avoid the “data-driven” code trap  A place to put our hacks  (Embrace the hackery)  Continuity between prototyping and production

Initial Framework (Engineer) Implementation (Design) Final implementation (Engineer) Final buy-off (Design)

Engineer makes it work Design makes it work well Engineer makes it fast Design makes sure it still works well

Not so fast... Doesn’t mean you don’t need to  Provide perf tools  Think systemically about script  Think seriously about interfaces between components  Design all pieces as an architecture  Help designers write good systems, not just good code But does mean that the architecture can evolve more fluidly and in a more design-driven way.

Concepts that don’t Exist (In code)  Health / Death / Damage  Weapons / Items / Equipment / Powers  AI  Behavior  HUD / UI / Menus  Missions / Levels / Objectives

One more distinction C++  high performance  low (designer) expressivity  game-agnostic Script  low performance  high (designer) expressivity  game-specific The technology you keep around for next time The stuff that makes this game unique and awesome

Thanks!