Closed 3kh0 closed 1 year ago
It looks like static game data. Right now we have these configs right in client code. We could make it more dynamic (load / share / add to room settings / add to replay file)
That would be pretty cool
I've created the next issue to continue implementation of the general idea: https://github.com/eliasku/13/issues/133
Right now you will be able to experiment with config.json
file for your own server
packages/tools/src/config.ts
file. It provides types and some good utilities to compose the final configuration.packages/client/assets/config.json
by running npm run config
.npm start
or npm run build
- scripts will copy packages/client/assets/config.json
to public/config.json
, it will be loaded by the game and will be used for all global configuration.If you need some new option from the code to be exposed in config.json
, please create the issue.
I would be nice to have a config file in
server
folder that you can use to change how the game works, like how often npcs spawn, what HP they need to be at to panic, how much each weapon does damage wise (set the damage each bullet does), if it should reset kills on death, things like that. This would be a .json file