Snippet Hunt is a simple augmented-reality game played on a Google Map.
The user explores a map of the local world and interacts with items overlaid on the map.
The game uses MarkLogic Server as a database, NodeJS for server-side scripting, and jQuery and the Google Maps JavaScript API v3 for client-side scripting.
A web browser with HTML5 geolocation capabilities is require to play (e.g., new versions of Chrome, Firefox, Safari, or IE).
Collecting snippets and MarkLogic executives scores a player points.
- Install MarkLogic Server and Node.js.
- Start MarkLogic Server.
- Set up a MarkLogic database named
argame
using the default settings. You can do this at:http://localhost:8000/appservices/
- In the
argame
database, set up an Element Range Index forexp
property. - Set up a REST server for the
argame
database on port8077
. You can do this at:http://localhost:8000/appservices/
- Set up a MarkLogic user that has
rest-admin
privileges. - Open
config-sample.js
and enter the server settings for your environment. Save the file in the root directory asconfig.js
. - In the root directory, run
npm install
to load Node.js dependencies. - In the root directory, run
node options
to define search options for the REST server. - Install bower with
npm install -g bower
. In the root directory, runbower install
to install browser dependencies. - Set the Node.js environment variable:
export NODE_ENV=[DEVELOPMENT|PRODUCTION]
- Install grunt with
npm install -g grunt-cli
. In the root directory, rungrunt
to build the application. - In the root directory, run
node server
to start the NodeJS to start the application. - In a web browser, open the project:
http://localhost:8066
- When the browser asks for permission to access location information, allow it.