Skip to content

Commit

Permalink
Fix and improve README
Browse files Browse the repository at this point in the history
  • Loading branch information
albinekcom committed Jul 13, 2016
1 parent 346ad07 commit c8203e6
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@

## iOS device as game controller
![Alt text](Assets/controller.png?raw=true "controller")
Clone this xcode project and run on your iphone / ipad, this app actually perform a web server that tells your chosen location, your location will be wherever the poke ball is, so you may drag the map of press the buttons.
Clone this Xcode project and run on your iPhone / iPad, this app actually performs a web server that tells your chosen location, your location will be wherever the poke ball is, so you may drag the map of press the buttons.

```js
{ "lng": "114.132530212402", "lat": "22.3636264801025" }
```
{"lng":"114.132530212402","lat":"22.3636264801025"}
```
This is what the app response via port 80 by http, so be sure to connect the iphone / ipad to your wifi network in order to gain access.
This is what the app response via port 80 by http, so be sure to connect the iPhone / iPad to your WiFi network in order to gain access.

## Get controller message
```python
Expand Down Expand Up @@ -47,21 +47,21 @@ def start():

start()
```
Edit readAndChangeXML.py ,change the urlopen address to your controller's ip and write to somewhere your gpx file you want to put. Be sure you remember where the gpx you put :)
Edit `readAndChangeXML.py`, change the `urlopen` address to your controller's IP and write to somewhere your `gpx` file you want to put. Be sure you remember where the `gpx` you put. :)

![Alt text](Assets/receiver.png?raw=true "controller")
If running normal, at console you should see something like this when your drag the map or press the buttons on your game controller.

## Simulate location to target device
![Alt text](Assets/blankProject.png?raw=true "controller")
Create a blank single page app with your Xcode. Remember where you put the gpx file? Import the gpx file to your project without copying it, just referencing.
Create a blank single page app with your Xcode. Remember where you put the `gpx` file? Import the `gpx` file to your project without copying it, just referencing.

![Alt text](Assets/xcodeSimulate.png?raw=true "controller")
Run this project on your iOS device that will actually run the Pokemon Go game, when running, at Xcode you will see a button to simulate location, so you see the option of your gpx file. Our next step is to constantly press this two buttons to simulate your location constantly and automatically.
Run this project on your iOS device that will actually run the Pokemon Go game, when running, at Xcode you will see a button to simulate location, so you see the option of your `gpx` file. Our next step is to constantly press this two buttons to simulate your location constantly and automatically.

http://stackoverflow.com/questions/4230867/how-do-i-simulate-a-mouse-click-through-the-mac-terminal/26687223
By this, we can simulate a / some / lot of click(s) programmatically
```
```shell
gcc -o autoClicker autoClicker.m -framework ApplicationServices -framework Foundation
```
compile the autoClicker.m with gcc at terminal.
Expand Down Expand Up @@ -92,13 +92,13 @@ def start():

start()
```
So change the x,y location of your xcode's simulate button. LOL don't ask me your x,y, find it and test it by yourself, to have it easy when adjusting your x,y, you may set the sleep time longer among loops :) more tip: the loop will stop if you close the game controller as it looks for the active state on game controller, so please change the urlopen address here too with your game controller's ip.
So change the x,y location of your Xcode's simulate button. LOL don't ask me your x,y, find it and test it by yourself, to have it easy when adjusting your x,y, you may set the sleep time longer among loops :) More tip: the loop will stop if you close the game controller as it looks for the active state on game controller, so please change the `urlopen` address here too with your game controller's IP.

## Overall flow
1. you provide location data on game controller
2. receive it and generate gpx file constantly when you move
3. blank project referencing the gpx and simulate on your playing device
4. auto click the xcode buttons constantly
2. receive it and generate `gpx` file constantly when you move
3. blank project referencing the `gpx` and simulate on your playing device
4. auto click the Xcode buttons constantly

# Have Fun!
![Alt text](Assets/finalResult.png?raw=true "final result")
![Alt text](Assets/finalResult.png?raw=true "final result")

0 comments on commit c8203e6

Please sign in to comment.