treasure_hunter

Treasure Hunter

Treasure Hunter is a Location Based game focused on exploring the location context information of mobile phones. The game is inspired by the Geocaching concept, games that participants use Global Positioning System (GPS) to hide physical space items and use digital devices to seek them. In our game, we adapted this concept to implement logical items instead of physical items, that is, items are not physical present in the place but buried logically in that location.

We made some small adaptations for the Geocaching idea. First, we renamed the hide and seek activates as burying and hiding respectively, to fit better the Treasure Hunter domain. Contrary to other Geocaching games, only administrators can bury treasures. Also, in other games the treasure is located by a single latitude and longitude location, in our application the treasure is delimited by a polygon in the space. A user will discover the treasure if his device is within the polygon of the location where the treasure was buried.

Treasure Hunter uses multiple technologies to provide the Geocaching in different platforms, such as mobile, web, and desktop. However, all these platforms uses the SDDL infrastructure to communicate, precisely using the ClientLib + MRUDP protocol. The overall architecture is illustrated by the side Figure.

The core application combines Complex Event Processing (CEP) technologies with the SDDL infrastructure to store and match treasures with user locations. By mapping our domain logic to Esper rules, a CEP implementation, we were able to scale up to 3 000 000 (three millions) treasures in a single machine. We customized Esper rules to include a custom function, named pointsInsidePolygon(user, treasure), that can be used in CEP Rules. This function returns true when the user is inside the treasure region or false otherwise. We also developed a Shell, illustrated by the Figure below, that receives bury, dig, and list commands.

The Android application uses the ClientLib protocol to send Dig Requests with the user location. These requests are generated when the user presses the Dig button. The request retrieves the user location using GPS or Network Location. The asynchronous nature of the protocol, facilitated the development of application, since Android does require and enforce applications threads to run and return to the system as quick as possible. The Figure below show a screenshot of the Android Application.

Finally, we developed a web application to manage the treasure hunter maps. We used the Play Framework, which combines Java and Scala to develop the web administration tool. We enhanced the tool with Google Maps library to display the location and map for administrators. Using the map, the administrator can graphically click and form the treasure to polygon. The Web application is shown below.

Download the Source Code from the github page. The source code can be obtained in the following github repo:

git clone https://github.com/marcosroriz/TreasureHunter.git

Execute the Gateway application

java -jar GatewayTest IP Port

Execute the TreasureHunterCore application

java -jar TreasureCore

Execute the TreasureHunterWeb application

cd TreasureWeb
play run

Execute the TreasureHunterAndroid application

adb install ThreasureHunterAndroid
  • treasure_hunter.txt
  • Last modified: 2017/07/21 03:08
  • (external edit)