PULP Scription: A DSL for Mobile HTML5 Game Applications

Mathias Funk, Matthias RauterbergIcec 2012

Introduction

The development of mobile games currently faces a significant fragmentation challenge. Developers must often choose between platform-specific native code (iOS/Android) or web-based HTML5 solutions. While HTML5 offers "write once, run anywhere" portability, it demands high proficiency in JavaScript, CSS3, and complex asynchronous programming. These technical barriers often exclude designers and educational content creators from the development process.

PULP is introduced as a domain-specific language (DSL) designed to bridge this gap. It provides a "middle ground" between overly simplistic prototyping tools and complex programming environments, allowing designers to model interactive behaviors using a professional dialect suited to their expertise.

System Architecture and Methodology

PULP is implemented as a textual DSL using the Eclipse platform and the Xtext framework. The system architecture facilitates a streamlined workflow for content creators.

Overview of the PULP system architecture, illustrating the workflow from script creation to HTML5 generation.

As shown in Figure 1, the system consists of two primary components:

  1. The Language: PULP utilizes a syntax familiar to designers, employing a theater stage analogy (backgrounds, actors, requisites) and focusing on visual concepts like "canvases," "pixels," and "layers."
  2. The Generator: Built with Xtend, the generator performs a model-to-text transformation. It converts PULP scripts into functional HTML5 applications, automatically handling CSS3 styling and jQuery-based logic.

A core innovation is the Action Chain (Trigger => Result). This abstraction allows users to define complex sequences—such as multi-step unlock mechanisms—without manually managing state machines or event listeners. The generator handles the underlying state transitions automatically.

Key Design Principles

The design of PULP prioritizes the mental models of designers over traditional developer preferences:

  • Absolute Positioning: Unlike the relative layouts common in web development, PULP uses fixed coordinates and pixels, aligning with how designers typically conceptualize layouts.
  • Semantic Media Handling: The language distinguishes between "sounds" (which can overlap) and "voices" (which play exclusively). This ensures that critical educational instructions are never obscured by background audio.
  • State Management via Action Chains: By allowing multiple triggers to be listed in sequence, PULP simplifies the logic required for interactive elements, such as showing specific UI components only after a series of user actions.

Evaluation and Results

An informal evaluation with designers demonstrated the tool's effectiveness and low barrier to entry:

  • Rapid Onboarding: Participants understood the functionality of exemplary scripts within 15 minutes.
  • Ease of Modification: Users successfully updated positioning, styling, and interaction triggers (e.g., changing a "click" to a "mouse-over") in approximately 20 minutes.
  • Creative Autonomy: Within 25 minutes, participants were able to create original content with minimal guidance.
  • Technical Robustness: The tool successfully generated cross-platform HTML5 applications that managed touch gestures and media playback, effectively hiding technical complexity from the user.

Conclusion and Future Work

PULP demonstrates that a designer-centric DSL can significantly lower the technical barriers to mobile game development. While the textual nature of the language is powerful, future work will focus on integrating visual positioning tools to further align with designer workflows. Additionally, the authors plan to expand the language's capabilities to include more complex control flows, enhanced gesture recognition, and broader video support, supported by more formal, large-scale user studies.

Summary updated

BibTeX
@inproceedings{funk2012pulp,
  author = {Mathias Funk and Matthias Rauterberg},
  title = {{PULP Scription: A DSL for Mobile HTML5 Game Applications}},
  booktitle = {Icec},
  year = {2012},
  doi = {10.1007/978-3-642-33542-6\_65},
}
Figure