This is a online, GPS-based, team and singleplayer game. Adapted for mobileusage. Hack ATM's and earn experiance and bitcoints.
-
geolocation.js
-
googlemaps.js
-
map.style.js
-
user.js
-
ui.js
- game.js
-
socket.on('init-quest-positions', this.onInitQuestPositions.bind(this));
- When the user receives quest positions from node.
-
socket.on('start-quest', this.onPlayerStartedQuest.bind(this));
- When a player starts a quest (changes markers).
-
socket.on('quest-ended', this.onQuestEnd.bind(this));
- When a player ends a quest (changes markers).
-
socket.on('cooldown-ended', this.onCoolDownEnd.bind(this));
- When the cooldown ends for a quest (changes markers).
-
socket.on('logon', this.onTeamLogon.bind(this));
- When a player logs on. Emited from the client when loged on, gets response from node if player is in the same team.
In ui.js in the initDOMEvents function.
- events.js
- positions.js
- server.js
- sockets.js
- app.js
Add the event in events.js in the events object. Then include it in the initConnectionAndEvents function in sockets.js and pass it the socket as a parameter.
- Composer
- PHP & MySQL or alt. Vagrient/other envirement (LAMP/MAMP etc)
- npm install
- React
- Env-file
cd ./apple/PHP/
- Edit the .env-file
sudo nano .env
- Add the db-credentials
- Run the command:
php artisan key:generate
to generate a uniqe key for your envirement. - Install dependencies:
composer install
npm install
npm run dev
- Create database:
- php artisan migrate
- For connecting with the Node server (Socket.io) change the url in
resources\assets\js\game.js
- To configure the port edit
server/app.js
, currently is8080
- Run
npm install
to install dependencies - To start the server, run
npm start
Visit the page with the https://
-protocol.