A simple React Native / Expo project - clone of a popular Truth or Dare game. Free to edit and use. You may use it to create your own Android and/or iOS app with similar or same rules.
- You need Expo on your computer and a mobile app on your smartphone.
- To run it locally use
expo start
, scan the QR code with the app installed on your smarthpone and you're good to go (more details in the links above). - To export it as an installable app check out this page.
If you want to fork the repository or make any pull requests - do it. Below you can find some information about the crucial places in code and the simple changes that may help you adjust the application accordingly to your needs.
Go to App.js and edit the values for name
keys in the PLAYERS
object.
Go to App.js and edit the numeric values in the _getDrink
function.
Check out TruthBase.js and DareBase.js.
Go to ColorsContants.js and edit constants' hex values.
Modify the icon and splash files.
Go to Common.js, add new gender constants and extend the SEX_ARRAY
(you may also change the constant name).
You might as well want to change the PLAYERS
object in the App.js accordingly.
It was supposed to be a quick, simple project and connecting to and managing the database would require more time to do it. If you want to fork the project and add database related code - just do it. Right now all the values are stored as constants in the code and it does not seem to affect the application responsiveness.
The PLAYERS
object in App.js contains hard coded names and sex values. You might want to add a starting screen
from which the user chosen data would be passed as a similar object to the main game component.
In the best case scenario the PLAYERS
object in App.js would have to be extended or proper fields would have to be added
to the name/sex choice screen (see the point above).
In the worst case scenario additional changes would have to be made in other places in the code (tested only for 2 players).
MIT