Animation of tile-based games automatically derived from simulation specifications

Jan Wolter, Bastian Cramer, Uwe Kastens
2011 Computer Science and Information Systems  
Visual Languages (VLs) are beneficial particularly for domainspecific applications, since they can support ease of understanding by visual metaphors. If such a language has an execution semantics, comprehension of program execution may be supported by direct visualization. This closes the gap between program depiction and execution. To rapidly develop a VL with execution semantics a generator framework is needed which incorporates the complex knowledge of simulating and animating a VL on a high
more » ... specification level. In this paper we show how a fully playable tile-based game is specified with our generator framework DEViL. We illustrate this on the famous Pacman 1 game. We claim that our simulation and animation approach is suitable for the rapid development process. We show that the simulation of a VL is easily reached even in complex scenarios and that the automatically generated animation is mostly adequate, even for other kinds of VLs like diagrammatic, iconic or graph based ones. Unfortunately there is still a gap between program depiction and the generated code of that program. The programmer has to keep in mind what the program, he just created, does when it is executed. This gap is known as the gulf of execution [9] . Simulation and animation of the visual language instance can help to narrow this gap. The execution semantics of a visual language (if it has one) can be integrated into the visual language. Hence the VL instance is no longer static. It can be simulated and smoothly animated. The user can "see" his language being executed before he generates code. This helps to avoid mistakes at a very early stage and it supports program comprehension which is a challenging task especially in languages where many things happen in parallel. The Development Environment for Visual Languages, DEViL, is a generator framework for visual languages which produces graphical editors from declarative high-level specifications. We extended it with simulation and animation support for VLs whereas a smooth and challenging animation can be derived automatically from a simple simulation specification. In this paper we want to show that our simulation specification language is powerful to simulate even complex behavior. We claim that the language helps in rapid prototyping, because simulation becomes an easy task due to powerful encapsulated concepts like event driven simulation and the extension of the visual semantic model to constitute a tailored simulation model. We will show that the automatically derived animation is suitable in most situations. We will demonstrate this on the famous Pac-man game. It has a playful character, but it is also a challenging language for simulation, because of the complex navigation concepts of the "ghost" pawns in the game. The paper is structured as follows: First we introduce the DEViL system and its underlying specification concepts with particular attention to simulation and animation. In Section 3 we give a brief description of the Pac-man game. In the next section we present our Pac-man Editor with special attention to the strategies of the ghost characters. Section 5 addresses related work and section 6 completes the exposition with a conclusion and a look at other implemented languages.
doi:10.2298/csis101220005w fatcat:q6pklpmpkjdotg7dku552ez764