Second part of the Advanced Techniques in Videogames course project.
These instructions will install the system in your local machine.
-
Install Maven:
$ brew install maven
$ sudo apt-get install maven
-
Clone or download source code:
$ git clone https://github.com/juanmbellini/game_rooms.git
or
$ wget https://github.com/juanmbellini/game_rooms/archive/master.zip
-
Change working directory to project root:
$ cd game_rooms
-
Install project modules:
$ mvn clean install
-
Create jar files:
$ mvn clean package
The system can be run executing the built jar. Run the following command in the console:
$ java -jar <path-to-jar>
If nothing was changed in the pom.xml
file, and the output directory is the default, the path to the jar will be <PROJECT-ROOT>/target/game-rooms-1.0.0.RELEASE.jar
, so the way to run the system is:
$ java -jar <PROJECT-ROOT>/target/game-rooms-1.0.0.RELEASE.jar
You can customize the execution of the system including some options. The following sections will explain them.
To print the usage message, include the -h
or --help
options. For example:
$ java -jar <PROJECT-ROOT>/target/game-rooms-1.0.0.RELEASE.jar --help
To select the server hostname (i.e the binding address), include the -H
or --host
options.
You can use an IP or a name (for instance, localhost
).
For example:
$ java -jar <PROJECT-ROOT>/target/game-rooms-1.0.0.RELEASE.jar -H 192.168.1.10
The default value is localhost
.
To select the server port, include the -p
or --port
options.
You can set it to 0
to let the operating system choose for you.
For example
$ java -jar <PROJECT-ROOT>/target/game-rooms-1.0.0.RELEASE.jar -H 192.168.1.10 -p 8000
The default value is 9000
.
The system exposes a REST API through which you can communicate. Please refer to the Endpoints
file to learn how to operate with it.