Game Development Reference
In-Depth Information
How to Use DSLs
The categorization of DSLs has shown that their application can be manifold. That is also true in the context of
game development. However, instead of a tedious discussion about which application fields might be more or less
appropriate for them, you will work through a language engineering workflow. The workflow is intended to let you,
as a toolsmith, create languages for your game projects, since you know best which tools fit into your development
process. The workflow is therefore knowingly independent from the type of DSL you want to create and the tools
you want to use to create your language infrastructure. For illustration purposes, you will consider the creation of a
weapon definition language to highlight the steps of the workflow and underline how the language creation process
itself can be used in the context of designing aspects of a game. Naturally the example is simplified due to the limited
space a book chapter provides.
Language Engineering Workflow
The creation of a domain-specific language is an iterative process, just as the creation of a good game should be. The
main assumptions of the language engineering workflow presented here are that there should always be two different
kinds of development roles and that the language design should be undertaken from the bottom up.
Figure 13-3 shows the two developer roles in language engineering. First, let's define a domain expert as a person
with extensive domain knowledge and expertise. The domain expert is in charge of identifying and defining the
entities and semantics of the domain. Domain experts are not in charge of developing the language's actual syntax or
any tools for language processing. This responsibility falls to the language engineer, who is a person with extensive
knowledge in language design and tool creation for various environments and purposes.
Figure 13-3. Roles and their tasks in language engineering
 
Search WWH ::




Custom Search