Creating a textual domain specific language to describe gaming rules

OData support
Dr. Mezei Gergely
Department of Automation and Applied Informatics

The first chess computer that could play a whole game was made in 1958. At that time games were only a curiosity, but later they have become one of the main forces driving the development of computers.

Many computer games mimic or are based on games from real life. Card games are popular – just think of online poker – similarly to various word games, crossword puzzles, and you can also find many followers for board games like chess.

Some games are really popular worldwide, for these, many computer games exist already. Other games are developed and played regionally, therefore the quality of the software is not that advanced. This problem could be solved if people other than professional programmers or engineers could enter the rules for the games, and a software program could create a playable game from these rules. The topic of my thesis is creating a domain specific language and an environment for entering the rules and playing the game. For an efficient and concise language, I have decided to create an environment supporting only a subset of games, specifically board games.

I designed a language that is capable of describing the rules of board games. I defined and parsed the language using the ANTLR framework. I split the environment in two: an interpreter to enforce the rules for the game and a user interface. The interpreter is a .NET class library and the UI is a WPF desktop application. In addition, I created a console UI to aid the development. Finally, to check and test the environment, I described the rules for a few popular, well-known games.


Please sign in to download the files of this thesis.