Game development for devoxx 2015. This is the main repository for the whole server code. Typically, you would want to grap the code and launch the server. To add an extension, you should not modify anything but the ext submodule.
A local git repository with a correct configuration (cf . documentation )
The server for the game can run standalone. You can either run it using the built version or build yourself from sources.
You can download the generated version from our Jenkins: survival-game.war.
NOTE: Please note that the domain jenkins.devoxx.sii.fr
pointes to our local machine where Jenkins is installed, you may not have access to it from outside our local network.
Create a folder for your workspace. For instance devoxx-2015
and cd into it.
mkdir devoxx-2015 && cd $_
In order to get a clean local repository, you should type something similar to:
devoxx-2015> $ git clone https://github.com/groupe-sii/devoxx-2015-game-back
The server repo will be cloned in a folder devoxx-2015-game-back
unless you give it another name.
Our server comes with a spring-boot standalone integration. Spring-boot will just check for the server artifacts in your local maven repository. So you just need to type :
devoxx-2015/devoxx-2015-game-back> mvn clean install
The WAR file only provides the logic of the game but not the extensions. You now need to get the sources of extensions and follow these instructions to build them.
The WAR can be run either in an existing web server or directly as Java application. The recommended way is to run as Java application.
You can run the WAR file with the generated JAR for extensions by executing the following command:
devoxx-2015/devoxx-2015-game-back> cd ..
devoxx-2015> java -Dgame.extensions.path=devoxx-2015-game-back-ext/target/survival-extensions-0.0.1-SNAPSHOT.jar -jar survival-game-0.0.1-SNAPSHOT.war
We assume that the downloaded WAR and the sources of extensions are in the same folder.
You can use the maven plugin provided by Spring Boot to help us running the server. You'll need to run from the survival-game directory :
devoxx-2015/devoxx-2015-game-back> cd survival-game
devoxx-2015/devoxx-2015-game-back/survival-game> mvn spring-boot:run
To view the client, you need to either build it from sources or directly download the generated zip.
If you don't want to create front extensions, you can simply download the client. Then you have to configure your HTTP server (Apache for example) to serve the static html page.
NOTE: Please note that the domain jenkins.devoxx.sii.fr
pointes to our local machine where Jenkins is installed, you may not have access to it from outside our local network.
To see the game running, you need to download the web client game.
When you create your own extensions by following this guide, the server doesn't need to be restarted. It will automatically detect changes and reload your extensions.
Feel free to take a look at the different javadocs :
- Main module and game API : http://game.javadoc.devoxx.sii.fr/core/
- Game extensions API : http://game.javadoc.devoxx.sii.fr/extensions/
- Provided WebSocket interface for GUI clients : http://game.javadoc.devoxx.sii.fr/web/