Manhunt is a mobile, multiplayer web application that reimagines classic hide-and-seek for the smartphone era. By blending real-world movement with battle‐royale–style dynamics, it brings back a nostalgic childhood game in a modern, enhanced form—making playing outside fun again.
Players join or create a game as either Hunter or Hider, then physically move within a geo-fenced play area that dynamically shrinks. Strategic power-ups—* Reveal* (briefly expose all players) and Recenter (shift the game center)—add tactical depth. All clients remain tightly synchronized—sharing GPS positions, player statuses, and a server-anchored countdown—to ensure fairness and eliminate boundary or timing disputes.
Motivation
- Rekindle the joy of a nostalgic outdoor game with modern technology
- Solve childhood hide-and-seek frustrations (lost players, boundary disputes, unfair starts)
- Encourage physical activity, social interaction and strategic thinking
- Offer quick, repeatable rounds with clear rules and engaging mechanics
- Foundation: Java & Spring Boot
- Data Persistence : JPA (Hibernate)
- Build Tool: Gradle
- Database: H2 (in-memory database)
- API Architecture: RESTful Web Services
- Testing: JUnit, Mockito
- Deployment: Google Cloud
-
Controllers
- Role: Handle incoming HTTP requests and route them to the appropriate service methods.
- Correlations:
- Call Service methods to perform business logic.
- Uses DTO Mappers to convert between DTOs and entities.
- Convert entities returns from Services in API-responses.
- Forward errors from Services to HTTP-Status codes.
- Main File: GameController
-
Services
- Role: Implement core business logic and game mechanics.
- Correlations:
- Use Repositories to interact with the database.
- Called by Controllers to process requests.
- Manipulate and transform Entities objects based on the business logic.
- Throw errors that are caught by Controllers and converted to HTTP-Status codes.
- Main File: GameService
-
Repositories
- Role: Provide data access interfaces for the database.
- Correlations:
- Called by Services to persist and retrieve data.
- Return Entities objects to Services.
- Provide query operations called by Services.
- Main File: GameRepository
-
Entities
- Role: Define the application's data model and its relationships.
- Correlations:
- Used by Repositories for Database queries.
- Manipulated by Services to implement business logic.
- Transformed by DTO Mappers to create Data Transfer Objects for Controllers.
- Include relationships to other Entities.
- Main File: Game
-
DTO Mappers
- Role: Convert between Data Transfer Objects and entities.
- Correlations:
- Used by Controllers to transform incoming requests into entities and vice versa.
- Allow Services to work with entities.
- Protect Entities from direct exposure to the API.
- Main File: DTOMapper
Prerequisites
- Java 17
- Gradle 7.0+ -Browser Location: Ensure that your browser has location services enabled otherwise the game functions will not work.
Clone the Repository
git clone git@github.com:kiransain/sopra-fs25-group-26-server.git
cd sopra-fs25-group-26-clientLocal Development
Production Build
./gradlew buildRun the Application
./gradlew bootRunRun Tests
./gradlew testor directly in your IDE by running the test folder.
External Dependencies
- H2 in-memory database is used for testing, development and production. No external database setup is required.
Deployment
- The backend is automatically deployed to Google Cloud on pushes to the
mainbranch.
Releases
- Make sure changes are committed and pushed to the 'develop' branch.
- Create a pull request to merge 'develop' into 'main'.
- After code review and approval, merge the pull request.
- Create a new tag for the release version and push it.
- Google Cloud will automatically deploy the latest version to production.
Future contributors might consider:
- Customizable role assignment logic (e.g. several hunters, teams).
- Add a persistent Database for production.
-
And many thanks to our TA Ambros Eberhard, the SoPra teaching team, the course in parallel Software Engineering by Prof. Thomas Fritz, and the open-source tools we relied on.
-
This code is based on the SoPra-FS25-Server
-
To see contributions, you can see Contributors
This project is licensed under the Apache License Version 2.0.