- Copy
.env.example
to.env
- Change desired envs in
.env
- Execute
./run.sh
lint
- Run linter in root and subfolders
clean
- Delete node_modules
in root and subfolders
When setting z-index, always use the constants defined in layer.js
, and set the z-index relative to them.
Example:
const myZIndex = Layer.BACKGROUND - 10
Rules that apply to all projects should be placed in the project root .eslintrc.yml
Rules applying to a subset of projects should be individually added to each projects .eslintrc.yml
It is strongly recommended to turn on the following settings:
"eslint.autoFixOnSave": true,
"editor.formatOnSave": true,
The following extensions are strongly recommended:
- stylelint
With settings:
"stylelint.enable": true,
-
prettier
-
vscode-styled-components
- Add/modify .proto file in controller/src/protobuf
./update_proto.sh
Add query params subheading1
and subheading2
to game url to display subheadings with dynamic content
There are a few functions available to help with debugging from the game view.
They can be accessed from the console on the debug
object.
The following functions and properties are available:
debug.addMockPlayers(count)
debug.addSpiralMockPlayers(count)
debug.roundStart()
debug.roundStartMetrics()
debug.transitionToLobby(gameCode)
debug.transitionToMatchEnd()
debug.transitionToRoundEnd()
debug.printBehaviors()
debug.start()
debug.stop()
debug.state
transitionToLobby
is currently a bit problematic due to race conditions in rendering the lobby.
If some other function tries to render the lobby again the game engine will crash.