Gradlefall is an Android game built to for the software architecture course, TDT4240, at NTNU.
The game is a multiplayer, networked, competitive game. Inspiration is taken from the game Towerfall. Each player starts in a corner of a small arena. The players all have a visually different appearance. They have a finite amount of projectiles, and the goal is to shoot the other players.
Get the latest packaged files from releases
Run the server with java -jar server-1.0.0.jar
.
You can enable an experimental physics GUI with environment variables like this:
DEBUG_PHYSICS_GUI_ENABLE=true java -jar server-1.0.0.jar
Run the desktop client with java -jar desktop-1.0.0.jar
.
You can change the server ip with environment variables like this:
SERVER_IP=localhost java -jar desktop-1.0.0.jar
Run the android app by downloading it on a phone or via adb: adb install android-debug.apk
. It may need to be signed and zipaligned.
Run the application cool-game
from your launcher.
Install the Checkstyle-IDEA
plugin in intellij:
Settings
>Plugins
>Browse Repositories...
- Search
Checkstyle-IDEA
and install - Restart Android Studio
Settings
> SearchCheckstyle
, pickOther Settings
>Checkstyle
- Add configuration file:
+
- Description:
Project xml
Local file
>Browse
>/game/config/checkstyle/checkstyle.xml
Store relative to project location
Next
untill done
- Description:
- Select the newly added xml file
Enable checkstyle as code style:
Settings
>Code style
>Java
- Click the Cogwheel >
Import Scheme
>Checkstyle
>/game/config/checkstyle/checkstyle.xml
- Rename the style (Cogwheel >
Rename
) to Checkstyle OK
Running checkstyle manually with gradle:
- Open gradle menu
- Run
checkstyleMain
task
Copy the file /game/config/gitHooks/pre-commit
to /.git/hooks/
Alternatively, enable Run checkstyle
checkbox in Android Studio commit dialog.
Lombok can generate code with annotation processing: it reads your source code and writes code.
We use it to generate
private static final org.slf4j.Logger log = org.slf4j.LoggerFactory.getLogger(ServerMain.class)
by adding @SLF4J
before the class definition:
@Slf4j
public final class ServerMain {
// ...
}
Installing lombok:
Settings
>Plugins
>Browse Repositories...
- Search for
Lombok
- Install and restart Android Studio.