PHP game server for TerranQuest. https://terranquest.net

Skylar Ittner 23d2728449 Set Medoo version (TODO: refactor server for new version) 5 months ago
admin 51accc3575 Add admin panel system alert chat broadcasts 8 months ago
lang 1c557b7d83 Add place artifacts (See issue TerranQuest/1) 8 months ago
nbproject 89fb2fc69b Add private messaging (closes #8), add more formatting options to chat 1 year ago
.gitignore 1ab5de66d9 places.php now has owner data, players can be kicked with a message 1 year ago
.htaccess 8354fc75e5 Add i18n 11 months ago
README.md 047410610d Update readme 1 year ago
artifactplace.php 1c557b7d83 Add place artifacts (See issue TerranQuest/1) 8 months ago
attackplace.php 9f1e642a47 Add "levelup" boolean to output of *place.php 11 months ago
buyitem.php 8354fc75e5 Add i18n 11 months ago
capturemunzee.php 30478a4dd0 Fix bug where we didn't actually save the new token after a Munzee 1 year ago
chat.php 22bb8c52ea Forgot to remove some debug output 1 year ago
claimplace.php 9f1e642a47 Add "levelup" boolean to output of *place.php 11 months ago
cluster.php 89fb2fc69b Add private messaging (closes #8), add more formatting options to chat 1 year ago
code2item.php ce5493823c Add artifacts to database 8 months ago
composer.json 23d2728449 Set Medoo version (TODO: refactor server for new version) 5 months ago
composer.lock 89fb2fc69b Add private messaging (closes #8), add more formatting options to chat 1 year ago
database.mwb ce5493823c Add artifacts to database 8 months ago
dbsettings.php 1c356dbe87 Tons of changes, enforce valid login for some API actions 1 year ago
deletesession.php e9a0695462 Add deletesession.php 1 year ago
favicon.ico aca8c3b900 First Commit 1 year ago
geocaches.php 1c356dbe87 Tons of changes, enforce valid login for some API actions 1 year ago
getbadges.php 1c356dbe87 Tons of changes, enforce valid login for some API actions 1 year ago
getstats.php 3e63bab9d7 Add kick code to getstats.php 8 months ago
getterrain.php 1c5483b3c2 getterrain.php output variable names now same as GIS API output. (issue #3) 1 year ago
getweather.php 31881d5e69 Move weather fetching and cache handling to weather_inc.php 1 year ago
giveitem.php 8354fc75e5 Add i18n 11 months ago
index.php fd77176765 Change stuff, add Dockerfile (not ready yet) 1 year ago
inventory.php 1c557b7d83 Add place artifacts (See issue TerranQuest/1) 8 months ago
latlong_validate.php 3cc5cd9374 Move lat/long validation to seperate file, add terrain data from gis 1 year ago
login.php 1c557b7d83 Add place artifacts (See issue TerranQuest/1) 8 months ago
maptileurl.php 02f50b551d Stuff 1 year ago
minclientversion.php 5aa60659bd Add minimum client version check code 1 year ago
munzee.php 3f4756b4d5 Remove munzee.log debugging 11 months ago
nearby.php d816b6846d Add nearby players list 1 year ago
onlyloggedin.php 8354fc75e5 Add i18n 11 months ago
ping.php 8354fc75e5 Add i18n 11 months ago
places.php 1ab5de66d9 places.php now has owner data, players can be kicked with a message 1 year ago
placestats.php f4a03dfb40 Fix artifact count bug 6 months ago
privmsgs.php 0edb67e935 Add sending private messages without appearing in global chat 1 year ago
processiap.php 8354fc75e5 Add i18n 11 months ago
refillplace.php 1c557b7d83 Add place artifacts (See issue TerranQuest/1) 8 months ago
required.php 80c35c93f0 Add case for "en-US" 11 months ago
response.php 3cc5cd9374 Move lat/long validation to seperate file, add terrain data from gis 1 year ago
robots.txt 1c356dbe87 Tons of changes, enforce valid login for some API actions 1 year ago
setteam.php 8354fc75e5 Add i18n 11 months ago
settings.template.php 89fb2fc69b Add private messaging (closes #8), add more formatting options to chat 1 year ago
shopitems.php 2da7ba44af Add in-app purchases 1 year ago
type_grid.php 6d13916c23 Attack strength now decreases far away from a location (closes #6) 1 year ago
useitem.php 8354fc75e5 Add i18n 11 months ago
weather_inc.php 6d13916c23 Attack strength now decreases far away from a location (closes #6) 1 year ago

README.md

TerranQuest Game Server

This is the server code for TerranQuest. See the TerranQuest game code for examples on how to interact with this server.

The server runs on a standard LAMP server. MariaDB is recommended.

To work with the database, download MySQL Workbench and open the database.mwb file. You can export the SQL create code from there.

Setup

  1. Have a standard LAMP server.
  2. Clone this repo into the webroot.
  3. Run PHP composer to make sure all the dependencies are installed.
  4. Create a SQL database.
  5. Copy settings.template.php to settings.php.
  6. Add the correct settings to settings.php:
    • Plug in your database settings.
    • Contact us for an API key for the GIS API. The GIS server has a global database of places and terrain. You could roll your own, but it's a lot to work with (30GB database and counting).
    • Add API keys for third-party services. You'll probably have to disable Munzee in the code2item.php file, as they don't give everyone capture permissions for their API. The DarkSky weather API is free for 1000 queries a day at darksky.net/dev (no credit card needed). The MapQuest key is for adding location search on the admin panel, if you don't need that don't use it. Ignore the Geocache key, it's not doing anything. Same for the Google Play key, that's only for validating Android in-app purchases.
    • Set an admin username and password, otherwise the admin interface won't work.
  7. Go to yourserver.com/admin and login. If everything works, you should be good to go.
  8. On the login screen of the app, tap the gear and type your server URL.

Codacy Badge