- Host a game.
- Connect to a game over a network.
- Play as an A.I.
- Clone this Repository or Download as a zip.
- Run release/v1/Risk.jar either by double clicking on file or running java -jar Risk.jar
- The java game engine will start and automatically open the game join/host screen in your web browser (shown below):
-
After game setup and all players have joined, game play starts according to the standard rules of Risk.
-
Players to take it in turns to make their move. Below is a screenshot of a player about to make an attack:
-
Responsive design and networking enable the game to be access and joinned from any device on the network with a web browser:
Our task was to implement a ”peer-to-peer world domination game”. We has decided very quickly in favour of the famous board game Risk. We have chosen a version of Risk that is focused on World Domination, therefore the objectives were completely removed from the game except for one: the player who manages to beat all other players is going to be the winner. We also decided that the P2P structure will rely on a known, trusted host implementation and that there will be weekly meetings of groups.
Our implementation aims to provide all the functionality specified in the protocol in Java and JavaScript, using an MVC (Model/View/Controller) pattern. The game engine is built in Java, that allowed for easy unit testing and object orientation, The game engine implements and checks the logic of the game while keeping everything in the network communication separate from here. The back-end of the game relies on Java Sockets for network communication. Both the server and the client are multi-threaded and update the game engine in the background while still keeping a constant flow of network protocol messages. These messages are implemented via separate classes as well to increase decoupling of components in the system.
The front-end appears and runs inside a web browser, in a scalable window, heavily relying on JavaScript and bootstrap. It queries the game state from time to time and sends messages to the game engine. This completes the circle of MVC architecture.
Alex Wilton
Bence Szabo
Ryo Yanagida
Patrick Opgenoorth
Project received a First-class honours classifcation.