This is an application that the player uses to play the game. The player will read a broadcasted video stream from the game engine, and send the player's keyboard and mouse inputs to the game engine via this application.
You need:
- Python 3.5
- pygame 1.9.2
- numpy 1.8
- OpenCV 3.1.0
Ensure that the above dependencies are obtained for Python 3. We use the above mentioned versions during development. Other versions may work, but not guaranteed.
- We recommend downloading the Anaconda distribution for Python 3. It is a prepackaged version of Python that sets up all required system environment variables for you, and no configuration is needed (it is a simple
.exeinstaller). - You can download Anaconda here. Ensure that you download Python 3.X.
- Obtain the .whl file for your Python version here. There are 32-bit and 64-bit files, so make sure you get the version that matches your installation of Python.
- Open the terminal, and navigate to where you placed your .whl file. Type
pip install filename.whl, replacing the filename with the correct one.
- Open your terminal at the root of the repository directory.
- Type
pip install -r requirements.txt.
- Obtain the .whl file for your Python version here. There are 32-bit and 64-bit files, so make sure you get the version that matches your installation of Python.
- Open the terminal, and navigate to where you placed your .whl file. Type
pip install filename.whl, replacing the filename with the correct one.
To run the thin client itself, you will need to pass in 3 arguments: the IP from which to receive the video stream from, the port number, and the player controller ID. The fourth argument (game session ID) is optional, and will default to 1 if not given.
Example:
Using all 4 arguments:
python main.py 127.0.0.1 30000 0 --session 1
Using only 3 arguments:
python main.py 127.0.0.1 30000 0
However, if you are an end user, you do not need to launch the thin client manually on your own. The thin client should be launched automatically by Cloudy Launcher when you want to play a game.
Press ESC to unlock the mouse cursor from the window.
To run the tests, navigate to the root folder of the repository (..\CloudyGameThinClient\).
Then, type the following:
python -m unittest discover
This is an application that allows users to access and manage games available to them.
You need:
- JavaFX 2.0 or newer
- Already included in the Java Development Kit (JDK)
- Java SE 8.0 or newer
- Download the Java Development Kit (JDK) here.
- Accept the License Agreement, then download the correct version for your computer.
- You will need to add the Java
bindirectory into the system environment variables.- If you downloaded the 64-bit version, the
bindirectory should be found atC:\Program Files\Java\jdk1.8.0_73\bin. Your JDK version may be different. - If you downloaded the 32-bit version, the
bindirectory should be found atC:\Program Files (x86)\Java\jdk1.8.0_73\bin. Your JDK version may be different. - If you need help on how to add a system environment variable for Windows, please read this guide here.
- If you downloaded the 64-bit version, the
- JSON dependency
- Can be obtained from here
- Version used in development: 20151123
- Place it in the same directory as the
.javafiles
- SimpleCaptcha dependency
- Can be obtained from here
- Download SimpleCaptcha for Java 6
- Place it in the same directory as the
.javafiles
Ensure that the required dependencies are in the same directory as the java files. For Windows, simply run the file "make.bat". For Mac/Linux, simply run the file "make.command".
Otherwise, see the following sections on how to compile and run it manually.
Include the JSON .jar file and the SimpleCaptcha .jar file in the classpath
(separate the .jar files using : for Linux/Mac and ; for Windows):
Linux/Mac:
javac -cp path/to/json/jar/file:path/to/captcha/jar/file *.java
Windows:
javac -cp path/to/json/jar/file;path/to/captcha/jar/file *.java-
Example command for Windows:
Assuming that you have placed the
.jarfiles together with your.javafiles, type:javac -cp json-20151123.jar;simplecaptcha-1.2.1.jar *.java
-
Example command for Mac/Linux:
javac -cp \* *.java
Include the JSON .jar and the SimpleCaptcha .jar in the classpath:
Linux/Mac:
java -cp .:path/to/json/jar/file:path/to/captcha/jar/file CloudyLauncher
Windows:
java -cp .;path/to/json/jar/file;path/to/captcha/jar/file CloudyLauncher-
Example command for Mac/Linux:
java -cp .:json-20151123.jar:simplecaptcha-1.2.1.jar CloudyLauncher
or simply type
java -cp .:\* CloudyLauncher(only for Mac/Linux) -
Example command for Windows:
java -cp .;json-20151123.jar;simplecaptcha-1.2.1.jar CloudyLauncher
Cloudy Launcher communicates with CloudyWeb to obtain its user and game information. As such, Cloudy Launcher has to be configured properly with the URL of the CloudyWeb server.
To do this, open CloudyLauncherServerInterface.java. The URL can be found on line 44:
39 /**
40 * Constructor for a CloudyLauncherServerInterface object. Url will default
41 * to the deployed CloudyWeb if not specified.
42 */
43 public CloudyLauncherServerInterface() {
44 baseUrl = "http://127.0.0.1:8000/";
45 }If CloudyWeb is deployed locally (i.e. you would like to run the entire CloudyGame project on a single computer), you can set the baseUrl to http://127.0.0.1:8000/.