Live location tracking and playback for the game "manhunt"
Rust 70.0%
TypeScript 13.7%
Nix 4.4%
Shell 4.4%
Kotlin 3.8%
Batchfile 2.0%
Just 0.8%
JavaScript 0.6%
HTML 0.2%
39 2 0

Clone this repository

https://tangled.org/bwc9876.dev/manhunt-app https://tangled.org/did:plc:x7tlupbnqot7nu6udnffnv4h/manhunt-app
git@knot.bwc9876.dev:bwc9876.dev/manhunt-app git@knot.bwc9876.dev:did:plc:x7tlupbnqot7nu6udnffnv4h/manhunt-app

For self-hosted knots, clone URLs may differ based on your setup.

Download tar.gz
README.md

Man Hunt#

built with garnix

An iOS and Android app that lets you play man hunt with friends.

The game is played over WebRTC Data Channels and is entirely P2P (except for the signaling process needed for WebRTC.)

Features#

  • Play games with friends by starting a lobby, your friends can join with the room code on the lobby screen.
  • Pings can be configured to happen at certain intervals. They reveal hider locations so hiders have to move.
  • Powerups are random items you can grab in certain locations that can deceive seekers or mess up other hiders.
  • Watch a replay of your game after it ends, it shows everyone's location throughout the game.
  • Your location data is safe, it's only ever sent to the other players in the game.

Development#

Pre-requisites#

If you have nix installed, all of these are handled for you.

With Nix#

Run nix develop to get a development shell with all needed dependencies set up. You can then call the just recipes mentioned below within the shell.

Setup#

  • Rust is ready to go
  • For the frontend, run just setup-frontend to install the dependencies via npm

Run App#

  • just dev: Run the app locally on your computer, this will open a WebView with the frontend for testing.
    • Note: all geolocation data returned from tauri-plugin-geolocation will be hard coded to (0.0, 0.0) in this mode.
  • just dev-android: Run the app on an Android device or VM via ADB
  • just signaling: Will run the signaling server on port 3536 (this is needed for clients to connect). If you need a different port run cargo run --bin manhunt-signaling 0.0.0.0:PORT.

Project Layout#

  • backend/: App backend, Rust side of the Tauri application
  • frontend/: App frontend, Web side of the Tauri application
  • nix/: Nix files for the flake
  • manhunt-signaling/: Matchbox signaling server implementation in Rust

Housekeeping#

As you go, please run these just commands every-so-often and before you commit:

  • just fmt: Formats all files in the repo
  • just check-rust: Check (and fix) potential issues with Rust code (only need to run if you edited the backend or signaling)
  • just check-frontend: Check for potential issues on the frontend (only need to run if you edited the frontend)

Important: When changing any type in backend that derives specta::Type, you need to run just export-types to sync these type bindings to the frontend. Otherwise the TypeScript definitions will not match the ones that the backend expects.

All changes will be put through CI to check that all of these commands have been done.

Other Just Recipes#

Run just without any args to get a list.