Saved in:
| Main Author: | |
|---|---|
| Format: | Recurso digital |
| Language: | English |
| Published: |
Zenodo
2026
|
| Online Access: | https://doi.org/10.5281/zenodo.18495597 |
| Tags: |
Add Tag
No Tags, Be the first to tag this record!
|
Table of Contents:
- <p>This resource contains the source code and the executable files of the Safe Haven Game app. This version can currently be used to play either the Landslides or the Floods single-hazard game (see related works).</p> <p>The differences between the app and the physical board games are: (1) there is a single-player mode. One can try just to beat the game, by surviving all ten rounds. (2) There is a multi-player mode that is not limited to any amount of players. The physical board game can only have up to 3-4 teams, as there are a limited number of cards to play with. In the online game, the number of cards is unbound, and therefore can be played with a larger group (for example a classroom). The multi-player version needs a game master that initializes the game and takes care of the rounds and phases.</p> <p>The game is created using the open-source game engine Godot. The source code is found in the zip file '<a href="https://zenodo.org/api/records/18495597/draft/files/SafeHaven-src-20260205.zip/content" target="_blank" rel="noopener noreferrer">SafeHaven-src-20260205.zip</a>'. This can be imported into Godot, if one wants to adjust the game functions.</p> <p>The second zip file '<a href="https://zenodo.org/api/records/18495597/draft/files/SafeHaven-executable-20260205.zip/content" target="_blank" rel="noopener noreferrer">SafeHaven-executable-20260205.zip</a>' contains the files to run the game itself.</p> <p><strong>Running singleplayer version</strong></p> <p>For the single-player game, one just needs Python installed. Extract all files in the ZIP file and run the command <code>python3 -m http.server</code>. The game can then be played on the local host port 8000 in the browser: <a href="http://localhost:8000/">http://localhost:8000/</a>. For a functioning multiplayer setup, a linux OS is needed and a router that leads the web socket requests to the correct address, for example with Traefik. </p> <p><strong>Running multiplayer version</strong></p> <p>We use docker-compose to deploy the app. If you want to deploy this on your own website, an example docker-compose setup using Traefik could be as below. Here, <code>example.com</code> needs to be changed into your website. A reverse proxy using Traefik needs to be setup. The <code>./directory/to/app</code> should be the path to the folder where the executable zip file should be extracted to. If deployed, one can simply go the the website (in this example, <code>https://example.com</code>) and play the game.</p> <pre><code>services: example-app: container_name: example-app build: python:3.13 labels: - "traefik.enable=true" # WebSocket Server (Port 8081) - "traefik.http.routers.safehaven-ws.rule=Host(`example.com`) && PathPrefix(`/ws/`)" - "traefik.http.routers.safehaven-ws.entrypoints=websecure" - "traefik.http.routers.safehaven-ws.tls=true" - "traefik.http.routers.safehaven-ws.tls.certresolver=letsencrypt" - "traefik.http.routers.safehaven-ws.service=safehaven-ws-service" - "traefik.http.services.safehaven-ws-service.loadbalancer.server.port=8081" # HTTP Server (Port 8000) - "traefik.http.routers.safehaven-http.rule=Host(`example.com`)" - "traefik.http.routers.safehaven-http.entrypoints=websecure" - "traefik.http.routers.safehaven-http.tls=true" - "traefik.http.routers.safehaven-http.tls.certresolver=letsencrypt" - "traefik.http.routers.safehaven-http.service=safehaven-http-service" - "traefik.http.services.safehaven-http-service.loadbalancer.server.port=8000" networks: - web volumes: - ./directory/to/app:/SafeHaven command: python3 -m http.server & ./SafeHaven.x86_64 --server --headless --port 8081 networks: web: external: name: your_reverseproxy_setup</code></pre>