Humans Vs. Zombies Radar

Introduction:

Humans Vs. Zombies (HvZ) (https://humansvszombies.org/) is a widely popular game similar to tag. In the game there are two ‘teams’, the humans and the zombies.  The goal for humans is to maintain their status as human for as long as possible to ‘starve’ the zombies.  The zombies goal is to turn all the humans into zombies and to not ‘starve’.  Zombies are starved and leave the game if they go more than 24 hours without ‘killing’ tagging a human.  A player is identified by wearing a bandanna. Humans wear the bandanna around an arm and zombies on their forehead.

I took inspiration from video games, particularly the first person shooter genre, where sometimes a enemy/friendly radar system is in place.  This system provides you information about where other players are who are in you vicinity.  This project brings this idea to HvZ, by using players phones to find the GPS location and present the locations of other players in your area.

Process:

Technologies:

The Setup and Code:

If you do not already have them setup and/or installed, download and install Android Studio and get an account for Firebase.  In Firebase you should create a new app (database) with a top level child ‘users’, which has children with userIds for names and have their own children for Latitude, Longitude, User Id, and a Zombie flag.  This is the setup assumed by the Android app.  The Android app consists of 4 classes, the Activity; ‘FirebaseManager’, ‘CurrentLocationManager’, and a Player Data Object.  These each handle the map, talking to Firebase, the GPS, and data manipulation respectively.  The code for the entire project (except for the name of my Firebase database) can be found here: https://github.com/driabwb/HvZTracker .

Status:

The application at present detects, via a device’s GPS, the approximate location of the device and reports that information to the Firebase database along with other player information such as whether they are a zombie and their username.  The application also retrieves and subscribes to the information other users’ apps send to the database and displays that information on the on screen map with the device’s location.  On the map the device location is marked with a yellow flag, zombies are marked with red flags, and humans are marked with blue flags.  Also drawn on the map are 3 circles at radii of 100, 150, and 200 meters to give the user a reference for how close other players are.

Known Bugs:

The application, as of March 9, 2016, has 1 known bug.  This bug relates to manual changes in the database via the Firebase web interface.  When a data field for a player is updated manually this causes the application running on another device to crash.  The expected reason for the crash is that the app assumes when an update is sent is is for an entire single user, so when only one part is updated and sent to the app it crashes failing to parse the data correctly.

Future Work:

  • Add a menu system for updating zombie status
  • Add fields for other statistics for HvZ
  • Add the ability to report kills
  • Filter what users data is displayed by locality
  • User testing
  • Expand the system for other applications
Advertisements
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s