Game Development Reference
In-Depth Information
Chapter 11. Scripting Languages and Data
Formats
When writing code that drives gameplay, it is increasingly common to
utilize a scripting language. This chapter explores the advantages and
disadvantages of using a scripting language, as well as several of the po-
tential language options.
A further consideration is how data that describes the level and other
properties of the game should be stored. As with scripting languages,
there are several options for representing data, both binary and text
based.
Scripting Languages
For many years, games were written entirely in assembly. That's because extract-
ing a high performance out of those earlier machines required a level of optimiza-
tion that was only possible with assembly. But as computers became more power-
ful, and games became more complex, it made less and less sense. At a certain
point, the opportunity cost of developing a game entirely in assembly was not
worth it, which is why all game engines today are written in a high-level program-
ming language such as C++.
In a similar vein, as computers have continued to improve, more and more games
have shifted away from using C++ or similar languages for gameplay logic. Many
games now write much of their gameplay code in a scripting language , which is
an even higher-level language such as Lua, Python, or UnrealScript.
Because script code is easier to write, it is often possible for designers to work
directly on the scripts. This gives them a much greater ability to prototype ideas
without needing to dive into the engine code. Although certain core aspects of
AAA games such as the physics or rendering system still are written in the core
engine's language, other systems such as the camera and AI behavior might be in
script.
Search WWH ::




Custom Search