Game Development Reference
In-Depth Information
ride these functions. Instead of overriding them, they had to hook onto the func-
tions, which means that after a secure function executes, the custom hook has an
opportunity to execute.
Conclusion
Ultimately, the UI add-on system for World of Warcraft was extremely successful,
so much so that most MMORPGs released since have employed similar systems.
The number of add-ons created by the community is enormous, and some became
so successful that Blizzard incorporated elements into the core game interface. Ul-
timately, the design of a system that was so flexible and powerful would not have
been possible without the use of both scripting languages and a text-based file
format.
Summary
Scripting languages have seen an increase in usage in games due to the improve-
ments in productivity. Because of this, many gameplay programmers now spend
much of their time programming in script. Some games might use an existing
scripting language such as Lua, whereas others might use a language custom-built
for their game engine. If a custom scripting language must be implemented, many
of the techniques used to create a compiler must be employed, including lexical
and syntax analysis.
As for the question of how to store game data, there are tradeoffs between text-
based and binary formats. A text-based format makes it much easier to glean
changes between revisions, whereas a binary format will almost always be more
efficient. Some sample text-based formats this chapter covered included INI,
XML, and JSON. Finally, in the World of Warcraft UI we saw a system that com-
bines both a scripting language and text-based data files.
Review Questions
1 . What are the advantages and disadvantages of using a scripting language
in a game?
2 . What are three examples of systems that make sense to implement with a
scripting language?
3 . Give an example of a custom scripting language. What advantages and
disadvantages might this have over a general scripting language?
4 . What is a visual scripting system? What might it be used for?
Search WWH ::




Custom Search