Abstract

AbstractGame mechanics are high‐level descriptions of common game requirements; however, they do not provide any guidance on their code implementation. Nevertheless, their implementation involves high volumes of essential complexity, which in turn leads to the introduction of accidental complexity (long methods, code repetition, etc.). A possible solution to this problem is to map game mechanics to design patterns, in order to provide template instantiations that handle structural complexity. The aim of this study is twofold: (a) introduce template instantiations of game mechanics with Gang of Four (GoF) patterns and (b) evaluate such mappings in terms of extendibility and reusability. To achieve these objectives, we developed an online repository of mappings between GoF patterns and game mechanics and conducted an experiment to explore the benefits of the mapping. The results of the study suggest that the implementation of game mechanics with GoF patterns is beneficial, because the time to extent the current implementation or reuse code chunks is not prolonged, whereas the implementations are less faulty. Finally, the suggested mapping will equip game mechanics with sample implementations (that adhere to good design principles—ensuring extendibility) that can be reused, acting as a starting point for source code development.

Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call