Coder Social home page Coder Social logo

map-game's Introduction

MAP GAME

Designed and written by AJ Fite [email protected] for CSC436 Spring 2018

This is the early beta of Map Game, a Pokemon Go/Old Foursquare/Ingress style augmented reality game. The player travels around the real world checking in at locations to gain points and ownership over virtual locations corresponding to real world points of interest.

Known Issues and Caveats

  • Only Google based authentication is available
  • The app is targeted at iOS 10.3 as that is what my test device is capable of.
  • Game only has functional data for the Western Continental United States (All states to the west of and including Montana, Wyoming, Colorado, and New Mexico)
  • The Stats and Info page has 2 unimplemented features: A gallery of recent check in images and a list of places the player currently owns. The data is available in Firebase but I ran up against time constraints and didn't have time to implement the logic to retrieve it.

Future Improvements

To make the app "production ready" there are a number of things that would need to change

  • Currently much of the database management is done in app, this is great for practicing Swift and iOS, but not so great for later updateability or changing the backend. I'd like to migrate a lot of the current in app database management to be behind a REST API
  • Needs more authentication options

APIs Used

  • iOS GPS
  • MapKit
  • CoreLocation
  • Firebase Authentication
  • Firebase Database
  • Firebase Filestore
  • Firebase Geofire
  • Firebase Cloud Functions (see the FirebaseCloudFuncs directory)
  • iOS Camera

Location Data

Locations are exported from OpenStreetMaps data dumps using their osmosis client and the following command:

osmosis --read-pbf file="us-west-latest.osm.pbf" --nkv keyValueList="amenity.townhall,amenity.library,amenity.school,amenity.university,amenity.hospital,amenity.fountain,amenity.theatre,amenity.animal_shelter,amenity.clock,amenity.courthouse,amenity.fire_station,amenity.post_office,amenity.police,amenity.ranger_station,natural.peak,natural.volcano,natural.beach,natural.cave_entrance" --tf accept-nodes name=* --wx "filtered.xml"

The XML output of this command can be found here

This XML file was then run through a simple PHP script:

<?php
ini_set('memory_limit', '3G'); // or you could use 1G

$xml = simplexml_load_file("basedata.xml");
$json = json_encode($xml);

echo $json;
?>

Creating the output JSON for Swift to parse (since it was easier than learning XML parsing in Swift) and then store in FireBase. The end result can be found here.

map-game's People

Contributors

ajfite avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.