invbat

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
invbat [2014/01/28 13:24]
icmu20132 [Communication Architecture]
invbat [2017/07/21 03:08] (current)
Line 11: Line 11:
 The player can choose which clan he wants to belong during his registration. We use his email as primary key for his registration. We also store his Character Data, which contains his level, attributes and such. The player can choose which clan he wants to belong during his registration. We use his email as primary key for his registration. We also store his Character Data, which contains his level, attributes and such.
  
-As of writing, the Core SDDL itself checks the positions of each client sharing their lat-long localization data (upon request of the client) and then tries to match it with battle regions, but we intend to change this strategy on future updates so that the client will be the one handling it's one region matching (more details in the presentation linked below, available only in Portuguese).+As of writing, the Core SDDL itself checks the positions of each client sharing their lat-long localization data (upon request of the client) and then tries to match it with battle regions, but we intend to change this strategy on future updates so that the client will be the one handling it's one region matching (more details in the power point presentation, available only in Portuguese. You can find it in the Documents/ folder on the our git).
 ===== Communication Architecture ===== ===== Communication Architecture =====
  
Line 19: Line 19:
  
 {{ :ubi_t2_arquitetura_final_2.png?400 |}} {{ :ubi_t2_arquitetura_final_2.png?400 |}}
-===== Service API (if exists) ===== +===== Playing the Game ===== 
-Service API (if exists) +To try and play the game, you'll need a Android device with GPS enabled.
-  * ''getService()'Returns Service +
  
-  * ''myMethod()'' Returns Service +Download the Core Server project and the Android Client project.  
 +  git clone https://github.com/stockrt/InvisibleBattlefields.git
  
-===== Service Usage ===== +First you need to start the gateway and Core Server. You should change this local IP address to your own IP Address. 
-How to use the service.+  gateway 127.0.0.1 5500
  
-<file java Hello.java> +Now you only need to open the InvisibleBattlefieldsSDDLCore project and run the Java Application on Eclipse, BattleCoreServer.java. 
-public class Hello + 
-   public static void main(String args[]+Since the actual Android Client wasn't entirely properly tested, we suggest you to run our Test Client, BattleCoreClient.java, to check the communications with the Server. It uses exactly the same listeners and communication strategy as the Android Client. 
-        // Teste + 
-        double x = 2;+You just need to update you IP address onto the client file: 
 + 
 +<file java HelloCoreClient.java> 
 +public class BattleCoreClient implements NodeConnectionListener 
 + private static String gatewayIP = "127.0.0.1"; //update with your IP address 
 +        //....... 
 +   } 
 +
 +</file> 
 + 
 +Finally, if you want to try the Android Client, you need to open the InvisibleBattlefieldsClient project and generate a "apk" file to install on your device (you can also try to run the application directly on a android emulator, but it's not recommended). 
 + 
 +Again, you have to update the IP Address that you'll be using on this specific file: 
 + 
 +<file java CommunicationTask.java> 
 +public class CommunicationTask extends AsyncTask<Void, byte[], Boolean> 
 + private String ipAddress = "127.0.0.1"; //update with your IP address 
 +        //.......
    }    }
 } }
 </file> </file>
  
 +And that's it, you should be able to run the game and communicate with the Core Server now. Since it's a work-in-progress, you probably won't be able to use all game functionalities as of writing.
 ==== Contact ==== ==== Contact ====
  
  • invbat.1390922670.txt.gz
  • Last modified: 2017/07/21 02:51
  • (external edit)