Game Development Reference
In-Depth Information
Chapter 13
Engineering Domain-Specific
Languages for Games
Robert Walter
Programming languages are like musicians. The broader the audience they are addressing, the more popular they can
become, even if they are not the best at what they do. While it takes a lot more than a mainstream orientation to stay
on top of the charts, it is always a plus to address the wants of the many.
But there is a place for the specialized, too. Just as alternative artists pervade the history of music, domain-
specific languages (DSLs) have enjoyed a long tradition in software engineering (a good overview is given in Deursen
et al., 2000 1 ). While early versions of this kind of programming language like FORTRAN, Lisp, and COBOL evolved
over the years to fulfill more generic purposes (thus staying famous), others like SQL, regular expressions, and make
became evergreens within their technical domains. Despite their success, however, the concept of engineering and
the potential of using DSLs have been relegated to the “academics and theory” shelf for a long time (a good reference
on DSL development patterns is given in Mernik et al., 2005 2 ). Only recently, a growing interest in software design
philosophies like user-centered and domain-driven design, as well as the coming of age of model-driven development
methodologies and language workbenches, has led to a new popularity for these elegant tools.
Now, without stressing the music analogy any further, let's take a look at two questions.
1.
Why should game developers care about DSLs?
2.
How can game developers make use of DSLs?
Naturally, I need to cover some basics first, but I cannot dive too deep into the details of language-oriented
programming (LOP) in this chapter. Therefore, those who are new to the field of programming languages and how
they work might consider reading the cited literature first.
1 van Deursen, Arie, Paul Klint, and Joost Visser. “Domain-specific languages: an annotated bibliography.” SIGPLAN Not. 35
(2000): 26-36.
2 Mernik, Marjan, Jan Heering, and Anthony M. Sloane. “When and how to develop domain-specific languages.” ACM Comut.
Surv. Ser. 4. 37 (2005): 316-344.
 
Search WWH ::




Custom Search