An exhibit about the Future of Democracy.
To install the required dependencies run npm install
in both the root directory and the
server
directory.
You can use npm run build
or npm run watch
in the root directory to build the client apps. The
server does not require compilation.
The .env
file in the root directory contains settings that are applied at compilation time.
Start the server by running npm run start
in the server
directory.
The clients, in the root directory, are:
index.html
: Demo/test client .player.html
: Player station client.map.html
: City map station client.
The player.html
client accepts the following query string parameters:
p
: Player ID. Defaults to 1.s
: ID of the stats panel to show (fps, render, ping). Defaults to none.log
: log level. Options aredebug
,info
,warn
, anderror
. Defaults towarn
The map.html
client accepts the following query string parameters:
s
: ID of the stats panel to show (fps, render, ping). Defaults to none.log
: log level. Options aredebug
,info
,warn
, anderror
. Defaults towarn
The index.html
app accepts the following query string parameters:
storyline
: Storyline ID to load. Defaults to the first storyline.s
: ID of the stats panel to show (fps, render, ping). Defaults to none.t
: Time limit for the game, in remainingSeconds. Defaults to 300 remainingSeconds.test
: A live test to perform (e.g.dialogue-responses
)settings
: The name of a settings file to load. Defaults tosettings.yml
. It must reside in the root directory and have a name that only contains letters, numbers, - or _, and ends in.yml
.log
: log level. Options aredebug
,info
,warn
, anderror
. Defaults towarn
The configuration files are in the config
directory. The server has to be reloaded after any changes.
Clients get the configuration from the server through the http API and have to be reloaded after
the server to take any changes.
You can override any of the configuration keys through a settings.yml
file in the root directory.
The .env file has other configuration keys that affect the environment.
The app.config.json
file in the root directory contains build-time configuration settings.
The server has both an HTTP and a WebSocket API. Their specifications are:
- http:
specs/openapi.yaml
- ws:
specs/asyncapi.yaml
You can use Swagger Editor and the AsyncAPI Playground to format the respective specifications in a friendly format.
The server and the clients have support for Sentry.
The server can take the DSN from the SENTRY_DSN
environment variable, or through the CLI option
--sentry-dsn
.
The clients can take the DSN from the sentry-dsn
query string parameter.
Both can also get the DSN from the system.sentry.dsn
configuration key (config/system.yml
),
which can be overriden with the settings.yml
file.
The following keyboard shortcuts are available in the player app if the game.userModeShortcuts
configuration key is not set to false
:
- 'e': Ends the countdown and jumps to the game end.
- 't': (Tip) Increases the "hint level", giving a more explicit quest prompt (if progressive prompts are used in the particular quest stage).
All the previous ones, plus the following keyboard shortcuts are available in the player app if the
game.devModeShortcuts
configuration key is not set to false
:
- 'c': Change the console log level. Each press of 'l' toggles to a different level.
- 'd': Toggle stats panel. Each press of 'd' toggles to a different panel.
- 'f': Dumps flags to the javascript console.
- 'h': Shows hitboxes.
- 's': Makes scenery sprites semi-transparent.
- 'x': Outputs the player's position to the javascript console.
The following keyboard shortcuts are available in the map app:
- 'd': Toggle stats panel. Each press of 'd' toggles to a different panel.
- 'f': Dumps flags to the javascript console.
The PlayerApp object can be accessed through the CQ.playerApp
global variable in the browser console.
The MapApp object can be accessed through the CQ.mapApp
global variable in the browser console.
Developed by Eric Londaits and Christian Stussak for IMAGINARY gGmbH.
Copyright (c) 2023 IMAGINARY gGmbH Licensed under the MIT license (see LICENSE) Supported by Futurium gGmbH