Lecture4b

mewstennisΛογισμικό & κατασκευή λογ/κού

4 Νοε 2013 (πριν από 4 χρόνια και 1 μήνα)

94 εμφανίσεις

1

Chapter 4

Customizing AI Systems

allowing others to modify and implement the
AI


Reference: Game Development Essentials


Game Artificial Intelligence

2

Key Chapter Questions



Early video games were written in programming languages, often assembly
language and C. What changes have taken place to make scripting
languages useful tools in video games?




What is an example of a game system that requires minimal setup by a game
designer, and when is this kind of system useful?




What is an example of a game system that requires that substantial
information be supplied by a game designer, and what are its advantages?




Building a custom script system is time
-
consuming. What are two ways to
make game scripting available more quickly?




What are the advantages and drawbacks of text
-
based scripting? Given
unlimited resources, what are some ways to address the drawbacks?

3

Black Box & White Box Systems

A Black Box system is easy to use,

while a White Box system is more complex.

4

Black Box



Well
-
Defined Problems



Repetitive Behavior


White Box



Collaborative Projects



Iterative Development




Black Box & White Box Systems

Design

5

Black Box & White Box Systems

Development Techniques



Data
-
Driven Systems



Parameter File



State Mask



Rule
-
Based Systems

Supreme Commander
uses a data
-
driven
design in order to allow the game’s
designers to modify an agent’s behaviors
and attributes, then quickly test the new
behavior.

6

Scripting Systems

Text Scripting Languages

Custom Scripting Languages

Nox

7

Scripting Systems

Text Scripting Languages

Open Source Scripting Languages

World of Warcraft
(Lua)

8

Scripting Systems

Text Scripting Languages

Licensed Scripting Languages

Unreal Tournament 2007

9

Scripting Systems

Text Scripting Languages

Interfacing a Text Scripting Language to a Game



Procedural Model




Object
-
Oriented Model

10

Scripting Systems

Graphical User Interface Scripting Languages

Text
-
Based GUI

The
StarCraft
Campaign Editor and the
Command & Conquer:
Generals
Worldbuilder tool use a series of dialogue boxes to assist

in entering script data.

11

Scripting Systems

Graphical User Interface Scripting Languages

Custom Graphical Programming Language (Kismet)

The Unreal 3 Engine (
Gears of War
shown
)
uses the Kismet GUI scripting language.

12

Scripting Systems

Graphical User Interface Scripting Languages

Grouping Scripts in a Graphical Environment

The Kismet system allows script grouping visually. Script

groups can be located quickly with the hierarchical textbased

tree control on the bottom of the screen.

13

Scripting Systems

Using Scripting in a Game



Provide Data Values



Events and Functions



Controlling Animations

Lua scripting was used in
The Lord of the
Rings: The Battle for Middle
-
Earth to
coordinate animation transitions for

complex characters such as the Ent.