sopra-fs24-group-43 / server

Apache License 2.0
0 stars 0 forks source link

SoPra FS24 Group 43


Introduction

Freitagsmaler is a game where one user draws a word, while the other players try to guess what word they are drawing, similar to games such as Pictionary. Users can either create an account or play as a guest user. In order to play, players must either create or join a lobby, where they can change the game settings, such as number of rounds or turn duration. The guessers see what the drawer is drawing in real time, and can use the chat window to both just chat and guess the word. Once the time has run out or all players have guessed correctly, each player gets points, and at the end of the game a final leaderboard is displayed, showing who won.

This is the repository for the backend part of the implementation. The frontend can be found here.

Technolgies

The backend is written in Java and uses the spring boot framework and gradle to build the application. In order to keep track of the users a JPA repository is used. For server-client communication we use REST API, as well as Websockets, which use the STOMP messaging protocol. The words are given by an external API called Datamuse

High-Level Components

UserService and UserController

These components keep track of and handle all user related tasks outside the game itself. It uses REST to handle requests from the client.

WebsocketController and Game

Once a user joins a lobby, a player is created and added to the game, representing that user. From this point on, Communication is handled through websockets, as many features require the server to send information to the clients unrequested.

Launch & Deployment

Build

./gradlew build

Run

./gradlew bootRun

Test

./gradlew test

Roadmap

Authors and acknowledgement

SoPra FS24 Group 43 consists of Markiian Dobosh, Dominique Heller, Simon Klipp, FLorian Mattmüller, and Robin Stirnimann

Special thanks to our teaching assistant Marco Leder.

License

Apache-2.0 license