Home - eyecuelab/walkertreker GitHub Wiki
Welcome to the Walkertreker wiki!
Last Update: 10/05/2019
This wiki is intended for EyeCue Lab interns working on the Walkertreker project, an app built in React Native for iOS and Android. This wiki only covers the broad scope of the project and all relevant tools to get you developing as fast as possible. If you do not know a technology used, go find their docs and learn! Also, please add to this wiki, or udpate it as needed!
The hope is that if you follow along with this Wiki, step by step, you'll be pretty well off in terms of understanding this project. Check out the walkertrekker-api Wiki for everything about the back-end!
walkertreker
branch called doc-pics
The pictures throughout this wiki are linked to the A Discrepancy to Note:
The spelling for the app's title is variable. Sometimes it is "walkertreker", sometimes it is "walkertrekker". Pay attention to that.
This Wiki Covers:
- Setting Up Your Dev Environment
- How to Serve the App with Expo
- Things to Know about Creating a New Player
- Things to Know about Managing Local State
- Things to Know about ESLint, Husky and PropTypes
- BackgroundFetch and TaskManager
- Something Not Working? Tips & Common Errors
- Debugging
- A List of To-Dos
Current State of Affairs
The big updates in the last internship are the following:
- Upgrade to Expo SDK 35: allows for foregrounded iOS Push Notifications and better background-fetch support
- Background Fetch: is on sdk 35 and 33. Go here for more information on the to-dos, branches, and resources/
Overview of the walkertreker/walkertrekker-api stack
- React Native
- Expo for bootstrapping this React Native project
- Redux, Redux-Persist, Redux-Sagas for State Management
- Socket.io to connect to API
- Heroku
- CronRunner
- Node.JS
- Apidoc
- Postman
Gist of the Game-Play
--> Anywhere there is a question mark means that the statement is uncertain and needs to be verified.
- Player Creates a character, inputting name and phone number. Clicking submit creates a player object in the database. An ExponentPushToken is assigned, and there is only one per phone (not per phone number).
- Player sets up a Campaign that has variable difficulty options
- Player invites friends via selecting from a list of their contacts generated in the app. Those selected phone numbers are sent a text. See #18.
- Friends follow text link to download app, create a player and join campaign
- Host of campaign starts the campaign. Need at least two, but up to five? players to start
- There are step goals for each day
- If you meet the step goal, you make it to the Safehouse
- If you make it to the safehouse with extra steps, you can use them to scavenge for food, medicine or weapons. You step-goal is increased
- If you do not make it to the safehouse, your health is damaged, and maybe so is your teammates? Your step-goal is decreased.
- You have a health and hunger level. Hunger goes down every hour (see CronRunner). Health goes down from random events / not making it to the safehouse.
- This a team-oriented game, so if one team mate does not make it to the safe house, everyone is hurt(that needs to be double checked). All the inventory is shared. When a random event happens, each player makes a vote, then an event result is sent out with the tally of everyone's votes and the outcome.
- Heroku's CronRunner sends out events every day, if not multiple times a day: reduce hunger, random event, result of random event, end of day update.
- Reduce Hunger happens every hour. See CronRunner and the api.
- The number of Random Events occur depending on the difficulty level of the game you select? Typically they happen once a day. CronRunner sends out the random event, and 15 minutes later sends out the result of the random event. The player receives a push-notification with the random event. If they do not open the push notification the random event does not happen for them. It is fine if a player does not vote. There is an event participation reading in the event stats section of the campaign summary. The result of the random event shows what the group voted to do. If no one votes, the result describes that in its text. The result of a random event can include reduced health, reduced hunger?, and gaining or losing weapons/food/medicine.
- The events drive participation and investment in the game. And until the background fetch for getting step counts is implemented, it is a way to get the player to open the app so that their step counts can be recorded. For example, if a player does walks all day long and meets their step goal, but doesn't open the app, the program will not record that they have made it to the safehouse. That's why background fetch of steps is important.
- A player dies when their health is exhausted?
- The trigger and process and UI for ending the campaign (whether losing or winning) is not clear to the interns who wrote this wiki. The code exists, but it has not been check out and the impression is that it needs to be checked out.
- The player has an option to leave the campaign during the staging, but the host does not. There is no option at all for leaving the campaign after it has started.
- The player can recover their account if they somehow lose access.
- The account recovery and the player invite are done via a redirect link that Kim set up. This redirect is used only in development. It appears to work on Android, but not iOS. Look in the walkertrekker-api wiki for more information about the redirect and how to use it.