Game Development Reference
In-Depth Information
Chapter 11: Scripting Languages and Data Formats
1 . A scripting language might allow more rapid iteration of game elements,
and also makes it more accessible for nonprogrammers to edit. But the
disadvantage of a scripting language is that its performance is not going to
be as good as a compiled language such as C++.
2 . A scripting language might make sense for the camera, AI state machines,
and the user interface.
3 . UnrealScript is one custom scripting language that's popular for games.
The advantage of a custom scripting language is that it can be tailored
specifically for game use. In the case of UnrealScript, this means it sup-
ports state functionality. It also can have its performance tailored for game
applications. The disadvantage, however, is that a custom language may
have a lot more errors in its implementation than a general language.
4 . A visual scripting system allows the use of basic flow charts to drive lo-
gic. It might be used for the logic in a particular level, such as when and
where enemies spawn.
5 . The statement int xyz = myFunction(); would break down into
the following tokens:
int
xyz
=
myFunction
(
)
;
6 . The regular expression [a-z][a-zA-Z]* matches a single lowercase
letter followed by zero or more lower- or uppercase letters.
7 . An abstract syntax tree is a tree structure that stores the entire syntactical
layout of a program. The AST is generated in syntax analysis and can then
be traversed in a post-order manner either to generate or execute its code.
8 . A binary file format is typically going to be both smaller and more effi-
cient to load than a text-based one. But the problem is that it's much more
difficult to determine the difference between two versions of a binary data
file in comparison to a text data file.
Search WWH ::




Custom Search