<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta>
      <journal-title-group>
        <journal-title>Wageningen, May</journal-title>
      </journal-title-group>
    </journal-meta>
    <article-meta>
      <title-group>
        <article-title>Location-based Game Design Pattern Exploration Through Agent-Based Simulation</article-title>
      </title-group>
      <contrib-group>
        <aff id="aff0">
          <label>0</label>
          <institution>Thomas Heinz Research Group on Computing in the Cultural Sciences University of Bamberg</institution>
          ,
          <country country="DE">Germany</country>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2017</year>
      </pub-date>
      <volume>0</volume>
      <fpage>9</fpage>
      <lpage>12</lpage>
      <abstract>
        <p>The development and balancing of location-based games is challenging, because the gameplay depends on local environmental conditions. A tool based analysis of common game mechanics could provide a remedy for this problem, but requires precisely defined gameplay patterns. This paper presents systematic selection of spatio-temporal game design patterns together with a software tool, able to simulate location-based gameplay in different spatial environments. Introduction postconditions for each pattern. There are no detailed</p>
      </abstract>
      <kwd-group>
        <kwd>Geogames</kwd>
        <kwd>Location-based Games</kwd>
        <kwd>Game Design Patterns</kwd>
        <kwd>Agent-Based Simulation</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>
        In video- and board game design, patterns are long established
tools. These design patterns are used to gather inspiration,
communicate with peers and professionals or solve design as
well as interaction problems. Extensive collections for these
types of games have been compiled by various authors (e.g.
Bjork/Jussi 2004). When it comes to pattern libraries,
locationbased games have not received an equivalent amount of
attention although first attempts have already been made to
compile lists of patterns that cover design aspects new to
mobile location-based games
        <xref ref-type="bibr" rid="ref2 ref9">(Will 2013, Davidsson 2004)</xref>
        .
The authors gathered these patterns by analysing a selection of
existing games. Patterns discovered that way are related to a
wide variety of very different aspects – starting from technical
related features up to the social consequences of putting a
player into an outdoor environment. However, authors stress
that these pattern lists are far from being complete and have to
be extended continuously by increasing the number of analysed
games. Most pattern languages give the definition, usage
description and resulting outcome to a reoccurring game
mechanic. Typically, these facts are described textually, but are
not defined in any kind of formal language
        <xref ref-type="bibr" rid="ref3">(Dormans 2013)</xref>
        .
The issue of giving a formal description of a defined subspace
of design problems has not been sufficiently addressed by
research so far. Using formal description, location-based game
patterns could be implemented into software tools, that would
be able to support game designers in exploring strength and
weaknesses of given designs just by adjusting various
parameters. Tools like these could overcome the difficulties,
developers face in location-based game development
        <xref ref-type="bibr" rid="ref5">(Jacob/Coelho 2011)</xref>
        .
      </p>
      <p>
        In this paper I present a systematic approach for the
identification of a subset of spatio-temporal design patterns for
location-based games. By means of a self-imposed restriction
to the examined problem space, I am able to give pre- and
The purpose of this library of location-based game design
patterns differs from that of other collections. Its intention is
not just to collect patterns that are applied in existing games,
but to maybe even uncover, describe and name unknown and
never before used patterns that could be implemented in future
generations of location-based games. For this reason, the
collection process was not researching a selection of existing
games. Instead I chose a proven game model as starting point
for the analysis, the player model of
        <xref ref-type="bibr" rid="ref4">Heinz and Schlieder
(2015)</xref>
        . This player model abstracts from the details of specific
location-based games by providing generic descriptions of the
game elements needed for modelling a wide range of game
mechanics.
      </p>
      <p>The geogame model allows for a multitude of different
relations between the game entities it defines, such as
topological, Euclidean and also independencies between entity
states. The possible outcomes are too numerous to be all
covered in a first exploration/collection process. Therefore,
further restrictions were imposed. Patterns should initially only
refer to the relation between the two most important entities.
These are:</p>
      <p>Players: The most essential element of every game. In the
case of location-based games, players move through their
geographic environment while trying to win the game by
executing given game actions. In this process players
experience their environment. The knowledge about this
environment is enriched by data displayed on devices – in most
cases smartphones or tablets – running the game application,
displaying a map that visualizes entities relevant for the player.</p>
      <p>Places: A finite set of (immobile) areas of interest in the
geographic environment. Game actions are often bound to
corresponding places and a player can only execute them if
he/she is located there.</p>
      <p>Every game application has to contain an implementation of
its relevant game mechanics and has to be able to decide over
the outcome of this game. Hence, virtual representations of
relevant game entities have to be stored. Location-based games
also require the software to have a GIS component that handles
the position and geometries of mentioned entities. In almost
any location-based game, players are reduced to simple point
objects. In the case of places, the respective GIS objects are
chosen depending on game mechanic use cases. Sometimes it
is sufficient to store the place as a point (point of interest). If
the game mechanic needs to calculate exactly whether the
player is located inside a specific region, this place (region of
interest) has to be linked to a polygon geometry.</p>
      <p>Game design patterns that will be explored in this work
specifically refer to the virtual representations (PoI, RoI) of
involved game entities. These representations are also used
when the game decides on the outcome of a game action.
Therefore, they play a central role in the balancing of game
mechanics. Area of focus of the patterns will be the player.
Differentiating between the geometry types for places and the
specification that places cannot act on themselves, three
couples of entities can be identified:
 Player – PoI
 Player – RoI
 Player – Player
The game patterns will describe relations between the entities
of each couple that belonging to the perception of the player,
that can also be applied to the geometries of the entities. Two
fundamental relations provide the basis for the pattern
exploration procedure:</p>
      <p>
        Equals/Contains: Relates to the position of the geometries
and indicates whether a player is located directly at a place or
shares his/her location with another player. Small differences
in the position can be neglected depending on the respective
application. This subsection of the region connection calculus
(RCC)
        <xref ref-type="bibr" rid="ref7">(Randell et al., 1992)</xref>
        was chosen because it plays the
most important role in games, already implemented on top of
the geogame model. Other RCC relations will be evaluated in
future works.
      </p>
      <p>Line of Sight (LoS): Indicates whether a line of sight between
the player and other entity exists. The line of sight may be
blocked by the environment the player is moving through. Any
kind of entity state changes are ignored.
2.1</p>
    </sec>
    <sec id="sec-2">
      <title>Spatio-temporal Pattern Listing</title>
      <p>For a first pattern listing, each pattern will be defined by a
change of the connection between an entities couple. Both
relations can be observed separately or in interpendence with
each other by building the Cartesian product of each relation
and its negation. In the latter case not all combinations are
possible because a LoS is automatically in existence if the
equals/contains link is evaluated to be true. In table 1 all of the
45 different relations between the entity couples are listed.
Each entry represents a game design pattern and was given a
name. Some of the pairing’s patterns offer a lot of similarities.
This is also shows in the pattern names, which in some cases
read exactly the same because identical game mechanics are
applied to different kind of game entities.</p>
    </sec>
    <sec id="sec-3">
      <title>Precondition</title>
      <p>¬EQ
EQ
¬ EQ
EQ
¬LoS</p>
      <p>LoS
¬EQ, ¬LoS
¬EQ, LoS</p>
      <p>EQ</p>
      <p>EQ
¬EQ, ¬LoS
¬EQ, LoS
¬EQ, ¬LoS
¬EQ, LoS
The following short description for one of the listed patterns
will serve as an example for an entry as it will be found in the
pattern library. Whenever possible, pattern names as well as
pattern descriptions will be given from the perspective of the
player.
Pattern title: Search and enter</p>
    </sec>
    <sec id="sec-4">
      <title>Preconditions: ¬EQ, ¬LoS</title>
    </sec>
    <sec id="sec-5">
      <title>Postconditions: EQ</title>
      <p>Explanation: The players goal is to enter the RoI geometry. At
the beginning, the player has no line of sight to the RoI. The
player may, however, have knowledge about the location of the
RoI via textual description or any kind visualization of the RoI.
The player moves through his/her geographic environment in
search for it. The pattern is terminated once the player has
entered the geometry defined by the RoI.</p>
      <p>Sibling patterns: Search and go to, Search and meet
Technical details and a detailed walkthrough of the simulation
framework created especially for the exploration of said
patterns will be omitted. These will be explored in a follow-up
work. Nevertheless, a short description will be given to explain
the advantages over established agent-based simulation
frameworks.</p>
      <p>
        The simulation framework is based on a heavily modified
version of the agent-based simulation framework MESA1
        <xref ref-type="bibr" rid="ref6">(Masad/Kazil 2015)</xref>
        . One of the most interesting features of this
software is the ability to create HTML based visualizations that
are updated and can be made interactive via
websocketprotocol. It is intended to embed said visualizations into local,
HTML based notebooks. These notebooks are being used as
“interactive computational environment, in which you can
combine code execution, rich text, mathematics, plots and rich
media”2. By switching the “visualization server” component of
the framework it was modified in such a way that simulation
visualizations can be served over the internet. This enables
users to use the software through a browser on any device
connected to the internet and removes the need to install
additional software. The simulation server was embedded into
a Django-Channels3 application. This enables not only the
realtime communication between clients and the server but also
makes it possible to integrate user and rights management to
the application, that can be applied to the execution of
simulation runs. Registered users are able to create their own
configurations for each pattern routine listed in section 3.
Figure 2 shows a simple setup for the search and enter pattern
made, using the editor. Users of the editor can draw and edit
vectors and geometries on a map. By doing this, they are
creating game entities. Created editor configurations are saved
into a database and can be edited later as well as shared with
other users via a hyperlink. To make location-based simulation
possible, MESA was extended by a GIS component. This
component uses the well-known python libraries “shapely”4
and “pyproject”5. To enable simulations with realistic player
locomotion the routing functionality presented in Heinz and
Schlieder 2015 was recreated. A browser based visualization of
a pattern simulation is shown in figure 3. To create map based
visualizations, the software library “leaflet”6 was used. Map
tiles originate from the OpenStreetMap project. Both, the
editor, as well as the simulation visualization web application
are also able to run on mobile devices (e.g. smartphone, tablet).
As a consequence, simulation configurations and simulation
runs can be created/run on-site if desired. Depending on the
kind of pattern, each game entity, placed in a configuration, is
associated with a specific, built-in agent-behavior. Agents act
in such a way that they try to transform a patterns state from the
given preconditions to the specified postconditions. In doing so
they try to match human player behavior in the same way as it
is described in Heinz and Schlieder 2015.
4
      </p>
      <p>Discussion and Outlook
This paper presents a small selection of location-based game
design patterns. In the future the library of game design patterns
is going to be extended. Moreover, it will be easily applicable
to wide variety of game design problems due to its usage of an
abstract game model. Usage and implementation of the
described patterns is facilitated by their formal description.</p>
      <p>The simulation of these patterns via a web based simulation
framework already works flawlessly. Being able to set up
selfchosen configurations in all kinds of geographic environments,
without the need for any kind of special hardware seems like a
promising approach for designers of location-based games and
applications. With this kind of simulation framework – usable
on any portable device – users are able to create and simulate
pattern configurations for site specific game mechanics, while
being on-site and making themselves familiar with the
environment. Users can easily share simulations with others via
a hyperlink. This will further improve communication about
problems or benefits of applying game design patterns to
certain conditions.</p>
      <p>A next topic to explore are the combinations and interactions
between different patterns. Computational tools will be added
on top of the existing simulation routines. This will help
designers with the task of balancing game mechanics for
specific spatial environments.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          <string-name>
            <surname>Adams</surname>
            ,
            <given-names>E.</given-names>
          </string-name>
          and
          <string-name>
            <surname>Dormans</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          (
          <year>2012</year>
          ).
          <article-title>Game mechanics: advanced game design</article-title>
          . New Riders.
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          <string-name>
            <surname>Davidsson</surname>
            ,
            <given-names>O.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Peitz</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          and
          <string-name>
            <surname>Björk</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          (
          <year>2004</year>
          ).
          <article-title>Game design patterns for mobile games</article-title>
          .
          <source>Project report to Nokia</source>
          Research Center.
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          <string-name>
            <surname>Dormans</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          (
          <year>2013</year>
          ).
          <article-title>Making design patterns work</article-title>
          .
          <source>In Proceedings of the Second Workshop on Design Patterns in Games, DPG '13.</source>
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          <string-name>
            <surname>Heinz</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          and
          <string-name>
            <surname>Schlieder</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          (
          <year>2015</year>
          ).
          <article-title>An Agent-Based Simulation Framework for Location-Based Games</article-title>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          <string-name>
            <surname>Jacob</surname>
            ,
            <given-names>N.</given-names>
          </string-name>
          and
          <string-name>
            <surname>Coelho</surname>
            ,
            <given-names>A. F.</given-names>
          </string-name>
          (
          <year>2011</year>
          ).
          <article-title>Issues in the development of location-based games</article-title>
          .
          <source>International Journal of Computer Games Technology</source>
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          <string-name>
            <surname>Masad</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          and
          <string-name>
            <surname>Kazil</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          (
          <year>2015</year>
          ).
          <source>Mesa: An Agent-Based Modeling Framework. 14th PYTHON in Science Conference</source>
          ,
          <volume>53</volume>
          -
          <fpage>60</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          <string-name>
            <surname>Randell</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Zhan</surname>
            <given-names>C.</given-names>
          </string-name>
          , and
          <string-name>
            <surname>Anthony</surname>
            <given-names>C.</given-names>
          </string-name>
          <article-title>A spatial logic based on regions and connection</article-title>
          .
          <source>KR</source>
          <volume>92</volume>
          (
          <year>1992</year>
          ):
          <fpage>165</fpage>
          -
          <lpage>176</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          <string-name>
            <surname>Schlieder</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kiefer</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          and
          <string-name>
            <surname>Matyas</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          (
          <year>2005</year>
          ).
          <article-title>Geogames: A conceptual framework and tool for the design of locationbased games from classic board games</article-title>
          .
          <source>Intelligent Technologies for Interactive Entertainment</source>
          ,
          <fpage>164</fpage>
          -
          <lpage>173</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          <string-name>
            <surname>Will</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          (
          <year>2013</year>
          ).
          <article-title>A Pattern Language for Designing Locationbased Games</article-title>
          .
          <source>Diploma Thesis</source>
          , RWTH Aachen University.
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>6 http://leafletjs.com/</mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>